Performs Huffman encoding of one row of differences for each color component in the JPEG scan.
IppStatus ippiEncodeHuffmanRow_JPEG_16s1u_P4C1(const Ipp16s* pSrc[4], int nSrcLen, int nSrcRows, Ipp8u* pDst, int nDstLenBytes, int* pDstCurrPos, const IppiEncodeHuffmanSpec* pEncHuffTable[4], IppiEncodeHuffmanState* pEncHuffState, int bFlushState);
pSrc |
Array of pointers to the differences to be encoded. It can be NULL if bFlusfState = 1. |
nSrcLen |
Number of elements in the input rows (should be the same for all rows). |
nSrcRows |
Number of rows (one row for every color component in JPEG scan). |
pDst |
Pointer to the output bitstream buffer. |
nDstLenBytes |
Number of available bytes in the output buffer. |
pDstCurrPos |
Pointer to the current byte in the output buffer. This pointer is updated in the function. |
pEncHuffTable |
Pointer to the IppiEncodeHuffmanSpec structure (one for every color component in JPEG scan) that contains the Huffman code table. This pointer can be NULL if bFlusfState = 1 or if there is no corresponding color component. |
pEncHuffState |
Pointer to the IppiEncodeHuffmanState structure that contains the Huffman encoder state. |
bFlushState |
Setting this parameter to 1 forces the function to flush collected bits from the state structure to the bitstream, setting it to 0 forces to perform encoding. |
The function ippiEncodeHuffmanRow_JPEG is declared in the ippj.h file. This function encodes nSrcRows rows (up to 4, one for every color component) containing nSrcLen elements of differences pointed by pointers in the aray pSrc[4] using corresponding Huffman code tables pEncHuffTable[4]. If number of components is less than 4, corresponding pointers are not specifed.
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 the IppiEncodeHuffmanState to the output buffer, the parameter bFlushState should be set to 1 when the last sample in scan or restart interval is encoded. In all other cases this parameter must be set to zero.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
When bFlushState=0, indicates an error condition if one of the specified pointers is NULL, When bFlushState=1, indicates an error condition if one of the pDst, pDstCurrPos or pEncHuffState pointers is NULL. |
ippStsSizeErr |
Indicates an error condition if the nDstLenBytes parameter has zero or negative value, or if pDstCurrPos is out of nDstLenBytes limit. |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.