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

ipp-samples 7.0.6 H264 decoder UMC_ERR_NOT_ENOUGH_DATA error code

Yaroslav_Korchevsky
848 檢視
I switched from old IPP 5 with coresponding IPP-samples to 7.0.6 IPP + ipp-samples

It appeeared, that MP4 decoder works fine, but H264 decoder became non working.
It always returns UMC_ERR_NOT_ENOUGH_DATA

I feed the data to decoder by frames.
As many frames I feed to decoder as many UMC_ERR_NOT_ENOUGH_DATA error codes I get in response.

I invoke both MP4 and H264 decoders same way.


- - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - -
if (!m_isDecoderInit)
{
createVideoDecoder();

m_videoDecParams.info.stream_type = m_inputStreamType;
m_videoDecParams.info = m_videoInfo;
m_videoDecParams.info.clip_info = m_videoInfo.clip_info;
m_videoDecParams.lFlags = UMC::FLAG_VDEC_REORDER;

if(m_inputStreamType == UMC::MPEG4_VIDEO || m_inputStreamType == UMC::MPEG2_VIDEO)
{
m_videoDecParams.lFlags = 0;
}

if(m_inputStreamType == UMC::H264_VIDEO)
{
m_videoDecParams.numThreads = 1;
m_videoDecParams.lFlags = 0;
}

m_videoDecParams.pPostProcessing = m_videoProcessing.get();
m_videoDecParams.m_pData = m_pInMediaData;
UMC::Status umcRes = m_videoDecoder->Init(&m_videoDecParams);

if (umcRes != UMC::UMC_OK ) return ;
m_isDecoderInit = true;
}

UMC::Status umcRes = m_videoDecoder->GetFrame(m_pInMediaData, m_pOutVideoData);

return umcRes ;
- - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - - -- - - - - - - - - - -

m_pInMediaData - is definitely filled.
Videostream is definitely valid as far as other H.264 decoders works correctly.

What could be wrong with IPP decoder?


0 積分
8 回應
Yaroslav_Korchevsky
848 檢視
To be precise I attach my videostream split by frames
alex78
新貢獻者 I
848 檢視

Hi,

nothing is wrong. When you receive this kind of error, just call GetFrame once more with NULL to force the decoder to output the frame immediately. Something like:

result = coredecoder->GetFrame(&datain, &dataout);

if (result == UMC_ERR_NOT_ENOUGH_DATA) {
result = coredecoder->GetFrame(NULL, &dataout);
}


Hope this helps.

Alex
Yaroslav_Korchevsky
848 檢視
Alex78. Thank you.

It really works, but I don't imagine why.
why it doesn't work if I feed next frame?
Looks, like this feature is bug.

Can you explane me the idea?
I know, that depending on the stream profile it may be coded the
input to output frame delay 0 to several frames.
According to this idea output should appear ith some delay.
However, error code UMC_ERR_NOT_ENOUGH_DATA keeps the same always.
regardless the number of input frames I fed.

I keep thinking, it is bug, which has workaround.

Is it so?
selea
初學者
848 檢視
I found exactly the same thing. Sometime in H264 stream I foundUMC_ERR_NOT_ENOUGH_DATA after GetFrame. If I call GetFrame(NULL,...) I often get the frame decoded from the GetFrameInternal of the H264Decoder.
I think this behaviour happens because sometime during play of H264 stream (especially in RTP streams) I submit to the GetFrame a frame where there's only SPS or PPS...this cause theUMC_ERR_NOT_ENOUGH_DATA. Anyway sometime this happen even with a P image.
I'm asking if this happen for the B frame that the H264Decode have to support
alex78
新貢獻者 I
848 檢視
Hi,

well, I do not see the logic either. I think that even if the decoder accumulates frames inside, it should (after some frames have been fed into it) start to return the decoded frames. So I treat it as a "design principle" of the decoder and I am just calling GetFrame with NULL to get the decoded frames :). AFAIK this does not happen for other UMC based decoders than H264.

Alex
Yaroslav_Korchevsky
848 檢視
In IPP H264 decoder version 5.x it did work correctly.
If I feed complete frame, decoder returns decoded frame.
When I feed only part of frame, or just SPS (and PPS)
decoder waits the rest of frame and returns UMC_ERR_NOT_ENOUGH_DATA.

In this version I confused by behavour change: I feed complete frame, but decoder reports that input data is insufficient :(
selea
初學者
848 檢視
I think there's something changed in the lib version 7.0.7.
I found someCompleteDecodedFrames(0); function calls when happen UMC_ERR_NOT_ENOUGH_DATA
I don't know if this is used to make it a better behaviour
Yaroslav_Korchevsky
848 檢視
In 7.0.7 - the same as in 7.0.6
回覆