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

Extra data in SPS?

acc3141
Beginner
347 Views

I'm working with a DynaColor H264 camera (using IPP to write a decoder). I'm playing games with the max_frame_buffering value to minimize latency. This requires that I unpack and repack the SPS. But (unless I'm making a dumb mistake) there seem to be 2 extra values at the end of this camera's SPS. I get 25 bytes (the '54' is the last one).

unsigned char src[256] = {

0x4d, 0x60, 0x1f, 0x8d, 0x68, 0x0c, 0x81, 0x37, 0xe5, 0xc0,

0x5b, 0x20, 0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x03,

0x00, 0xa1, 0xe2, 0x84, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00

};

If you actually do the decoding of this data it looks to me like it should end with 0x84 0x40, not 84 54

The 84 40 is basically a max_frames values of 7 - part of the VUI parameters - the last value in the SPS (i think) which is spreaed over the 2 bytes and it should (i think) be followed by a '1' bit to end the SPS stream (the 40).

The '54' seems to imply that the '7' is followed by a '0' and a '1' encoded value and then the 1 bit to end the stream. If I change the 54 to a 40 which should leave a legally formatted SPS the video wont play (even though I traced my decoder code and it never looks at the 'extra' values). Its very strange. Any thoughts?

0 Kudos
3 Replies
Chao_Y_Intel
Moderator
347 Views

Hello,

Thanks for checking this.  You may notice the H.264 sample code in the IPP is legacy now, and they are not maintained anymore.

Have you got the chance to check Intel media SDK product?  For media codec, users are recommended to check this product.

Regards,
Chao

0 Kudos
acc3141
Beginner
347 Views

I did look at the Media SDK and it does include a generally nice H264 decoder which was more effieicnt and MUCH smaller than the IPP version. The problem was we needed compatability with XP systems (embedded) and as I recall that code only generated NV12 output which was fine for Win7 or later but was not compatible with the XP rendereres. I spent some time trying to figure out how to change the output media type to YUY2 (it kind of looked like it should be possible) but I was apparently not smart enough...  Also we played some games to decrease the latency of the IPP version significantly (threading, buffer counts, etc).

Do you know if its possible to generate YUY2 from the SDK version?

Thanks

 

0 Kudos
Chao_Y_Intel
Moderator
347 Views

Hi, I thought the MediaSDK had the software codec that supports the system without hardware acceleration, but I not expert on this. I suggest you to put the MediaSDK related question here: https://software.intel.com/en-us/forums/intel-media-sdk

so, experts there can provide some suggestion.

Thanks,
Chao 

0 Kudos
Reply