Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

h.264 decode latency

Dennis_Munsie
Beginner
483 Views

I'm currently using the h.264 decoder in an in-house app in two different scenarios.  When I feed the decoder a stream created with the QuickSync encoder, I don't have any frame latency from when I submit my first frame to when an output frame is available.  But if I decode a stream made with a different encoder, I have two frames of latency on the output side before I start getting output.  This stream is a only I and P frames.  With other decoders, I don't get any latency like this, so I'm assuming that I'm doing something wrong on my end.

I am setting the MFX_BITSTREAM_COMPLETE_FRAME flag in the DataFlag field for the mfxBitstream object and I've also set AsyncDepth = 1 in the decoder parameters.  Is there anything else I should be looking for?  Is the decoder looking for an AUD NAL to signal the end of a frame?

Thanks!

0 Kudos
3 Replies
andy4us
Beginner
483 Views

Check the documentation, but I believe that to get no latency decoder, you also have to setup the encoder side for no latency. You've obviously done this when using Media SDK, but the other encoder isn't setup for this.


Andy

0 Kudos
Petter_L_Intel
Employee
483 Views

Also, make sure the encoded stream has Decoded Picture Buffer (DPB) set to 1. Using Media SDK encoder, this is set via the mfxExtCodingOption::MaxDecFrameBuffering = 1 parameter.

Regards,
Petter 

0 Kudos
Dennis_Munsie
Beginner
483 Views

Petter Larsson (Intel) wrote:
Also, make sure the encoded stream has Decoded Picture Buffer (DPB) set to 1. Using Media SDK encoder, this is set via the mfxExtCodingOption::MaxDecFrameBuffering = 1 parameter.

This helped -- but it only removed one frame of latency.  There is still one more frame of latency that I want to track down.  I'll take a look at the stream as generated by the QuickSync encoder and see if there is anything else that is different from what the other encoder is generating.

Thanks!

dennis 

0 Kudos
Reply