SumsDiff8x8Blocks4x4

Evaluates difference between current and reference 4X4 blocks and calculates sums of 4X4 residual blocks elements for 8X8 blocks.

Syntax

IppStatus ippiSumsDiff8x8Blocks4x4_8u16s_C1(const Ipp8u* pSrc, Ipp32s srcStep, const Ipp8u* pPred, Ipp32s predStep, Ipp16s* pSums, Ipp16s* pDiff);

IppStatus ippiSumsDiff8x8Blocks4x4_8u16s_C2P2(const Ipp8u* pSrcUV, Ipp32s srcStep, const Ipp8u* pPredU, Ipp32s predStepU, const Ipp8u* pPredV, Ipp32s predStepV, Ipp16s* pSumsU, Ipp16s* pDiffU, Ipp16s* pSumsV, Ipp16s* pDiffV);

Parameters

pSrc

Pointer to an 8x8 block in the current plane

pSrcUV

Pointer to the source block (chrominance part of NV12 plane)

0 UV UV UV UV UV UV UV UV 1 UV UV UV UV UV UV UV UV ... 7 UV UV UV UV UV UV UV UV

srcStep

Distance in bytes between starts of the consecutive lines in the source image

pPred

Pointer to an 8x8 block in the reference plane

predStep

Distance in bytes between starts of the consecutive lines in the reference image

pPredU

Pointer to the reference U block

predStep

Distance in bytes between starts of the consecutive lines in the reference U plane

pPred

Pointer to the reference V block

predStep

Distance in bytes between starts of the consecutive lines in the reference V plane

pSums

Pointer to an array of size 4 that contains sums of 4x4 difference blocks coefficients. The array is filled by function.

pDiff

If not NULL, pointer to an array of size 64 that contains a sequence of 4x4 residual blocks. The array is filled by function

pSumsU

Pointer to an array that contains sums of 4x4 difference blocks coefficients. The array is filled by function.

pDiffU

If not 0, pointer to an array that contains a sequence of 4x4 residual blocks. The array is filled by function if pDiffU is not NULL

pSumsV

Pointer to an array that contains sums of 4x4 difference blocks coefficients. The array is filled by function.

pDiffV

If not 0, pointer to an array that contains a sequence of 4x4 residual blocks. The array is filled by function if pDiffV is not NULL

Description

The functions are declared in the ippvc.h header file. These functions evaluate difference between current and reference 4x4 blocks and calculates sums of 4x4 residual blocks elements in same order as shown in Figure the figure below.

Splitting of 8x8 Block Into Sixteen 4x4 Blocks





.

ippiSumsDiff8x8Blocks4x4_8u16s_C2P2 is a clone of ippiSumsDiff8x8Blocks4x4_8u16s_C1 but the source image is a chrominance part of an NV12 plane:

YY YY YY YY YY YY YY YY UV UV UV UV - chrominance part of NV12 plane.

This function is used in the H.264 encoder included into Intel IPP Samples. See introduction to Motion Estimation.

ippiSumsDiff8x8Blocks4x4_8u16s_C2P2R Usage Example 

{
    // the pointer to the source block (8x8 block in the current plane)
    // in the chrominance part of NV12 plane).
    Ipp8u *pSrcUV = current_block_in_frame;
    // Distance in bytes between starts of the consecutive lines
    // in the source image
    Ipp32s srcStep = src_step;
    // Pointer to the reference U 8x8 block
    const Ipp8u* pPredU = block_u;
    // Step of the reference U plane, specifying width of the plane in bytes.
    Ipp32s predStepU = step_u;
    // Pointer to the reference V 8x8 block
    const Ipp8u* pPredV = block_v;
    Ipp32s predStepV = step_v;
    // Pointer to the array that contains sums of U 4x4 difference blocks coefficients.
    // The array is filled by the function.
    Ipp16s* pSumsU = sums_of_u;
    // If it is not zero, pointer to the array that contains a sequence of 4x4 U residual blocks.
    // The array is filled by function if pDifUf is not null
    Ipp16s* pDiffU = diff_u;
    // Pointer to the array that contains sums of V 4x4 difference blocks coefficients.
    // The array is filled by the function
    Ipp16s* pSumsV = sums_of_v;
    // If it is not zero, pointer to array that contains a sequence of 4x4 U residual blocks.
    // The array is filled by the function if pDifUf is not null
    Ipp16s* pDiffV = diff_v;
    ippiSumsDiff8x8Blocks4x4_8u16s_C2P2(pSrcUV,srcStep,
                                        pPredU,PredPitchU,
                                        pPredV,PredPitchV,
                                        pSumsU,pDiffU,
                                        pSumsV,pDiffV);
}

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one input pointer is NULL.


Submit feedback on this help topic

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