| java.lang.Object jj2000.j2k.image.ImgDataAdapter jj2000.j2k.entropy.encoder.PostCompRateAllocator
All known Subclasses: jj2000.j2k.entropy.encoder.EBCOTRateAllocator,
PostCompRateAllocator | abstract public class PostCompRateAllocator extends ImgDataAdapter (Code) | | 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.
See Also: CodedCBlkDataSrcEnc See Also: jj2000.j2k.codestream.writer.CodestreamWriter |
Method Summary | |
public static PostCompRateAllocator | createInstance(CodedCBlkDataSrcEnc src, float rate, CodestreamWriter bw, J2KImageWriteParamJava wp) 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. | public int | getNumLayers() Returns the number of layers that are actually generated. | public static String[][] | getParameterInfo() Returns the parameters that are used in this class and implementing
classes. | abstract public void | initialize() Initializes the rate allocation points, taking into account header
overhead and such. | abstract public void | runAndWrite() Runs the rate allocation algorithm and writes the data to the
bit stream. | public void | setHeaderEncoder(HeaderEncoder headEnc) Keep a reference to the header encoder. |
OPT_PREFIX | final public static char OPT_PREFIX(Code) | | The prefix for rate allocation options: 'A'
|
numLayers | protected int numLayers(Code) | | The number of layers.
|
PostCompRateAllocator | public PostCompRateAllocator(CodedCBlkDataSrcEnc src, int nl, CodestreamWriter bw, J2KImageWriteParamJava wp)(Code) | | Initializes the source of entropy coded data.
Parameters: src - The source of entropy coded data. Parameters: ln - The number of layers to create Parameters: pt - The Progression type, as defined in 'ProgressionType'. Parameters: bw - The packet bit stream writer. See Also: ProgressionType |
createInstance | public static PostCompRateAllocator createInstance(CodedCBlkDataSrcEnc src, float rate, CodestreamWriter bw, J2KImageWriteParamJava wp)(Code) | | 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.
Parameters: src - The source of entropy coded data. Parameters: pl - The parameter lis (or options). Parameters: rate - The target bitrate for the rate allocation Parameters: bw - The bit stream writer object, where the bit stream data willbe written. |
getNumLayers | public int getNumLayers()(Code) | | Returns the number of layers that are actually generated.
The number of layers generated. |
getParameterInfo | public static String[][] getParameterInfo()(Code) | | Returns the parameters that are used in this class and implementing
classes. It returns a 2D String array. Each of the 1D arrays is for a
different option, and they have 3 elements. The first element is the
option name, the second one is the synopsis, the third one is a long
description of what the parameter is and the fourth is its default
value. The synopsis or description may be 'null', in which case it is
assumed that there is no synopsis or description of the option,
respectively. Null may be returned if no options are supported.
the options name, their synopsis and their explanation,or null if no options are supported. |
initialize | abstract public void initialize() throws IOException(Code) | | Initializes the rate allocation points, taking into account header
overhead and such. This method must be called after the header has been
simulated but before calling the runAndWrite() one. The header must be
rewritten after a call to this method since the number of layers may
change.
Parameters: oldSyntax - Whether or not the old syntax is used. See Also: PostCompRateAllocator.runAndWrite |
setHeaderEncoder | public void setHeaderEncoder(HeaderEncoder headEnc)(Code) | | Keep a reference to the header encoder.
Parameters: headEnc - The header encoder |
|
|