Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6818 Discussions

How to decompress every I_PICTURE without image corruption?

9ine
Beginner
635 Views
I'm using that loop to decompress every I_PICTURE only:

do {
if (4 >= in.GetDataSize() || sts == UMC::UMC_ERR_NOT_ENOUGH_DATA) {
while (((sts = pSplitter->GetNextData(&in, videoTrack)) == UMC::UMC_ERR_NOT_ENOUGH_DATA))vm_time_sleep(5);
}
if (in.GetFrameType() != UMC::I_PICTURE) {
sts = UMC::UMC_ERR_NOT_ENOUGH_DATA;
continue;
}
out.SetTime(in.GetTime());
out.SetFrameType(in.GetFrameType());
sts = pVideoDecoder->GetFrame(&in, &out);
while (sts == UMC::UMC_ERR_NOT_ENOUGH_DATA || sts == UMC::UMC_ERR_SYNC);

With that continue statement the image becomes corrupted as in the attachement on the right.
Grabbing all frames however renders correct image as on the left.

The video is MTS:
stream type: MPEGx
video track 0: H264 H264 1920x1080 YUV420 0bps 29.97fps 96.5286 seconds

0 Kudos
1 Reply
Ying_H_Intel
Moderator
635 Views
Hi 9ine,

The bad image looks a kind of interlace image or half of framewas decompressed, other half frame are missed. Are you working on dual core machine? what version of the OS and the compiler ?

Regards,
Ying
0 Kudos
Reply