Community
cancel
Showing results for 
Search instead for 
Did you mean: 
coolsandyforyou
Beginner
51 Views

problem with "ippiTransformQuantLumaDC_H264_16s_C1I " function

i wrote the following code to fine DCT and quantisation..but i m not getting correct result...

#include
#include
#include
#include
int main()
{
int i,j;
Ipp16s src[4*4]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
Ipp16s dst[4*4];
Ipp8s NumLevels;
Ipp8u LastCoeff;
Ipp16s pScanMatrix[16]={0,1,5,6,2,4,7,12,3,8,11,13,9,10,14,15};
long int a,b;
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%3d",src[i*4+j]);
printf("\n");
}

ippiTransformQuantLumaDC_H264_16s_C1I(src,dst,28,&NumLevels, 0,pScanMatrix, &LastCoeff);

for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%3d",dst[i*4+j]);
printf("\n");
}

printf("NumLevels=%d\n",NumLevels);
printf("LastCoeff=%d\n",LastCoeff);
return(0);
}


help required in this regard..
thank you..
0 Kudos
1 Reply
coolsandyforyou
Beginner
51 Views

Quoting - coolsandyforyou
i wrote the following code to fine DCT and quantisation..but i m not getting correct result...

#include
#include
#include
#include
int main()
{
int i,j;
Ipp16s src[4*4]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
Ipp16s dst[4*4];
Ipp8s NumLevels;
Ipp8u LastCoeff;
Ipp16s pScanMatrix[16]={0,1,5,6,2,4,7,12,3,8,11,13,9,10,14,15};
long int a,b;
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%3d",src[i*4+j]);
printf("n");
}

ippiTransformQuantLumaDC_H264_16s_C1I(src,dst,28,&NumLevels, 0,pScanMatrix, &LastCoeff);

for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%3d",dst[i*4+j]);
printf("n");
}

printf("NumLevels=%dn",NumLevels);
printf("LastCoeff=%dn",LastCoeff);
return(0);
}


help required in this regard..
thank you..

it worked , i gave NeedTransform field =1 and it worked well..
Reply