Predict motion of luma block intra-frame
FwStatus | fwiPredictIntra_4x4_H264_8u_C1IR | ( | Fw8u * pSrcDst, Fw32s srcDstStep, FwIntra4x4PredMode_H264 predMode, Fw32s availability ); |
availability | Flag that indicates availability of the samples used for prediction. | |
pSrcDst | Pointer to the start of the block. | |
predMode | Specifies the prediction mode of the Intra_4x4 prediction process for luma samples. | |
srcDstStep | Source and destination buffer step size in bytes (width of both buffers in bytes). |
This function performs intra-frame motion prediction by comparing a 4X4 luma block to previously-encoded neighboring 4X4 luma blocks within the same frame. Results are written back to the source location. Comparison is done in accordance with JVTG050 8.3.1.2., using one of the following prediction modes specified by parameter predMode.
Name of Constant Prediction Mode JVTG050 Reference
FW_4x4_VERT Intra_4x4_Vertical 8.3.1.2.1 FW_4x4_HOR Intra_4x4_Horizontal 8.3.1.2.2 FW_4x4_DC Intra_4x4_D 8.3.1.2.3 FW_4x4_DIAG_DL Intra_4x4_Diagonal_Down_Left 8.3.1.2.4 FW_4x4_DIAG_DR Intra_4x4_Diagonal_Down_Right 8.3.1.2.5 FW_4x4_VR Intra_4x4_Vertical_Right 8.3.1.2.6 FW_4x4_HD Intra_4x4_Horizontal_Down 8.3.1.2.7 FW_4x4_VL Intra_4x4_Vertical_Left 8.3.1.2.8 FW_4x4_H Intra_4x4_Horizontal_Up 8.3.1.2.9
The availability parameter is calculated as follows.
B1*FW_LEFT + B2*FW_UPPER_LEFT + B3*FW_UPPER + B4*FW_UPPER_RIGHT
The constants FW_LEFT, FW_UPPER_LEFT, FW_UPPER, FW_UPPER_RIGHT are from FwLayoutFlag.
The variables B1, B2, B3, B4 take the following values.
0 - when a block is not available for prediction 1 - when a block is available for prediction