EncodeHuffman8x8_DCFirst_JPEG

Performs progressive encoding of the DC coefficient from an 8x8 block of the quantized DCT coefficients (first scan).

Syntax

IppStatus ippiEncodeHuffman8x8_DCFirst_JPEG_16s1u_C1(const Ipp16s* pSrc, Ipp8u*pDst, int dstLenBytes , int* pDstCurrPos, Ipp16s* pLastDC, int Al, IppiEncodeHuffmanSpec* pDcTable, IppiEncodeHuffmanState* pEncHuffState, int bFlushState);

Parameters

pSrc

Pointer to the 8x8 block of the quantized DCT coefficients.

pDst

Pointer to the buffer for the output bit stream.

dstLenBytes

Length in bytes of the buffer for the bit stream.

pDstCurrPos

Shift in bytes of the current byte in the output buffer.

pLastDC

Pointer to the DC coefficient of the previous 8x8 block.

Al

Successive approximation bit positions low, it specifies the actual point transform.

pDcTable

Pointer to the Huffman table for DC coefficients.

pEncHuffState

Pointer to the IppiEncodeHuffmanState structure.

bFlushState

Set it to 1 for the last 8x8 block in the scan

Description

The function ippiEncodeHuffman8x8_DCFirst_JPEG is declared in the ippj.h file. This function performs encoding of the DC coefficient from an 8x8 block of the quantized coefficients (progressive encoding, the first scan), using pDcTable table. The encoding procedure conforms to [ISO10918], Annex G.1.2, Progressive Encoding Procedures with Huffman. Only full bytes are written to the output buffer. The IppiEncodeHuffmanState structure collects the bits that do not make up a complete byte. To force adding the bits accumulated in IppiEncodeHuffmanState to the output buffer, set the parameter bFlushState to 1 for the last 8x8 block in the scan or restart interval being encoded. In all other cases it must be set to zero.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if one or all of the specified pointers are NULL.

ippStsJPEGOutOfBufErr

Indicates an error condition if the buffer limits are exceeded.

ippStsJPEGDCTRangeErr

Indicates an error condition if the DCT coefficient is out of the allowed range (-1023..1023).

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.