|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jj2000.j2k.image.ImgDataAdapter | +--jj2000.j2k.entropy.encoder.EntropyCoder
This abstract class provides the general interface for block-based entropy encoders. The input to the entropy coder is the quantized wavelet coefficients, or codewords, represented in sign magnitude. The output is a compressed code-block with rate-distortion information.
The source of data for objects of this class are 'CBlkQuantDataSrcEnc' objects.
For more details on the sign magnitude representation used see the Quantizer class.
This class provides default implemenations for most of the methods (wherever it makes sense), under the assumption that the image and component dimensions, and the tiles, are not modifed by the entropy coder. If that is not the case for a particular implementation then the methods should be overriden.
Quantizer
,
CBlkQuantDataSrcEnc
Field Summary | |
static char |
OPT_PREFIX
The prefix for entropy coder options: 'C' |
private static java.lang.String[][] |
pinfo
The list of parameters that is accepted for entropy coding. |
protected CBlkQuantDataSrcEnc |
src
The source of quantized wavelet coefficients |
Fields inherited from class jj2000.j2k.image.ImgDataAdapter |
imgdatasrc, tIdx |
Fields inherited from interface jj2000.j2k.entropy.StdEntropyCoderOptions |
FIRST_BYPASS_PASS_IDX, MAX_CB_AREA, MAX_CB_DIM, MIN_CB_DIM, NUM_EMPTY_PASSES_IN_MS_BP, NUM_NON_BYPASS_MS_BP, NUM_PASSES, OPT_BYPASS, OPT_PRED_TERM, OPT_RESET_MQ, OPT_SEG_SYMBOLS, OPT_TERM_PASS, OPT_VERT_STR_CAUSAL, STRIPE_HEIGHT |
Constructor Summary | |
EntropyCoder(CBlkQuantDataSrcEnc src)
Initializes the source of quantized wavelet coefficients. |
Method Summary | |
static EntropyCoder |
createInstance(CBlkQuantDataSrcEnc src,
ParameterList pl,
CBlkSizeSpec cblks,
PrecinctSizeSpec pss,
StringSpec bms,
StringSpec mqrs,
StringSpec rts,
StringSpec css,
StringSpec sss,
StringSpec lcs,
StringSpec tts)
Creates a EntropyCoder object for the appropriate entropy coding parameters in the parameter list 'pl', and having 'src' as the source of quantized data. |
SubbandAn |
getAnSubbandTree(int t,
int c)
Returns a reference to the root of subband tree structure representing the subband decomposition for the specified tile-component. |
abstract int |
getCBlkHeight(int t,
int c)
Returns the code-block height for the specified tile and component. |
abstract int |
getCBlkWidth(int t,
int c)
Returns the code-block width for the specified tile and component. |
int |
getCbULX()
Returns the horizontal offset of the code-block partition. |
int |
getCbULY()
Returns the vertical offset of the code-block partition. |
static java.lang.String[][] |
getParameterInfo()
Returns the parameters that are used in this class and implementing classes. |
boolean |
isReversible(int t,
int c)
Returns the reversibility of the tile-component data that is provided by the object. |
Methods inherited from class jj2000.j2k.image.ImgDataAdapter |
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jj2000.j2k.entropy.encoder.CodedCBlkDataSrcEnc |
getNextCodeBlock, getPPX, getPPY, precinctPartitionUsed |
Methods inherited from interface jj2000.j2k.image.ImgData |
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTile |
Field Detail |
public static final char OPT_PREFIX
private static final java.lang.String[][] pinfo
protected CBlkQuantDataSrcEnc src
Constructor Detail |
public EntropyCoder(CBlkQuantDataSrcEnc src)
src
- The source of quantized wavelet coefficients.Method Detail |
public abstract int getCBlkWidth(int t, int c)
t
- The tile indexc
- the component index
public abstract int getCBlkHeight(int t, int c)
t
- The tile indexc
- the component index
public boolean isReversible(int t, int c)
Since entropy coders themselves are always reversible, it returns the reversibility of the data that comes from the 'CBlkQuantDataSrcEnc' source object (i.e. ROIScaler).
isReversible
in interface ForwWTDataProps
t
- Tile indexc
- Component index
ROIScaler
public SubbandAn getAnSubbandTree(int t, int c)
getAnSubbandTree
in interface ForwWTDataProps
t
- The index of the tile.c
- The index of the component.
SubbandAn
,
Subband
public int getCbULX()
getCbULX
in interface ForwWTDataProps
public int getCbULY()
getCbULY
in interface ForwWTDataProps
public static java.lang.String[][] getParameterInfo()
public static EntropyCoder createInstance(CBlkQuantDataSrcEnc src, ParameterList pl, CBlkSizeSpec cblks, PrecinctSizeSpec pss, StringSpec bms, StringSpec mqrs, StringSpec rts, StringSpec css, StringSpec sss, StringSpec lcs, StringSpec tts)
src
- The source of data to be entropy codedpl
- The parameter list (or options).pss
- Precinct partition specificationsbms
- By-pass mode specificationsmqrs
- MQ-reset specificationsrts
- Regular termination specificationscss
- Causal stripes specificationssss
- Error resolution segment symbol use specificationslcs
- Length computation specificationstts
- Termination type specifications
java.lang.IllegalArgumentException
- If an error occurs while parsing
the options in 'pl'
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |