I am in process of porting our application from IPP v7.0 to v7.1, but I have problems with our/your IPP decoders. We used to configure decoder with params.pPostProcessing = NULL, but now from what I can see, this param is necessary (it is now: params.m_pPostProcessor). When I set it as NULL, I get -995 error (NULL pointer) which from the source of decoder I can see that it checks for a valid m_pPostProcessor. Why's that?
How do we overcome this problem? I tried initializing VideoColorConversion and passing its reference to m_pPostProcessor, but now decoder seems to be not working correctly. I always get the same result, but no valid frames on the output.
Please show me correct workflow of video decoding in IPP v7.1. Documentation is still not updated and it has 7.0 references inside.
Thanks a lot!
I am going though a similar porting exercise at the moment. Setting PostProcessor pointer to NULL seems to work if corresponding assertions in the Decoder code are removed. Below is the last few lines from TaskSupplier::GetFrameToDisplay.
Not sure if this is correct, but I do manage to get decoded picture in YUV format as a result. (In case of H264 decoder I had to write my own function to extract YUV image because using ippiCopy_8u_C1R no longer worked for whatever reason, causing crash. But that may be a different problem entirely).
InitColorConverter(pFrame, &data, 0);
*pVData = m_LastNonCropDecodedFrame;
Please keep in mind that our encoder/decoders are samples. They are not meant to be production ready examples. Which workflow are you refering to that has not been updated? Siting sources helps on our end.
Thanks for your answer, but it doesn't work with basic VideoProcessing assigned to postProcessor.
I get the same decoded timestamp (-1) all the time, plus the data size in decoder and DataOut are constant all the time (like they are not consumed by the decoder and decoded), even though the GetFrame() returns success. I am using YV12 to initialize my DataOut. The data that comes in DataIn is also YV12.
It used to work with v7.0 decoders. I am talking about mpeg2 and h264. I get the same output from both. YV12 only has swapped chromas and there wasn't a problem with the old version of decoder. Do you suggest I convert swap the chromas back to YUV420 in DataIn and then try it? Well, at least I should've got some sort of picture, but what I am seeing is that Data is not being used by the decoder, it remains the same each time GetFrame() is executed, which is not right.
yes, those are the samples I used. I'll see if I get a chance to test umc_video_dec_con sample today. But anyway, the source code I had worked with IPP v7.0 decoders, with v7.1 it doesn't work.
I still have problems with IPP 7.1.1 MPEG/h264 decoders. UMC sample works fine, but it's using splitter to split out the tracks. I already have raw tracks as buffers assigned to DataIn. This approach worked with IPP 7.0 samples. First time MPEG2 decoder returns -996, but next time it crashes in: umc_mpeg2_dec.cpp @ 1118 line, or here: ret = m_pPostProcessor->GetFrame(&m_lastDecodedFrame, output);
Any help is greatly appreciated. I used basic VideoProcessing object assigned to VideoDecoderParams (like Pavel mentioned above).
I solved it. The VideoProcessor object got deleted when gone out of scope, leaving a NULL pointer in mpeg2_dec.cpp. It tried calling the parent's pure virtual function and that's why it crashed. Once the object is persistent throughout the whole video decoding process it works.
Thanks Pavel for pointing out that I needed a VideoProcessor.