cros-codecs icon indicating copy to clipboard operation
cros-codecs copied to clipboard

decoder/stateless: backends should check the number of available output buffers, if needed.

Open Gnurou opened this issue 1 year ago • 0 comments

Revealed by PR #83.

The stateless decoders check the number of available output buffers before submitting a picture to the backend. This is needed for VAAPI, but not for V4L2 stateless where we on the contrary need an input buffer to proceed.

This means that backends should validate that they have the resources required to perform their operation. This could probably be done as part of new_picture (which should be extended to all codecs), which could reserve the resources required to process a given pictures. Codecs like VP9 or AV1 that can process several frames per unit of input would call new_picture as many times as necessary, return if any call was failing, and then process the pictures sequentially.

Gnurou avatar Jul 09 '24 14:07 Gnurou