MC4x4B

Motion compensation for bi-predicted 4X4 block

Supported Technologies

SSE2

Synopsis

FwStatus   fwiMC4x4B_8u_C1 ( const Fw8u * pSrcRefFFw32s srcStepFFw32s mcTypeFconst Fw8u * pSrcRefBFw32s srcStepBFw32s mcTypeBconst Fw16s * pSrcYDataFw32s srcYDataStepFw8u * pDstFw32s dstStepFw32s roundControl );

Parameters

dstStep   Step of the destination array.
mcTypeB   Specifies the type of prediction used for backward frame motion compensation.
mcTypeF   Specifies the type of prediction used for forward frame motion compensation.
pDst   Pointer to a location in a destination buffer, a location in a destination array or to a destination result.
pSrcRefB   Pointer to a backward block in the reference plane.
pSrcRefF   Pointer to a forward block in the reference plane.
pSrcYData   Pointer to a block of inverse DCT output data.
roundControl   Specifies the type of rounding used for half-pixel approximation.
srcStepB   Source-aligned backward reference frame step size (width in bytes).
srcStepF   Source-aligned forward reference frame step size (width in bytes).
srcYDataStep   Source-aligned DCT output data block step size (width of the block in bytes).

Description

This function adds a 4X4 bi-predicted block to a 4X4 decoded residual block to reconstruct a source block. Prediction is the average of a forward prediction and a backward prediction based on the values in a reference block, using a compensation type specified by the mcType parameter.

When mcType = FWVC_MC_APX_FF, the reference block is used as the prediction block.

When mcType = FWVC_MC_APX_FH or FWVC_MC_APX_HF, each element of the prediction block is the average of two reference block elements.

When mcType = FWVC_MC_APX_HH, each element of the prediction block is the average of four reference block elements.

The half-sample prediction calculation allows for UV block structure. Neighboring horizontal elements of the U and V blocks have indexes i and i+2 in the UV block.