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

H.264 - issue decoding a single frame

markiemooster
Beginner
1,362 Views
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
1,362 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.
0 Kudos
Tamer_Assad
Innovator
1,362 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/#comment-39983

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

Regards,
Tamer
0 Kudos
Ying_H_Intel
Employee
1,362 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


0 Kudos
markiemooster
Beginner
1,362 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?

0 Kudos
jmason
Beginner
1,362 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.
0 Kudos
shyaki
Beginner
1,362 Views
When you receive the decoded frame, you should exit your loop since you have already got what you ask for.
0 Kudos
markiemooster
Beginner
1,362 Views

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

0 Kudos
ipp_test
Beginner
1,362 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?
0 Kudos
Reply