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

DV Decoder Example: Explain VideoDecoder::DecompressSegment?

ben_weatherman
Beginner
385 Views
I am looking through the DV Decoder Example. I understand the VideoDecoder::DecodeFrame function, but am having a lot of problems with how the DecodeSegment function is written. Could someone help walk me through it?

In particular:
1) How is this size determined?
- memset(shortBlocks, 0, sizeof(short int) * 64 * 5 * 6);
2) Where do all of these equations come from?
- qno = (int)(*(((unsigned short *)cBuffer) + (j +j+j) * 4 + 1) & 0x0f);
- uu2 = (cBuffer[j * 6 + i ] ) & 0x00030;
- lpsTableKvadr = lpADequantizeTable + 64 * lpADequantizeLineTable[qno + uu2 ] + (cBuffer[i + 6 * j] & 0x040)* 14;
- if ((0x40 & (cBuffer[i + 6 * j])) == 0)

I really appreciate any help you might be able to provide.

Thanks,
Ben
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
385 Views
HI,
below is answers from our expert
1) In DV mimimal coded unit (MCU) is segment. It consist from 5 macro-blocks, which are taking from different areas of image. Each macro-block consist from 6 blocks (4 block of Y component, 1 Cb and 1 Cr). Each block is 8x8 array of DCT coefficients. Before start of decoding you need to set segment's memeory to zero, and segment size of sizeof(short) * 64 * 6 * 5.
2) You need to refer to IPP documentation and DV standard to understand where those equations comes from.
Regards,
Vladimir
0 Kudos
Reply