edu.virginia.cs.mng.hypercast.demo
Class DCT
java.lang.Object
|
+--edu.virginia.cs.mng.hypercast.demo.DCT
- class DCT
- extends java.lang.Object
|
Constructor Summary |
DCT(int QUALITY)
Constructs a new DCT object. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
N
public int N
- DCT Block Size - default 8
QUALITY
public int QUALITY
- Image Quality (0-100) - default 80 (good image / good compression)
quantum
public java.lang.Object[] quantum
Divisors
public java.lang.Object[] Divisors
quantum_luminance
public int[] quantum_luminance
- Quantitization Matrix for luminace.
DivisorsLuminance
public double[] DivisorsLuminance
quantum_chrominance
public int[] quantum_chrominance
- Quantitization Matrix for chrominance.
DivisorsChrominance
public double[] DivisorsChrominance
DCT
public DCT(int QUALITY)
- Constructs a new DCT object. Initializes the cosine transform matrix
these are used when computing the DCT and it's inverse. This also
initializes the run length counters and the ZigZag sequence. Note that
the image quality can be worse than 25 however the image will be
extemely pixelated, usually to a block size of N.
- Parameters:
QUALITY - The quality of the image (0 worst - 100 best)
initMatrix
private void initMatrix(int quality)
forwardDCTExtreme
public double[][] forwardDCTExtreme(float[][] input)
forwardDCT
public double[][] forwardDCT(float[][] input)
quantizeBlock
public int[] quantizeBlock(double[][] inputData,
int code)
quantizeBlockExtreme
public int[] quantizeBlockExtreme(double[][] inputData,
int code)