YCrCb422ToYCbCr422_5MBDV, YCrCb422ToYCbCr422_ZoomOut2_5MBDV, YCrCb422ToYCbCr422_ZoomOut4_5MBDV, YCrCb422ToYCbCr422_ZoomOut8_5MBDV

Convert five YCrCb422 macroblocks into YCrCb422 macroblocks.

Syntax

IppStatus ippiYCrCb422ToYCbCr422_5MBDV_16s8u_P3C2R(const Ipp16s* pSrc[5], Ipp8u* pDst[5], int dstStep);

IppStatus ippiYCrCb422ToYCbCr422_ZoomOut2_5MBDV_16s8u_P3C2R(const Ipp16s* pSrc[5], Ipp8u* pDst[5], int dstStep);

IppStatus ippiYCrCb422ToYCbCr422_ZoomOut4_5MBDV_16s8u_P3C2R(const Ipp16s* pSrc[5], Ipp8u* pDst[5], int dstStep);

IppStatus ippiYCrCb422ToYCbCr422_ZoomOut8_5MBDV_16s8u_P3C2R(const Ipp16s* pSrc[5], Ipp8u* pDst[5]);

Parameters

pSrc

Array of pointers to the five source macroblocks.

pDst

Array of pointers to the five destination macroblocks.

dstStep

Distance in bytes between starts of the consecutive lines in the destination image.

Description

These functions are declared in the ippvc.h header file. They convert YCrCb422 macroblocks to YCbCr422 macroblocks. These functions may be used in DV50 decoders.

The function ippiYCrCb422ToYCbCr422_ZoomOut2_5MBDV_16s8u_P3C2R also reduces the size of the destination image by 2 times, ippiYCrCb422ToYCbCr422_ZoomOut4_5MBDV_16s8u_P3C2R - by 4 times, and ippiYCrCb422ToYCbCr422_ZoomOut8_5MBDV_16s8u_P3C2R - by 8 times.

Note a specific feature of decoding in this case. In spite of the fact that the input data format is YUV422, the pSrc pointer should point to the macroblocks that contain the six blocks in the following order:

[Y0 block][empty block][Y1 block][empty block][V block][U block].

See below for ippiYCrCb422ToYCbCr422_5MBDV_16s8u_P3C2R usage example.

ippiYCrCb422ToYCbCr422_5MBDV Usage

...

const Ipp32s lMacroBlockWidth422 = 8 * 2;
const Ipp32s lMacroBlockHeight422 = 8;
const Ipp32s lSuperBlockWidth422 = (lMacroBlockWidth422 * 9);
const Ipp32s lSuperBlockHeight422 = (lMacroBlockHeight422 * 3);
 


...
{
    // Storing DV50 decompressed video segment

    // i is the DIF sequence number (from 0 to 19 in a NTSC mode or 
    // from 0 to 23 in a PAL mode)
    // k is the compressed video segment number in the DIF sequence (from 0
    // to 26)
    // NumDIFSeq is a number of DIF sequences in a channel (10 in NTSC or 
    // 12 in PAL mode)
    // Pitch is the destination image step
    // lpDstImage is the (Ipp8u*) pointer to the destination image buffer
    // lpsBlocks is the (Ipp16s*) pointer to the array of 30 decompressed DCT 
    // blocks

    Ipp32s lRow, lCol, lBytesPerPixel;
    Ipp16s* lpSrc[5];
    Ipp8u * lpDst[5];

    // set source pointers
    lpSrc[0] = lpsBlocks + (6 * 64 * 0);
    lpSrc[1] = lpsBlocks + (6 * 64 * 1);
    lpSrc[2] = lpsBlocks + (6 * 64 * 2);
    lpSrc[3] = lpsBlocks + (6 * 64 * 3);
    lpSrc[4] = lpsBlocks + (6 * 64 * 4);

    // get current column
    lCol = k / 3;

    // get current row
    if (lCol & 0x01)
        lRow = 2 - (k % 3);
    else
        lRow = (k % 3);

    // set destination pointers
    // we use the following formula:
    // destination image buffer +
    //     required super block row offset +
    //     required super block column offset +
    //     required macro block row offset +
    //     required macro block column offset
    lBytesPerPixel = 2; 
   // We use YUV2 destination format
 

    lpDst[0] = lpDstImage +
                   (i / NumDIFSeq) * Pitch * lSuperBlockHeight422 +
                   ((i + 2) % NumDIFSeq) * Pitch * lSuperBlockHeight422 * 2 +
                   Pitch * lMacroBlockHeight422 * lRow +
                   ((2) * lSuperBlockWidth422 +
                   lMacroBlockWidth422 * lCol) * lBytesPerPixel;

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.