- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
#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..
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
}
#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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page