EncodeHuffman8X8_DCRefine

Encode progressive DC subsequent

Synopsis

FwStatus   fwiEncodeHuffman8x8_DCRefine_JPEG_16s1u_C1 ( const Fw16s * pSrcFw8u * pDstint dstLenBytesint * pDstCurrPosint AlFwiEncodeHuffmanState * pEncHuffStateint bFlushState );

Parameters

Al   Progressive JPEG successive approximation parameter for actual point transform.
bFlushState   Indicates the last 8X8 block in a scan.
dstLenBytes   Destination buffer length in bytes.
pDst   Pointer to a location in a destination buffer.
pDstCurrPos   Pointer to the shift value at the current destination buffer in bytes.
pEncHuffState   Pointer to the FwiEncodeHuffmanState structure.
pSrc   Pointer to a location in a source buffer.

Description

This function performs a subsequent scan for progressive encoding of the DC coefficient of an 8X8 data block.

The encoding process follows CCITT Rec. T.81, Annex G.1.2. The function writes only full bytes to the output buffer.

Incomplete bits from data blocks in a stream are accumulated in the Huffman encode state structure.

To place all the accumulated bits in the buffer, set the bFlashState bit to 1 before processing the last 8X8 block in the stream, or restart the encoded interval.