fi.helsinki.cs.ohtu.mpeg2.audio.mpa
Class BitAllocator.Allocation

java.lang.Object
  extended by fi.helsinki.cs.ohtu.mpeg2.audio.mpa.BitAllocator.Allocation
Enclosing class:
BitAllocator

public static class BitAllocator.Allocation
extends java.lang.Object

Represents a bit allocation for a frame of audio samples.


Field Summary
private  int bitsUsed
          The number of bits used.
private  int[][] qlevels
          The quantization levels.
 
Constructor Summary
BitAllocator.Allocation(int[][] qlevels, int bitsUsed)
          Creates a new Allocation.
 
Method Summary
 int getBitsUsed()
          Returns the number of data bits this Allocation uses in an encoded form.
 int[][] getQLevels()
          Returns the quantization levels for this Allocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qlevels

private final int[][] qlevels
The quantization levels.


bitsUsed

private final int bitsUsed
The number of bits used.

Constructor Detail

BitAllocator.Allocation

public BitAllocator.Allocation(int[][] qlevels,
                               int bitsUsed)
Creates a new Allocation.

Parameters:
qlevels - the quantization levels [channel][subband]
bitsUsed - the number of bits used
Method Detail

getQLevels

public int[][] getQLevels()
Returns the quantization levels for this Allocation.

Returns:
the quantization levels

getBitsUsed

public int getBitsUsed()
Returns the number of data bits this Allocation uses in an encoded form.

Returns:
number of bits used