Encode progressive AC initial


FwStatus   fwiEncodeHuffman8x8_ACFirst_JPEG_16s1u_C1 ( const Fw16s * pSrcFw8u * pDstint dstLenBytesint * pDstCurrPosint Ssint Seint Alconst FwiEncodeHuffmanSpec * pAcTableFwiEncodeHuffmanState * pEncHuffStateint bFlushState );


Al   Progressive JPEG successive approximation parameter for actual point transform.
Se   Progressive JPEG spectral selection end index.
Ss   Progressive JPEG spectral selection start index.
bFlushState   Indicates the last 8X8 block in a scan.
dstLenBytes   Destination buffer length in bytes.
pAcTable   Pointer to the Huffman AC coefficient table.
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.


This function performs the first scan for progressive encoding of the AC coefficients 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.