org.kc7bfi.jflac
Class FixedPredictor

java.lang.Object
  extended by org.kc7bfi.jflac.FixedPredictor

public class FixedPredictor
extends Object

Fixed Predictor utility class.

Author:
kc7bfi

Constructor Summary
FixedPredictor()
           
 
Method Summary
static int computeBestPredictor(int[] data, int dataLen, double[] residualBitsPerSample)
          Compute the best predictor order.
static int computeBestPredictorWide(int[] data, int dataLen, double[] residualBitsPerSample)
          Compute the best predictor order.
static void computeResidual(int[] data, int dataLen, int order, int[] residual)
          Compute the residual from the compressed signal.
static void restoreSignal(int[] residual, int dataLen, int order, int[] data, int startAt)
          Restore the signal from the fixed predictor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedPredictor

public FixedPredictor()
Method Detail

computeBestPredictor

public static int computeBestPredictor(int[] data,
                                       int dataLen,
                                       double[] residualBitsPerSample)
Compute the best predictor order.

Parameters:
data -
dataLen -
residualBitsPerSample -
Returns:

computeBestPredictorWide

public static int computeBestPredictorWide(int[] data,
                                           int dataLen,
                                           double[] residualBitsPerSample)
Compute the best predictor order.

Parameters:
data -
dataLen -
residualBitsPerSample -
Returns:

computeResidual

public static void computeResidual(int[] data,
                                   int dataLen,
                                   int order,
                                   int[] residual)
Compute the residual from the compressed signal.

Parameters:
data -
dataLen -
order -
residual -

restoreSignal

public static void restoreSignal(int[] residual,
                                 int dataLen,
                                 int order,
                                 int[] data,
                                 int startAt)
Restore the signal from the fixed predictor.

Parameters:
residual - The residual data
dataLen - The length of residual data
order - The preicate order
data - The restored signal (output)
startAt - The starting position in the data array


Copyright © 2004-2011. All Rights Reserved.