GetDiff4x4

Evaluate predicted 4X4 block

Supported Technologies

SSE2

Synopsis

FwStatus   fwiGetDiff4x4_8u16s_C1 ( const Fw8u * pSrcCurFw32s srcCurStepconst Fw8u * pSrcRefFw32s srcRefStepFw16s * pDstDiffFw32s dstDiffStepFw16s * pDstPredictorFw32s dstPredictorStepFw32s mcTypeFw32s roundControl );

Parameters

dstDiffStep   Destination block step size (width of the block in bytes).
dstPredictorStep   Destination predictor block step size (width of the block in bytes).
mcType   Specifies the type of prediction used for motion compensation.
pDstDiff   Pointer to a 16X16 block in the destination plane which contains differences between current and reference blocks.
pDstPredictor   Pointer to a destination predictor block.
pSrcCur   Pointer to a block in the current plane.
pSrcRef   Pointer to a block in the reference plane.
roundControl   Specifies the type of rounding used for half-pixel approximation.
srcCurStep   Source current block step size (width of the block in bytes)
srcRefStep   Source reference block step size (width of the block in bytes)

Description

This function compares a 4X4 source block to an 4X4 reference block and writes results to a difference block and a predictor block in a destination plane. The results are used to reduce error when subsequent blocks that refer to the source block are encoded.

Values in the predictor block are 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 predictor block.

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

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

Encoding has half-pixel accuracy, and a rounding method must be specified.