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

Failed to Initialize H264 Video Decoder

vucetica
Beginner
1,812 Views
Hi,
I'm receiving a strange error when trying to initialize H264 video decoder (IPP v6). Here is a code sample:
[bash]UMC::H264VideoDecoder decoder;
UMC::VideoDecoderParams params;
params.numThreads = 1;
params.lFlags = 0;
params.m_pData = &DataIn;
params.info.stream_type = UMC::H264_VIDEO;
decoder.Init(&params);[/bash]
The line decoder.Init(...) fails with ASSERT somewhere deep in CRT (dbgheap.c, _CrtIsValidHeapPointer(pUserData)).
When I debug H264 video decoder, everything goes fine tillCreateSegmentDecoderWrapper::CreateSoftSegmentDecoder is called and the firstCreateSegmentDecoder function inside it.
I have changed various streams inside DataIn, even not initialize DataIn, but there is no difference, the same CRT error.
I would really appreciate help on this one. Thanks.
Regards,
Aleksandar
0 Kudos
3 Replies
Ying_H_Intel
Employee
1,812 Views
Hello Aleksander,

Have you tried your streamswtih simple_player.exe. Can it decode and play them?

How about run the H.264 decoder as in the KB
http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/
?

DataIn.SetBufferPointer(cVideoData,VideoDataSize);

DataIn.SetDataSize(VideoDataSize);

//usedefaultparamter,threadingnumber=1

Params.m_pData=&DataIn;Params.lFlags=0;Params.numThreads=1;

if(status=H264Decoder.Init(&Params)!=UMC::UMC_OK)
return;

Regards,
Ying

0 Kudos
vucetica
Beginner
1,812 Views
Hi Ying,

thanks for the answer. I'm unitializing decoder as in example given in KB. If I'm not wrong, you can see that in the code sample I gave in my post, the only missing part is DataIn initialization which I did in a propper way (as in a KB example).
A bit more details: I'm trying to decode H264 stream extracted from MPEG2 TS. Does IPP h264 decoder expects to receive h264 stream packed up in mp4? I have used IPP Mpeg2 decoder to successfully decode MPEG2 stream extracted from MPEG2 TS, and it worked perfectly. On the other hand, h264 decoder doesn't even succeeds to initialize. The strangest thing is that it seems to produce CRT error on lines that are not related to input byte array, at all (as long as I can see).
Stuck with this for few days and do not have a clue. I would appreciate any help.
Thanks,
Aleksandar
0 Kudos
vucetica
Beginner
1,812 Views
I have solved it (almost). It looks like that code wasn't able to execute until I have changed code for IPP H264 decoder. It seems that the problem was withSegmentDecoderHPBase class instantiated inCreateSoftSegmentDecoderWrapper::CreateSegmentDecoder. When I have removed virtual destructor fromSegmentDecoderHPBase, and other classes thatSegmentDecoderHP derives from, everything seems to work ok. Really strange. If someone knows the reason, I would like to hear why this error is comming from. Btw, code is hosted inside DirectShow filter (if it matters at all)...perhaps I have some strange setting inside my compiler... Still do not know the reason, but again, it works when there are no those virtual destructors.
0 Kudos
Reply