MTFFwd

Performs the forward MTF transform.

Syntax

IppStatus ippsMTFFwd_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppMTFState_8u* pMTFState);

Parameters

pSrc

Pointer to the source buffer.

pDst

Pointer to the destination buffer.

srcLen

Number of elements in the source and destination buffers.

pMTFState

Pointer to the MTF structure.

Description

The function ippsMTFFwd is declared in the ippdc.h file. This function performs the forward MTF transform of len elements of the data in the source buffer pSrc and stores result in the buffer pDst. The parameters of the MTF transform are specified in the MTF structure pMTFState that must be initialized by the functions ippsMTFInitAlloc or ippsMTFInit beforehand.

Example below shows how to use the function ippsMTFFwd_8u.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

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

Using the Function ippsMTFFwd

void func_MTF()
{    
    IppMTFState_8u* ppMTFState;
    Ipp8u pSrc[] = "adadasdasd";
    Ipp8u  pDst[10];
    int len = 10;
 		
    ippsMTFInitAlloc_8u(&ppMTFState);
    ippsMTFFwd_8u( pSrc, pDst, len, ppMTFState);
}
Result:  pDst -> 97 100 1 1 1 115 2 2 2 2

	

Submit feedback on this help topic

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