Bendigi
Guest
|
Posted:
Mon Dec 05, 2005 1:16 am Post subject:
Re: DCT & IDCT (AAN) method |
|
|
Btw:
As of now I have implemented also the Integer version of the IDCT
described in the above library but I get wierd results.
It's actually pretty funny, i'm gonna try to describe the problem.
FUNNY #1
------------------------------------------------------------------------------------------------------
When I scale the quantizing tables using the
INTEGER AANScaleFactor and use INTEGER DCT and IDCT i get:
ORIGINAL
-----------------------
87 99 104 104 103 102 108 113
86 98 104 103 103 104 109 116
83 96 99 101 101 103 108 115
79 91 96 97 100 102 105 111
77 90 97 100 99 100 103 109
77 93 99 100 99 99 103 109
78 93 99 99 99 101 103 110
79 92 98 100 102 100 103 110
EXTRACTED
-----------------------
126 128 126 126 126 126 126 126
126 126 128 128 126 126 126 128
126 128 126 126 128 126 128 126
126 126 126 126 128 126 126 126
126 126 126 126 126 126 126 126
126 128 126 128 128 126 128 126
126 126 128 126 126 128 126 126
126 126 126 128 128 126 128 126
FUNNY #2
------------------------------------------------------------------------------------------------------
When I scale the quantizing tables using the
FLOAT AANScaleFactor and use FLOAT DCT and IDCT i get:
ORIGINAL
-----------------------
87 99 104 104 103 102 108 113
86 98 104 103 103 104 109 116
83 96 99 101 101 103 108 115
79 91 96 97 100 102 105 111
77 90 97 100 99 100 103 109
77 93 99 100 99 99 103 109
78 93 99 99 99 101 103 110
79 92 98 100 102 100 103 110
EXTRACTED
-----------------------
0 0 0 0 0 0 0 12
0 0 0 0 0 0 0 33
0 0 0 0 0 0 0 24
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
FUNNY #3
------------------------------------------------------------------------------------------------------
but when I scale the quantizing tables using the
INTEGER AANScaleFactor and use FLOAT DCT and IDCT i get:
ORIGINAL
-----------------------
87 99 104 104 103 102 108 113
86 98 104 103 103 104 109 116
83 96 99 101 101 103 108 115
79 91 96 97 100 102 105 111
77 90 97 100 99 100 103 109
77 93 99 100 99 99 103 109
78 93 99 99 99 101 103 110
79 92 98 100 102 100 103 110
EXTRACTED
-----------------------
85 98 104 104 101 101 107 114
84 97 103 103 102 103 109 116
81 94 98 100 100 102 107 116
77 89 95 97 99 101 106 111
74 88 96 99 98 99 104 109
74 91 98 100 97 98 102 110
75 91 98 97 98 99 103 110
77 91 96 99 101 99 103 110
PRETTY CLOSE BUT I NEED TO MAKE SURE IT'S CORRECT and I have also tried
to use the FLOAT Scale and the Integer and bad results as well, I can't
pinpoint the problem since it works in that particular case. Any
suggestions ?
/////////////////////////////////////////////////////////////////////////////////////
THE FLOAT SCALE
public double AANscaleFactor1[] = {
1.0, 1.387039845, 1.306562965, 1.175875602,
1.0, 0.785694958, 0.541196100, 0.275899379
};
////////////////////////////////////////////////////////////////////////////////////
THE INTEGER SCALE
public int AANscaleFactor2[] = {
/* precomputed values scaled up by 14 bits */
16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270,
21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906,
19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315,
16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552,
8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446,
4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247
}; |
|