Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 4 - Lossy (Part 3)
Date: Fri Oct 19 2001 5:49 pm
Author: Vangaalen, Alexander <av@andrew.cmu.edu>
Subject: DCT correctness 2

My results from DCT seem screwy. For example, the "java" bitmap has a white field. And from some debugging statements I get, white is represented by the byte -2. Here is my process in rough pseudocode, of one byte, with real resultant output.

1. byte bt = in.readByte() = -2
2. double db = (double)bt = -2.0
3. double dct = DCT of bt = on the order of E-17 for many cases
4. byte theByte = theGivenByteProcess = 0;
5. out.writeByte(theByte);

0, from what I can tell, is black. So I have now transformed my white background into a black background. What am I doing wrong?
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
DCT correctness 2      Vangaalen, Alexander      Fri Oct 19 2001 5:49 pm       
Re: DCT correctness 2      Maxim, Michael G.      Sun Oct 21 2001 11:49 pm       
Re: DCT correctness 2      Cipriani, Jason A.      Wed Oct 24 2001 12:12 am       

Back to previous screen