fi.helsinki.cs.ohtu.mpeg2.audio.mpa
Class MP2Quantizer

java.lang.Object
  extended by fi.helsinki.cs.ohtu.mpeg2.audio.mpa.MP2Quantizer

public class MP2Quantizer
extends java.lang.Object

This class implements the quantizer specified in ISO 11172-3. The quantizer is used by the class MP2Encoder to map samples in floating-point form into a set of non-negative integers. The sets are determined by the class BitAllocator and defined in the QuantizationTables class. The allowed input range of sample values is [-1.0, 1.0).


Constructor Summary
private MP2Quantizer()
           
 
Method Summary
static int[][][] quantize(QuantizationTables.QuantizationTable qtable, double[][][] sbsamples, int[][] scales, int[] bitAllocs)
          Quantizes the sub-band samples.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MP2Quantizer

private MP2Quantizer()
Method Detail

quantize

public static int[][][] quantize(QuantizationTables.QuantizationTable qtable,
                                 double[][][] sbsamples,
                                 int[][] scales,
                                 int[] bitAllocs)
Quantizes the sub-band samples.

Parameters:
qtable - QuantizationTable @see QuantizationTables.QuantizationTable
sbsamples - Sub-band samples [channel][subband][36]
scales - Scale factor indices [subband][sbslimit]
bitAllocs - Quantization levels [subband]
Returns:
Quantized samples of the sub-bands, in three groups of 12 samples