Performs the inverse BWT transform.
IppStatus ippsBWTInv_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, int index, Ipp8u* pBWTInvBuff);
pSrc |
Pointer to the source vector. |
pDst |
Pointer to the destination vector. |
len |
Number of elements in the source and destination vectors. |
index |
Index of first position for the inverse BWT transform. |
pBWTInvBuff |
Pointer to the additional buffer. |
The function ippsBWTInv is declared in the ippdc.h file. This function performs the inverse BWT transform of len elements starting from pIndex element of the source vector pSrc and stores result in the vector pDst. The function uses the external buffer pBWTInvBuff. The size of this buffer must be computed by calling the function ippsBWTInvGetSize beforehand.
Example below shows how to use the function ippsBWTInv_8u.
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. |
void func_BWT()
{
int wndSize = 8;
int pBWTFwdBuffSize;
int pBWTInvBuffSize;
Ipp8u pSrc[] = "baadeffg";
int len = 8;
int pIndex;
Ipp8u* pDst = ippsMalloc_8u(len);
Ipp8u* pDstInv = ippsMalloc_8u(len);
ippsBWTFwdGetSize_8u(wndSize, &pBWTFwdBuffSize);
Ipp8u* pBWTFwdBuff = ippsMalloc_8u(pBWTFwdBuffSize);
ippsBWTFwd_8u(pSrc, pDst, len, &pIndex, pBWTFwdBuff);
ippsBWTInvGetSize_8u( wndSize, &pBWTInvBuffSize);
Ipp8u* pBWTInvBuff = ippsMalloc_8u(pBWTInvBuffSize);
ippsBWTInv_8u(pDst, pDstInv, len, pIndex, pBWTInvBuff);
}
Result:
pDst -> "bagadeff"
pDstInv -> "baadeffg"
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.