EncodeRLE

Performs RLE encoding.

Syntax

IppStatus ippsEncodeRLE_8u(const Ipp8u** ppSrc, int* pSrcLen, Ipp8u* pDst, int* pDstLen);

Parameters

ppSrc

Double pointer to the source data buffer.

pSrcLen

Pointer to the number of elements in the source buffer after encoding point to the number of remaining elements.

pDst

Pointer to the destination data buffer.

pDstLen

Pointer to the number of elements in the destination buffer, after encoding to the actual number of elements in the destination buffer.

Description

The function ippsEncodeRLE is declared in the ippdc.h file. This function performs RLE encoding pSrcLen elements of the source data buffer ppSrc and stores the result in the buffer pDst. After encoding the function updates the pSrcLen thus it points to the number of remaining elements of the source buffer, and pDstLen points to the actual number of elements stored in the destination buffer.

Sometimes the number of output elements can exceed the specified size of destination buffer. In this case the function returns the warning message and pointer to the number of not-encoded source elements. The user can call the function ippsEncodeRLE again to complete encoding.

Code example  shows how to use the function ippsEncodeRLE_8u.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specicifed pointers is NULL.

ippStsSizeErr

Indicates an error if pSrcLen or pDstLen is less than or equal to 0.

ippStsDstSizeLessExpected

Indicates a warning if size of the destination buffer is insufficient to store all output elements.

Submit feedback on this help topic

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