Media (Intel® oneAPI 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
3028 Discussions

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



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?




0 Kudos
1 Reply

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?

0 Kudos