jj2000.j2k.entropy
Class CBlkSizeSpec

java.lang.Object
  |
  +--jj2000.j2k.ModuleSpec
        |
        +--jj2000.j2k.entropy.CBlkSizeSpec
All Implemented Interfaces:
java.lang.Cloneable

public class CBlkSizeSpec
extends ModuleSpec

This class extends ModuleSpec class for code-blocks sizes holding purposes.

It stores the size a of code-block.


Field Summary
private  int maxCBlkHeight
          The maximum code-block height
private  int maxCBlkWidth
          The maximum code-block width
private static java.lang.String optName
          Name of the option
 
Fields inherited from class jj2000.j2k.ModuleSpec
compDef, def, nComp, nTiles, SPEC_COMP_DEF, SPEC_DEF, SPEC_TILE_COMP, SPEC_TILE_DEF, SPEC_TYPE_COMP, SPEC_TYPE_TILE, SPEC_TYPE_TILE_COMP, specType, specValType, tileCompVal, tileDef
 
Constructor Summary
CBlkSizeSpec(int nt, int nc, byte type)
          Creates a new CBlkSizeSpec object for the specified number of tiles and components.
CBlkSizeSpec(int nt, int nc, byte type, ParameterList pl)
          Creates a new CBlkSizeSpec object for the specified number of tiles and components and the ParameterList instance.
 
Method Summary
 int getCBlkHeight(byte type, int t, int c)
          Returns the code-block height: for the specified tile/component for the specified tile for the specified component default value The value returned depends on the value of the variable 'type' which can take the following values : SPEC_DEF -> Default value is returned.
 int getCBlkWidth(byte type, int t, int c)
          Returns the code-block width : for the specified tile/component for the specified tile for the specified component default value The value returned depends on the value of the variable 'type' which can take the following values :
SPEC_DEF -> Default value is returned.
 int getMaxCBlkHeight()
          Returns the maximum code-block's height
 int getMaxCBlkWidth()
          Returns the maximum code-block's width
 void setCompDef(int c, java.lang.Object value)
          Sets default value for specified component and specValType tag if allowed by its priority.
 void setDefault(java.lang.Object value)
          Sets default value for this module
 void setTileCompVal(int t, int c, java.lang.Object value)
          Sets value for specified tile-component.
 void setTileDef(int t, java.lang.Object value)
          Sets default value for specified tile and specValType tag if allowed by its priority.
private  void storeHighestDims(java.lang.Integer[] dim)
          Stores the highest code-block width and height
 
Methods inherited from class jj2000.j2k.ModuleSpec
clone, getCompDef, getCopy, getDefault, getSpec, getSpecValType, getTileCompVal, getTileDef, isCompSpecified, isTileCompSpecified, isTileSpecified, parseIdx, rotate90
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

optName

private static final java.lang.String optName
Name of the option

See Also:
Constant Field Values

maxCBlkWidth

private int maxCBlkWidth
The maximum code-block width


maxCBlkHeight

private int maxCBlkHeight
The maximum code-block height

Constructor Detail

CBlkSizeSpec

public CBlkSizeSpec(int nt,
                    int nc,
                    byte type)
Creates a new CBlkSizeSpec object for the specified number of tiles and components.

Parameters:
nt - The number of tiles
nc - The number of components
type - the type of the specification module i.e. tile specific, component specific or both.

CBlkSizeSpec

public CBlkSizeSpec(int nt,
                    int nc,
                    byte type,
                    ParameterList pl)
Creates a new CBlkSizeSpec object for the specified number of tiles and components and the ParameterList instance.

Parameters:
nt - The number of tiles
nc - The number of components
type - the type of the specification module i.e. tile specific, component specific or both.
pl - The ParameterList instance
Method Detail

getMaxCBlkWidth

public int getMaxCBlkWidth()
Returns the maximum code-block's width


getMaxCBlkHeight

public int getMaxCBlkHeight()
Returns the maximum code-block's height


getCBlkWidth

public int getCBlkWidth(byte type,
                        int t,
                        int c)
Returns the code-block width : The value returned depends on the value of the variable 'type' which can take the following values :

Parameters:
type - The type of the value we want to be returned
t - The tile index
c - the component index
Returns:
The code-block width for the specified tile and component

getCBlkHeight

public int getCBlkHeight(byte type,
                         int t,
                         int c)
Returns the code-block height: The value returned depends on the value of the variable 'type' which can take the following values :

Parameters:
type - The type of the value we want to be returned
t - The tile index
c - the component index
Returns:
The code-block height for the specified tile and component

setDefault

public void setDefault(java.lang.Object value)
Sets default value for this module

Overrides:
setDefault in class ModuleSpec
Parameters:
value - Default value

setTileDef

public void setTileDef(int t,
                       java.lang.Object value)
Sets default value for specified tile and specValType tag if allowed by its priority.

Overrides:
setTileDef in class ModuleSpec
Parameters:
value - Tile's default value

setCompDef

public void setCompDef(int c,
                       java.lang.Object value)
Sets default value for specified component and specValType tag if allowed by its priority.

Overrides:
setCompDef in class ModuleSpec
Parameters:
c - Component index
value - Component's default value

setTileCompVal

public void setTileCompVal(int t,
                           int c,
                           java.lang.Object value)
Sets value for specified tile-component.

Overrides:
setTileCompVal in class ModuleSpec
Parameters:
t - Tie index
c - Component index
value - Tile-component's value

storeHighestDims

private void storeHighestDims(java.lang.Integer[] dim)
Stores the highest code-block width and height

Parameters:
dim - The 2 elements array that contains the code-block width and height.