Finds optimal vector set for specified number of codebooks.
IppStatus ippsVQIndexSelect_32f(const Ipp32f* pSrc, const Ipp32f* pWeights, int nDiv, const Ipp32s* pLengths, int nCand, int** ppPolbits, Ipp32s** ppIndx, Ipp32s** ppSign, IppsVQCodeBookState_32f** ppCodeBooks, int nCodeBooks);
pSrc |
Pointer to the source vector. |
pWeights |
Pointer to the vector of weights. |
nDiv |
Number of fragmentations of the pSrc and pWeights vectors. |
pLengths |
Pointer to an array of lengths of fragmentations. |
nCand |
Number of input candidates. |
ppPolbits |
Double pointer to the value that indicates whether one or two norms must be used to compute the optimal vector set for the specified number of codebooks. |
ppIndx |
Double pointer to the output vectors of indexes. |
ppSign |
Double pointer to the output vectors of signs. The value of 1 indicates that the minimal distortion appears when the norm is negative. The value of 0 indicates that the minimal distortion appears when the norm is positive. |
ppCodeBooks |
Doubleo pointer to the initialized codebook state structures. |
nCodeBooks |
Number of codebooks. |
This function is declared in the ippac.h header file. The function computes nCand vectors for each codebook by the following formula:
If polbits[ idiv] is 1, the following distortion is also calculated
for idiv=0 to nDiv -1, icb - number of codebook line.
The function subsequently restores vectors for all possible combinations of indexes across the specified number of codebooks then computes the distortion against the source vector. The function then returns the combination that provides for the minimal distortion. The following formula serves for computing of the distortion for the given fragmentation idiv with the specified quantization vectors icb[i], where i is within the range of [0,nCodeBooks -1].
for idiv=0 to nDiv -1, icb - number of codebook line.
In these formulas
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when one of the specified pointers is NULL. |
You can use this function instead of calling the functions ippsVQPreliminarySelect and ippsVQMainSelect to save time and memory cost.
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.