| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectjavaFlacEncoder.RiceEncoder
public class RiceEncoder
The RiceEncoder class is used to create FLAC-compliant rice-encoded residuals.
| Field Summary | |
|---|---|
static int | 
DEBUG_LEV
For debugging: Higher values equals greater output, generally in increments of 10  | 
| Constructor Summary | |
|---|---|
RiceEncoder()
Constructor.  | 
|
| Method Summary | |
|---|---|
static int | 
beginResidual(boolean useFiveBitParam,
              byte order,
              EncodedElement ele)
Create the residual headers for a FLAC stream.  | 
static int | 
calculateEncodeSize(int[] values,
                    int inputOffset,
                    int inputStep,
                    int inputCount,
                    int bitParam)
Calculate how large a given set of values will be once it has been rice-encoded.  | 
 int | 
encodeRicePartition(int[] values,
                    int inputOffset,
                    int inputStep,
                    int inputCount,
                    EncodedElement destEle,
                    int bitParam,
                    boolean fiveBitParam)
Rice-encode a set of values, adding necessary headers for FLAC format.  | 
static int | 
encodeRicePartitionEscaped(int[] values,
                           int inputOffset,
                           int inputStep,
                           int inputCount,
                           EncodedElement destEle,
                           int bitParam,
                           boolean fiveBitParam)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static int DEBUG_LEV
| Constructor Detail | 
|---|
public RiceEncoder()
| Method Detail | 
|---|
public static int beginResidual(boolean useFiveBitParam,
                                byte order,
                                EncodedElement ele)
useFiveBitParam - Set TRUE if using a five-bit parameter size, FALSE
        for a four-bit parameterorder - Specify order of partitions to be used(actual number of
              partitions will be 2^order.ele - EncodedElement to write header to.
public static int encodeRicePartitionEscaped(int[] values,
                                             int inputOffset,
                                             int inputStep,
                                             int inputCount,
                                             EncodedElement destEle,
                                             int bitParam,
                                             boolean fiveBitParam)
public int encodeRicePartition(int[] values,
                               int inputOffset,
                               int inputStep,
                               int inputCount,
                               EncodedElement destEle,
                               int bitParam,
                               boolean fiveBitParam)
values - array of integer values to saveinputOffset - start index in input arrayinputStep - number of values to skip between target values(for
        interleaved data.inputCount - number of total values to encodebitParam - rice-parameter to use. This value should be based upon
        the distribution of the input data(roughly speeking, each value
        will require at least bitParam+1 bits to save, so this value
        should reflect the average magnitude of input values.destEle - EncodedElement to save result to.fiveBitParam - Set true if this header should use a five-bit
 rice-parameter, false for a four bit parameter.
public static int calculateEncodeSize(int[] values,
                                      int inputOffset,
                                      int inputStep,
                                      int inputCount,
                                      int bitParam)
values - array of integer values to saveinputOffset - start index in input arrayinputStep - number of values to skip between target values(for
        interleaved data.inputCount - number of total values to encodebitParam - rice-parameter to use. This value should be based upon
        the distribution of the input data(roughly speeking, each value
        will require at least bitParam+1 bits to save, so this value
        should reflect the average magnitude of input values.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||