DecodeHuffman8X8_Direct

Decode data block without bit accumulation

Synopsis

FwStatus   fwiDecodeHuffman8x8_Direct_JPEG_1u16s_C1 ( const Fw8u * pSrcint * pSrcBitsLenFw16s * pDstFw16s * pLastDCint * pMarkerFw32u * pPrefetchedBitsint * pNumValidPrefetchedBitsconst FwiDecodeHuffmanSpec * pDcTableconst FwiDecodeHuffmanSpec * pAcTable );

Parameters

pAcTable   Pointer to the Huffman AC coefficient table.
pDcTable   Pointer to the Huffman DC coefficient table.
pDst   Pointer to a location in a destination buffer.
pLastDC   Pointer to the last DC coefficient, which is in the previous 8X8 block.
pMarker   Pointer to the JPEG marker position.
pNumValidPrefetchedBits   Pointer to the value of valid bits in the prefetched buffer.
pPrefetchedBits   Pointer to the prefetched buffer, which contains decoded data from the previous block.
pSrc   Pointer to a location in a source buffer.
pSrcBitsLen   Pointer to the source buffer length in bits.

Description

This function performs direct decoding of an 8X8 data block of Huffman-encoded quantized DC and AC DCT coefficients.

The decoding process follows CCITT Rec. T.81, Annex F.2.2.

The function writes only full bytes to the destination buffer. Incomplete bits from data blocks are not accumulated in the Huffman decode state structure.

When the function detects a JPEG marker, it stops decoding and writes the marker to the location specified by pMarker.

During function initialization, make sure that pLastDC, pMarker, and pNumValidPrefetchedBits are cleared to all zeroes.

After each restart interval, make sure that pLastDC and pNumValidPrefetchedBits are cleared to all zeroes.

After each found marker has been processed, make sure that pMarker and pNumValidPrefetchedBits are cleared to all zeroes.