h.264 decode latency

h.264 decode latency

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!

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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 

Quote:

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 

Leave a Comment

Please sign in to add a comment. Not a member? Join today