WeightedAverage_H264

Averages two blocks with weights.

Syntax

IppStatus ippiWeightedAverage_H264_8u_C1IR(const Ipp8u* pSrc1, Ipp8u* pSrc2Dst, Ipp32s srcDstStep, Ipp32s weight1, Ipp32s weight2, Ipp32s shift, Ipp32s offset, IppiSize roiSize);

Parameters

pSrc1

Pointer to the first source (output of preceding functions).

pSrc2Dst

Pointer to the second source and result.

srcDstStep

Distance in bytes between starts of the consecutive lines in the source and result images.

weight1, weight2

Weights.

shift

Shift.

offset

Offset.

roiSize

Flag that specifies the region of interest (could be 16, 8, 4 or 2 in each dimension).

Description

The function ippiWeightedAverage_H264_8u_C1IR is declared in the ippvc.h file. This function averages two blocks with weights (for weighted bi-directional predictions) as specified in 8.4.2.3.2 of [JVTG050] when predFlagL0 and predFlagL1 are equal to 1.

The function uses the following formula:



where x [0,roi.width-1], y [0,roi.height-1]



The above formula corresponds to formula 8-220 of JVT-G050. See Table “Color Conversion Functions” for matching the function arguments and the standard variables.

WeightedAverage_H264 Arguments vs JTV-G050 Variables
ippiWeightedAverage 8.4.2.3.2 JVT-G050
weight1 w0
weight2 w1
shift logWD +1
offset (o0 + o1 + 1)>>1
roi.width partWidth
roi.height partHeight

Values of w0, w1, logWD, o0, o1 are calculated from formulas 8-221 through 8-244.

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

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified pointers is NULL.

ippStsStepErr

Indicates an error condition if srcDstStep value is less than roi.width


Submit feedback on this help topic

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