Re: confusions about qbits and quant coef matrix

"Aitor Garay" <[email protected]> Tue, 15 Apr 2003 16:16:58 +0200
Newsgroups gmane.comp.video.h264.devel
Message-ID <002a01c30359$adbc0920$bcb31fac@HAJC0062>
    In the reference software the positions with factors (b^2)/4 and ab/2 have
been modified, but i ignore the rationale they followed to do so.  It's OK to
modify the forward quantizer since it is not standarised, only the rescaling
process is binded to the standard.

    /AITOR

----- Original Message ----- 
From: "Eric Miao" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 15, 2003 3:18 PM
Subject: [Hdot264-devel] confusions about qbits and quant coef matrix


> Hi,
> 
> In jvt-b038.doc, qbits = 17 + QP/6.
> But I also noted that in some articles and jm6 ref
> software, qbits = 15 + QP/6.
> What is right?
> 
> And I also calculated quant coef matrix according to
> equation: MF/qbits = PF/qstep.
> My result is 
>  a^2   (b^2)/4 (ab)/2
> 13107     5243     8290
> 11916     4766     7536
> 10082     4033     6377
>  9362     3745     5921
>  8192     3277     5181
>  7282     2913     4605
> But it is different from the one used in jm61
> software,
> mainly column 2 and column 3.
> The following is used in jm61:
>  a^2   (b^2)/4 (ab)/2
> 13107 5243 8066
> 11916 4660 7490
> 10082 4194 6554
>  9362 3647 5825
>  8192 3355 5243
>  7282 2893 4559
> 
> Attached is a c file I used to calculate the matrix.
> Can anyone point out any wrong in my implem?
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com


--------------------------------------------------------------------------------


> #include <stdio.h>
> #include <math.h>
> 
> static double quantStep[6] =
> {
>     0.625,
>     0.6875,
>     0.8125,
>     0.875,
>     1.0,
>     1.125
> };
> 
> static double postScalingFactor[3];
> 
> int
> main()
> {
>     double a, b;
>     int i;
> 
>     a = 0.5;
>     b = sqrt(0.4);
> 
>     postScalingFactor[0] = a * a;
>     postScalingFactor[1] = (b * b) / 4;
>     postScalingFactor[2] = (a * b) /2;
> 
>     for(i = 0; i < 6; i++)
>     {
>         printf("%8d %8d %8d\n",
>                (int)((postScalingFactor[0] * 32768) / quantStep[i] + 0.5),
>                (int)((postScalingFactor[1] * 32768) / quantStep[i] + 0.5),
>                (int)((postScalingFactor[2] * 32768) / quantStep[i] + 0.5));
>     }
> 
>     return 0;
> }
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf