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

Cannot decode MPEG2 streams that don't have sequence start code

pushkar_p
Beginner
199 Views

Hi,

I have some streams that don't start with 0x00 00 01 B3 but with 0x 00 00 01 B8 (GOP start code). The MPEG2 video decoder fails to initialize because of this. All frames are starting with this code so the decoder never initializes.

umc_mpeg2_dec_pic.cpp:

Status MPEG2VideoDecoderBase::FindSequenceHeader(IppVideoContext *video)
{
Ipp32u code;
do {
GET_START_CODE(video->bs, code);
if(SEQUENCE_HEADER_CODE == code)
return (UMC_OK);
} while ( code != UMC_ERR_NOT_ENOUGH_DATA );

return UMC_ERR_NOT_ENOUGH_DATA;
}

I tried to modify the if to also return UMC_OK if it matches the GOP start code but no luck. Can someone tell me what could be the issue?

Thank you.

pushkar

0 Kudos
1 Reply
Vladimir_Dudnik
Employee
199 Views
I think the issue is that according MPEG stream specification it should have sequence start code and UMC splitter implementationrely on this. So you may need to develop your own splitter for that custom stream format (probably UMC implementation might be a good start point for that, but you are free to develop your own splitter from scratch).
Regards,
Vladimir

0 Kudos
Reply