DV Decoder Example: Explain VideoDecoder::DecompressSegment?

DV Decoder Example: Explain VideoDecoder::DecompressSegment?

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

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today