reset password
Author Message
kknaur
Posts: 540
Posted 19:03 May 12, 2011 |

If you perform DCT on an 8x8 block and then perform the Inverse DCT right away on the same block without doing any quantization should you get the same values for the 8x8 block back?

kwalitv
Posts: 2
Posted 19:12 May 12, 2011 |

I am not sure myself because when i apply DCT and Inverse  DCT without quantization, some how my result (Fxy) dont match the original (Fxy). So when I use the result (Fxy) to recover Y, Cb, Cr image it look totally wrong. I recheck my formular for DCT and IDCT and it's seem to be correct. So I dont know are we suppose to have the same values or not? Can anybody clear this?

Thank

kknaur
Posts: 540
Posted 19:36 May 12, 2011 |

Ok I think I just answered my own question.  Which is yes they should be the same or nearly the same


Here are my results on the first row of the first 8x8 block for my Y in the Ducky image.


Before DCT:

127.0
127.0
127.0
127.0
127.0
127.0
127.0
127.0


After DCT:

1015.9999999999998
8.038873388460928E-14
-1.1807095289301988E-13
6.029155041345696E-14
4.019436694230464E-14
3.215549355384371E-13
-2.009718347115232E-13
-1.0174199132270861E-13

After Inverse DCT:

127.00000000000013
127.00000000000009
127.00000000000009
127.00000000000018
127.00000000000007
127.00000000000009
127.00000000000014
127.00000000000001

Last edited by kknaur at 19:51 May 12, 2011.