[Libav-user] QSV waits until next frame before decoding, how to make decode immediately?

Philippe Noël philippe_noel at college.harvard.edu
Sun Jan 26 23:30:49 EET 2020


  Hi!

TL;DR h264_qsv is waiting until the next frame before decoding--how do I
make it decode immediately?

I recently implemented h264_qsv decode after following this example
<https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/qsvdec.c>. The
problem I'm having is that I'm experiencing some latency when playing back
frames, and I believe I have figured out why. According to this post
<https://software.intel.com/en-us/forums/media/topic/704136?fbclid=IwAR1ZxtVVgz5dtNoZ2TVwxfDPtRsQxlWbOj20DtiQIZk-xt6zrhw0-d0v8-c>,
Intel QSV SDK will wait until the next frame is received before starting
the decode process, because it's not sure if the frame is a full frame or
not. The answer says that the solution is to pass in a
MFX_BITSTREAM_COMPLETE_FRAME
parameter, to set AsyncDepth = 1, and to set
SEI.pic_timing.dpb_output_delay.

Does anyone know how to use these settings in Libavcodec/how to resolve the
frame delay decoding issue? I thought maybe they would be passed into the
AVHwFramesContext struct but I can't find them anywhere.

Thank you!

Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200126/1de7d454/attachment.html>


More information about the Libav-user mailing list