|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.jpeg.jj2000.j2k.image.ImgDataAdapter
ucar.jpeg.jj2000.j2k.entropy.encoder.PostCompRateAllocator
public abstract class PostCompRateAllocator
This is the abstract class from which post-compression rate allocators which generate layers should inherit. The source of data is a 'CodedCBlkDataSrcEnc' which delivers entropy coded blocks with rate-distortion statistics.
The post compression rate allocator implementation should create the layers, according to a rate allocation policy, and send the packets to a CodestreamWriter. Since the rate allocator sends the packets to the bit stream then it should output the packets to the bit stream in the order imposed by the bit stream profiles.
CodedCBlkDataSrcEnc
,
jj2000.j2k.codestream.writer.CodestreamWriter
Field Summary | |
---|---|
protected EncoderSpecs |
encSpec
The source of entropy coded data |
protected int |
numLayers
The number of layers. |
static char |
OPT_PREFIX
The prefix for rate allocation options: 'A' |
protected CodedCBlkDataSrcEnc |
src
The source of entropy coded data |
Fields inherited from class ucar.jpeg.jj2000.j2k.image.ImgDataAdapter |
---|
imgdatasrc, tIdx |
Constructor Summary | |
---|---|
PostCompRateAllocator(CodedCBlkDataSrcEnc src,
int nl,
CodestreamWriter bw,
EncoderSpecs encSpec)
Initializes the source of entropy coded data. |
Method Summary | |
---|---|
static PostCompRateAllocator |
createInstance(CodedCBlkDataSrcEnc src,
ParameterList pl,
float rate,
CodestreamWriter bw,
EncoderSpecs encSpec)
Creates a PostCompRateAllocator object for the appropriate rate allocation parameters in the parameter list 'pl', having 'src' as the source of entropy coded data, 'rate' as the target bitrate and 'bw' as the bit stream writer object. |
int |
getNumLayers()
Returns the number of layers that are actually generated. |
static String[][] |
getParameterInfo()
Returns the parameters that are used in this class and implementing classes. |
abstract void |
initialize()
Initializes the rate allocation points, taking into account header overhead and such. |
abstract void |
runAndWrite()
Runs the rate allocation algorithm and writes the data to the bit stream. |
void |
setHeaderEncoder(HeaderEncoder headEnc)
Keep a reference to the header encoder. |
Methods inherited from class ucar.jpeg.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 |
Field Detail |
---|
public static final char OPT_PREFIX
protected CodedCBlkDataSrcEnc src
protected EncoderSpecs encSpec
protected int numLayers
Constructor Detail |
---|
public PostCompRateAllocator(CodedCBlkDataSrcEnc src, int nl, CodestreamWriter bw, EncoderSpecs encSpec)
src
- The source of entropy coded data.ln
- The number of layers to creatept
- The progressive type, as defined in 'ProgressionType'.bw
- The packet bit stream writer.ProgressionType
Method Detail |
---|
public void setHeaderEncoder(HeaderEncoder headEnc)
headEnc
- The header encoderpublic abstract void initialize() throws IOException
oldSyntax
- Whether or not the old syntax is used.
IOException
runAndWrite()
public abstract void runAndWrite() throws IOException
IOException
initialize()
public int getNumLayers()
public static String[][] getParameterInfo()
public static PostCompRateAllocator createInstance(CodedCBlkDataSrcEnc src, ParameterList pl, float rate, CodestreamWriter bw, EncoderSpecs encSpec)
src
- The source of entropy coded data.pl
- The parameter lis (or options).rate
- The target bitrate for the rate allocationbw
- The bit stream writer object, where the bit stream data will
be written.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |