Community
cancel
Showing results for 
Search instead for 
Did you mean: 
markiemooster
Beginner
144 Views

H.264 - issue decoding a single frame

I'm trying to decode a single raw H.264 I-Frame using the H.264 decoder. I've intialised the decoder successfully, and the frame is prefixed with the SPS/PPS data.

However, when I call decoder.GetFrame(&dataIn, &dataOut)I receive an error: UMC_ERR_NOT_ENOUGH_DATA.

My understanding was that I-Frames were complete images. If I'm correct, then why does the decoder fail?

Can anyone help, or suggest a workaround?

Thanks.
0 Kudos
8 Replies
jmason
Beginner
144 Views

Look in the TaskSupplier class at a method called SetDPBSize. There, depending on the level and dimensions of your H.264 data, the DPBSize will be determined. From my experience, this loosely will determine how many calls to GetFrame will take place before UMC_ERR_NOT_ENOUGH_DATA is no longer returned.
Tamer_Assad
Innovator
144 Views

Hi markiemooster,

When GetFrame() returns UMC_ERR_NOT_ENOUGH_DATA it doesn't indeedmean an error.

Please check the call for GetFrame()with NULL parameter passed, after the decoding loop in in order to get the buffered frames.

Please check this usefularticle: "Getting Started with Intel IPP Unified Media Classes Sample"

URL: http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample...

Also, check the UMC Reference Manual (umc-manual.pdf)->Example 4-38 H.264 Decoder Main Working Cycle.

Regards,
Tamer
Ying_H_Intel
Employee
144 Views

Hi markiemooster,

Jmason and Tamer's suggestionlooks right.May you try to call GetFrame() with NULL parameterto get buffered frame andlet us know how it works.

Thereare somelong dicussions about H.264 decoder frame delay. I search one for your reference
http://software.intel.com/en-us/forums/showthread.php?t=67755

Regards,
Ying


markiemooster
Beginner
144 Views

Thanks Ying and everyone else offering help. I'm still having problems.

To clarify, I have only one I-Frame prefixed with SPS/PPS and no more data.

I have the following code fragment and it does notexit from the do-while loop:

// Decompress the frame

UMC::Status status= m_decoder.GetFrame(&m_dataIn, &m_dataOut);

// Check if decompression was successful, otherwise try again

if (status != UMC::UMC_OK)

{

// Retrieve any data that has been buffered by IPP

do

{

status= m_decoder.GetFrame(NULL, &m_dataOut);

}

while (status == UMC::UMC_ERR_NOT_ENOUGH_DATA);

}


What am I doing wrong?

jmason
Beginner
144 Views

If you are only adding one encoded H.264 frame to be decoded, then I can see why it never exits your loop. The decoder buffers decoded frames, unless you MAKE it not like I did, and so until you give it more H.264 encoded frames to decode, it is going to keep giving you the same error.

Try overriding the value set/stored in TaskSupplier::SetDPBSize(). I have not tried overriding the stored value with 0 but it might give you the result you are looking for.
shyaki
Beginner
144 Views

When you receive the decoded frame, you should exit your loop since you have already got what you ask for.
markiemooster
Beginner
144 Views

Thanks everyone, I managed to get this working in the end.

ipp_test
Beginner
144 Views

Hi,

I am also experiencing the same decoding problem you have mentioned for h264 decoding.

Could you please explain how did you manage to solve the issue?