TER.TERdecoder.BPEDecoder
Class RefineGenerationAC

java.lang.Object
  extended by TER.TERdecoder.BPEDecoder.RefineGenerationAC

public class RefineGenerationAC
extends java.lang.Object


Field Summary
(package private)  byte[][][][] blockStatus
          Definition in CodeBlockAC.blockStatus
(package private)  int[] BP
           
(package private)  int channel
           
(package private)  ACEntropyDecoder entropyDecoder
           
(package private)  float gamma
           
(package private)  int generation
           
(package private)  boolean minusHalf
           
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  float[][][] recoveredImage
           
(package private)  int threshold
           
(package private)  int WTLevels
           
(package private)  int[] xInit
           
(package private)  int[] yInit
           
 
Constructor Summary
RefineGenerationAC(float[][][] recoveredImage)
           
 
Method Summary
 byte[][][][] getBlockStatus()
           
private  float getGamma(int bitPlane, boolean lastBitPlane)
          Get the value to be added or substracted to get the desired approximation of the refined value
 float[][][] getRecoveredImage()
           
private  boolean lastBitPlane(int bitPlane, int rLevel, int subband)
          Indicates if a bitplane if the last for a given bit plane
 void run(int bitplane)
          Decode as many generations as the user indicates in the parameters
 void setParameters(ACEntropyDecoder entropyDecoder, byte[][][][] blockStatus, int WTLevels, int resolutionLevel, int[] BP, int[] xInit, int[] yInit, int channel, float gamma, boolean minusHalf)
           
private  void setRefinedValue(int family, int y, int x, int refinementBit, float gammaT, float previousGammaT)
           
private  void setThreshold(int bitplane)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entropyDecoder

ACEntropyDecoder entropyDecoder

recoveredImage

float[][][] recoveredImage

parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.


blockStatus

byte[][][][] blockStatus
Definition in CodeBlockAC.blockStatus


xInit

int[] xInit

yInit

int[] yInit

channel

int channel

generation

int generation

WTLevels

int WTLevels

BP

int[] BP

threshold

int threshold

gamma

float gamma

minusHalf

boolean minusHalf
Constructor Detail

RefineGenerationAC

public RefineGenerationAC(float[][][] recoveredImage)
Method Detail

setParameters

public void setParameters(ACEntropyDecoder entropyDecoder,
                          byte[][][][] blockStatus,
                          int WTLevels,
                          int resolutionLevel,
                          int[] BP,
                          int[] xInit,
                          int[] yInit,
                          int channel,
                          float gamma,
                          boolean minusHalf)

run

public void run(int bitplane)
         throws java.lang.Exception
Decode as many generations as the user indicates in the parameters

Parameters:
bitplane - indicates the bit plane that must be refined
Throws:
java.lang.Exception - when something goes wrong and the AC decoding must be stoped

setThreshold

private void setThreshold(int bitplane)

setRefinedValue

private void setRefinedValue(int family,
                             int y,
                             int x,
                             int refinementBit,
                             float gammaT,
                             float previousGammaT)

getGamma

private float getGamma(int bitPlane,
                       boolean lastBitPlane)
Get the value to be added or substracted to get the desired approximation of the refined value

Parameters:
bitPlane - indicates the bit plane that must be refined
lastBitPlane - indicates if this bit plane is the last to be refined
Returns:
an integer that contains the value to be added or substracted to reach the desired approximation

lastBitPlane

private boolean lastBitPlane(int bitPlane,
                             int rLevel,
                             int subband)
Indicates if a bitplane if the last for a given bit plane

Parameters:
bitPlane - indicates the bit plane that is being refined
rLevel - indicates the resolution level that is being refined
subband - indicates the family that is being refined
Returns:
a boolean indicating if this is the last bit plane to be refined for this subband

getRecoveredImage

public float[][][] getRecoveredImage()

getBlockStatus

public byte[][][][] getBlockStatus()


TER - Copyright (C) 2006
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) - UAB (Spain)