|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectjavaFlacEncoder.LPC
public class LPC
This class is used to calculate LPC Coefficients for a FLAC stream.
| Field Summary | |
|---|---|
protected int |
order
The order of this LPC calculation |
protected double[] |
rawCoefficients
The coefficients as calculated by the LPC algorithm |
protected double |
rawError
The error calculated by the LPC algorithm |
| Constructor Summary | |
|---|---|
LPC(int order)
Constructor creates an LPC object of the given order. |
|
| Method Summary | |
|---|---|
static void |
calculate(LPC lpc,
long[] R)
Calculate an LPC using the given Auto-correlation data. |
static void |
calculateFromPrior(LPC lpc,
long[] R,
LPC priorLPC)
Calculate an LPC using a prior order LPC's values to save calculations. |
static void |
createAutoCorrelation(long[] R,
int[] samples,
int count,
int start,
int increment,
int maxOrder)
Create auto-correlation coefficients(up to a maxOrder of 32). |
double[] |
getCoefficients()
Get the calculated LPC Coefficients as an array. |
double |
getError()
Get the error for this LPC calculation |
int |
getOrder()
Get this LPC object's order |
static void |
window(int[] samples,
int count,
int start,
int increment,
int[] windowedSamples)
Apply a window function to sample data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double rawError
protected double[] rawCoefficients
protected int order
| Constructor Detail |
|---|
public LPC(int order)
order - Order for this LPC calculation.| Method Detail |
|---|
public int getOrder()
public double getError()
public double[] getCoefficients()
public static void calculate(LPC lpc,
long[] R)
lpc - LPC to calculateR - Autocorrelation data to use
public static void calculateFromPrior(LPC lpc,
long[] R,
LPC priorLPC)
lpc - LPC to calculateR - Auto-correlation data to use.priorLPC - Prior order LPC to use(may be any order lower than our
target LPC)
public static void createAutoCorrelation(long[] R,
int[] samples,
int count,
int start,
int increment,
int maxOrder)
R - Array to put results in.samples - Samples to calculate the auto-correlation for.count - number of samples to usestart - index of samples array to start atincrement - number of indices to increment between valid samples(for
interleaved arrays)maxOrder - maximum order to calculate.
public static void window(int[] samples,
int count,
int start,
int increment,
int[] windowedSamples)
samples - Samples to apply window to. Values in this array are left
unaltered.count - number of samples to usestart - index of samples array to start atincrement - number of indices to increment between valid samples(for
interleaved arrays)windowedSamples - array containing windowed values. Return values
are packed(increment of one).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||