Reconstruct intra frame DCT block (MPEG-1)
FwStatus | fwiReconstructDCTBlockIntra_MPEG1_32s | ( | Fw32u ** ppBitStream, int * pOffset, const Fw32s * pDCSizeTable, const Fw32s * pACTable, Fw32s * pScanMatrix, int QP, Fw16s * pQPMatrix, Fw16s * pDCPred, Fw16s * pDstBlock, Fw32s * pDstSize ); |
QP | Quantizer scale factor read from the bitstream. | |
pACTable | Pointer to a table containing run-level codes for all DCT coefficients other than the first one. | |
pDCPred | Pointer to a value to be added to the DC coefficient. The value is read from the standard table. | |
pDCSizeTable | Pointer to a table containing codes for the DC coefficient (the first of the DCT coefficients). | |
pDstBlock | Pointer to a block of decoded elements. | |
pDstSize | Pointer to the position of the last non-zero block coefficient in scanning sequence. | |
pOffset | Pointer to the offset between the bit that ppBitStream points to and the start of the code. | |
pQPMatrix | Pointer to a standard or user-defined weighting matrix. | |
pScanMatrix | Pointer to a matrix containing indices of elements in a scanning sequence. | |
ppBitStream | Double pointer to the current position in the bit stream. |
This function reconstructs an 8x8 DCT block for intra frames in accordance with the MPEG-1 standard.
The function first decodes 64 quantised DCT coefficients from the bitstream using the run-level tables of the MPEG-1 standard. The coefficients are then rearranged as an 8x8 block as specified by pScanMatrix and inverse quantization is performed. The function also performs saturation and mismatch control in accordance with the MPEG-1 standard.
The pDCSizeTable is used to decode the DC coefficient and the pACTable is used to decode the AC coefficients. The quantizing scale factor Qp and pQPMatrix are used to perform inverse quantization. The reconstructed 8x8 block of DCT coefficients is written to pDstBlock. Pointer *pDstSize indicates the position of the last non-zero coefficient. The pointers ppBitStream and pOffset are updated to the position in the bitstream where decoding of the next 8x8 block begins.