Decode CAVLC bitstream
|FwStatus||fwiDecodeCAVLCCoeffs_H264_1u16s||(||Fw32u ** ppBitStream, Fw32s * pBitOffset, Fw16s * pNumCoeff, Fw16s ** ppDstCoeffs, Fw32u uVLCSelect, Fw16s uMaxNumCoeff, const Fw32s ** ppTblCoeffToken, const Fw32s ** ppTblTotalZeros, const Fw32s ** ppTblRunBefore, const Fw32s * pScanMatrix );|
|pBitOffset||Pointer to a bit position within the byte that ppBitStream points to. Valid within the range 0 to 7. The pointer is updated after motion vector decoding.|
|pNumCoeff||Pointer to the output number of non-zero coefficients.|
|pScanMatrix||Pointer to a matrix containing indices of elements in a scanning sequence.|
|ppBitStream||Double pointer to the current position in the bit stream.|
|ppDstCoeffs||Double pointer to a 4x4 block of coefficients calculated by the function. The function shifts pointer *ppDstCoeffs on 16.|
|ppTblCoeffToken||Double pointer to a CoeffToken table.|
|ppTblRunBefore||Double pointer to a RunBefore table.|
|ppTblTotalZeros||Double pointer to a TotalZeros table.|
|uMaxNumCoeff||Maximum number of coefficients in a block (16 for Intra 16x16, 15 for others).|
|uVLCSelect||Predictor on number of CoeffToken table.|
This function parses and decodes a source stream of MPEG-4/AVC Chroma AC and Luma video syntax elements in JVTG050-compliant context-adaptive variable-length coding (CAVLC) format. Result coefficients are written to a series of 4X4 destination blocks.
Each element of pointer array pTblCoeffToken points to a table that contains codes, the number of trailing one transform coefficients and the total number of non-zero transform coefficients, in accordance with JVTG050 Table 9-5. The following values are used.
Element pTblCoeffToken, 0 < uVLCSelect < 2
Element pTblCoeffToken, 2 < uVLCSelect < 4
Element pTblCoeffToken, 4 < uVLCSelect < 8
Element pTblCoeffToken, uVLCSelect = -1 (used only for DecodeCAVLCChromaDcCoeffs_H264).
The HuffmanRunLevelTableInitAlloc function must be used to create pTblCoeffToken tables. When the value of uVLCSelect is greater than 8, the function uses its own table of transform coefficients.
Each element of pointer array ppTblTotalZeros except for ppTblTotalZeros points to a table that contains codes and values (JVTG050 total_zeros) in accordance with JVTG050 Tables 9-7 and 9-8. Element ppTblTotalZeros is not used.
Each element ppTblTotalZeros[i] contains codes and values that correspond to JVTG050 TotalCoeff = i, 0 < i < 16.
Each element of pointer array ppTblRunBefore except for ppTblRunBefore points to a table that contains codes and values (JVTG050 run_before) in accordance with JVTG050 Table 9-10. Element ppTblRunBefore is not used.
ppTblRunBefore[i] contains codes and values that correspond to JVTG050 zerosLeft = i, 0 < i < 7.
ppTblRunBefore contains codes and values that correspond to JVTG050 zerosLeft > 6.
The HuffmanTableInitAlloc function must be used to create ppTblTotalZeros and ppTblRunBefore tables.