Im an IPP newbie, but ran out of things to try so thought posting here might help.
I'm encoding/decoding with the H264 encoder/decoder. Encoding seems to be working fine. Raw h264 bitstreams written to file playback correctly with the simple player sample.
My problem is in my encode routineI write the encoded samples to an AVI file using the DirectShow AVI file writer filter. The resulting AVI file plays back correctly in Windows Media Player using the Lead H264 codec. Using the IPP H264 decoder, however, with the simple player just plays back the audio:
C:Program FilesIntelIPPipp-samplesaudio-video-codecs\_binwin32_cl7>simple_
player Leader-transcoded.avi
Audio Render : DSOUND
Stream Type : AVI
Video Info :
-Video Type : UNDEF
-Resolution : 720x480
-Frame Rate : 29.97
Audio Info :
-Audio Type : PCM
-S.Frequency : 32000
-Num.Channel : 2
-BitPerSample: 16
Error in audio render
Using the IPP H264 decoder in my routine, the Init() function returns OK, but the subsequent GetInfo() fails.
If anyone has any ideas for me to try I sure appreciate it.
My code:
UMC::Status ret; m_pDecoder = new UMC::H264VideoDecoder(); m_pDecoderParams = new UMC::VideoDecoderParams(); UMC::BaseCodec* pPointerCopier = new UMC::DataPointersCopy(); UMC::VideoProcessing* color = new UMC::VideoProcessing(); UMC::VideoProcessingParams postProcessingParams; postProcessingParams.m_DeinterlacingMethod = (UMC::DeinterlacingMethod)(0 & UMC::FLAG_CCNV_DEINTERLACE); postProcessingParams.InterpolationMethod = 0; color->SetParams(&postProcessingParams); m_pDecoderParams->pPostProcessing = color; //m_pDecoderParams->pPostProcessing = pPointerCopier; m_pDecoderParams->info.stream_type = UMC::H264_VIDEO; m_pDecoderParams->numThreads = 1; m_pDecoderParams->lFlags = 0; m_pDecoderParams->m_pData = &m_IppIn; ret = m_pDecoder->Init(m_pDecoderParams); // <-- returns OK if (ret != UMC::UMC_OK) { switch(ret) { case UMC::UMC_ERR_ALLOC: MyMessage("[H264] Video decoder initialization failed. Decoder failed to allcoate memory for internal buffers."); break; case UMC::UMC_ERR_INVALID_STREAM: MyMessage("[H264] Video decoder initialization failed. Incorrect bitstream provided."); break; case UMC::UMC_ERR_NULL_PTR: MyMessage("[H264] Video decoder initialization failed. NULL pointer passed."); break; case UMC::UMC_ERR_UNSUPPORTED: MyMessage("[H264] Video decoder initialization failed. Unsuported flag specified."); break; default: MyMessage("[H264] Video decoder initialization failed. Unknown error."); break; } return false; } UMC::H264VideoDecoderParams params; ret = m_pDecoder->GetInfo(ms); // <--- fails if (ret != UMC::UMC_OK) { MyMessage("[H264] Video decoder GetInfo failed"); return false; } else {
...
...
}
Thanks!
Link Copied
Hello,
might be there is some issue with how that stream was muxed. Could you please provide that stream for analis?
Regards,
Vladimir
Hi,
in our current design Init should return OK, it is expected behaviour. You can use Init without first frame. I think it is an issue of splitter, it should process stream until findSPS/PPS info at the first call, so the following GetInfo will be able to return meaningful info.
Regards,
Vladimir
Thanks Guys,
You werecorrect. The first frame delivered by the AVI splitter, which I was using to init the decoder, didn't contain the SPS/PPS info.
It's working correct now. Thanks for your help.
Morgan
For more complete information about compiler optimizations, see our Optimization Notice.