Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Diederick_H_
Beginner
55 Views

Repositioning the bitstream: do I need to copy PPS and SPS?

Hi,

I'm experimenting with fast scrubbing / jumping to frames in a h264 bitstream and using the latest Media SDK to decode the stream. Decoding works fine and I can render the decoded frames in a OpenGL window. 

The manual describes that I need to copy the last used SPS before the I-frame that I want to show. When I do this, I'm always exactly two frames off. I've validated my bitstream and I'm pretty sure they are correct.  I noticed that everything works fine when I also copy the last set PPS which is always the next nal after the SPS that I'm reading. Therefore it could be something in they way I'm reading the bitstream though I'm curious if it's just that I always need to copy the PPS too?

 

Thanks

D

0 Kudos
1 Reply
55 Views

Hi Diederick,

Some questions - What is your asyncDepth? If it is >1, you need to ensure that the SPS you are assigning is to the correct surface/frame. You mention jumping frames - could you please ensure this implementation is not causing such issues? I responded on your thread about scrubbing frames - by using HW decoder to decode frames quickly and discard non-used ones, the SPS/PPS issue you are observing may be easier to track/debug.

Also, can you provide more details on the code and other specs (are you using our tutorials and modifying them?). Can you send the reproducer?

Reply