Encodes one row of the image.
IppStatus ippiPackBitsRow_TIFF_8u_C1(const Ipp8u* pSrc, int srcLenBytes, Ipp8u* pDst, int* pDstCurrPos, int dstLenBytes);
pSrc |
Pointer to the input buffer to keep Byte Segment or part of Byte Segment. |
srcLenBytes |
Length of the input buffer, bytes. |
pDst |
Pointer to the output buffer. |
pDstCurrPos |
Pointer to the current byte position in the output buffer. |
dstLenBytes |
Length of the output buffer, bytes. |
The function ippiPackBitsRow_TIFF is declared in the ippj.h file. This function encodes srcLenBytes data from the input buffer pSrc. Encoded data are stored in the output buffer pDst. The function uses the encoding scheme called PackBits (see pseudo-code below). The input buffer keeps the part of the Byte Segment that represens one row of an image. The output buffer is used to keep RLE compressed input data. The size of output buffer must be sufficient to keep at least one row of output RLE Segment. Its size can be estimated in accordance with the following formula:
dstLenBytes = srcLenBytes + (srcLenBytes + 127)/128 for the worst case.
The algorityhm can be expressed in the pseudo-code as follows:
a sequence of identical bytes (called as Replicate Run) is encoded as a two-byte code:
<-count + 1><byte value>, where count is number of bytes in the run, and 2 <= count <= 128
and a non repetitive sequence of bytes (called as Literal Run) is encoded as:
<count - 1><literal sequence of bytes>, where count is number of bytes in the sequence, and 1 <= count <= 128
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if pSrc or pDst pointer is NULL. |
ippStsSizeErr |
Indicates an error condition if pDstCurrPos has an illegal value, or if srcLenBytes has a negative value. |
ippStsUnderRunErr |
Indicates an error condition if size of the buffer pDst is insufficient to keep encoded row of the RLE Segment. |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.