question about fixed-integer precision in digital signal processing?
Dear all,
I am studying 2D DCT for an image. The 2D DCT can be summarized as computing
Y=T*X*T', where X is the input matrix, T is the 2D DCT basis matrix, Y is
the output.
X is integer 0-255. T is real-valued, 0 - 1.
In order to convert real-valued T to integers, I multiply T with 256(left
shift), and round it to integer, and use these new integer values in my
computing.
Now Y will be larger than its correct value by a factor of 256*256, so I
will divide it by 65536(right shift the result by 16 bits to get correct
result).
My question is, is my approach correct?
How many bits I need to allocate for internal matrix computation and the
output?
Is there any better approach to save some datawidth?
In general, are there any resources to study for dealing with
real-to-integer conversion?
Thanks a lot,
-Walala
|