Closed Gnurou closed 12 months ago
Hi @dwlsalmeida, keeping this small technical debt in mind so we can think about removing it once the H.265 code stabilizes a bit.
At a first glance, I don't think V4L2 stateless actually uses these. Don't you think it's advantageous to have some space to save backend-specific data for a given codec?
If this can be avoided without complicating the API too much, then I think we should avoid it and keep the backend code simple. V4L2 could just ignore the information it doesn't need. But let me reconsider now that the H.265 code is in a more complete state.
The
BackendData
generic argument ofVaapiBackend
has been introduced by the H.265 code, and is used exclusively by it.It would be preferable (and more readable) to keep
VaapiBackend
codec-agnostic and remove that argumment. The H.265BackendData
has two members:last_slice
set and used insubmit_last_slice
andreplace_last_slice
.va_references
set inhandle_picture
and used indecode_slice
.It should be possible to replace them by generic associated types of the H265 stateless backend, and have the H.265 decoder manage and pass them to the needed functions.