Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

UMC::H264 Video Encoder SPS / PPS for the DCI.

nandkr
Beginner
716 Views

Hi,

I am totally new here. I searched around the forum a bit, but could not find anything similar to what I am about to ask. I hope I am not reposting a stale problem.

So here goes:
I am currently evaluating Intel sample codes for the various codecs, starting with H264 encoder. Everything is fine, except for DCI so far (though I would appreciate if the linux version came with configure etc rather than the magical build32.sh smiley [:-)]).

[ DCI stands for decoder configuration information and this is present in later codecs like MPEG4 Part 2 and H264. It contains sequence and picture specific part of the bitstream which are required for the higher elements which spawns the decoders to have a better view of the frame buffer requirements and encoding tools used etc. beyond what the profile and level says. These are useful when delivering compressed content via RTP etc or while storing it in a container format like mp4, mov, 3gp etc]

I can't seem to find a proper way of getting the SPS/PPS from the encoder ahead of the actual encoding. For producing the SPS/PPS encoder doesn't need the actual data but only the settings along with width, height etc. Right now the encoder churns out the SPS/PPS right before the first I frame. What I am looking for is a function or technique to get the DCI before the flow of actual video data.

[The work around I do right now is to spawn the encoder with all the parameters and call the GetFrame with empty video and then destroy everything (so the internal state of the encoder will be reset) and re-spawn encoder again. This is a very inferior way of doing it, but my know-how of the encoder is kind of limited as of now.

Could you please help me find out a way of doing this in a graceful way? I should also mention that I am a bit C++-challenged.

Thanks and best regards,
Nandakumar R.
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
716 Views

Hello Nandakumar,

there is comment from our expert:

Currently you cant get PPS/SPS in advance because they are set during encoding each frame and could be changed each frame.Actually you can just parse PPS/SPS before real decoding start and adjust your decoder buffer and so on (RTP parameter) accordingly.

The other way is to add function to the encoder interface that will return pointers to current PPS/SPS structures that you can use this info after frame coding but before frame sending. It could be simple to make patch for it if you provide version of IPP samples in use

Regards,
Vladimir

0 Kudos
Reply