C# Class CSJ2K.j2k.entropy.encoder.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.

Inheritance: CSJ2K.j2k.image.ImgDataAdapter
Afficher le fichier Open project: cureos/csj2k Class Usage Examples

Protected Properties

Свойство Type Description
encSpec CSJ2K.j2k.encoder.EncoderSpecs
num_Layers int
src CodedCBlkDataSrcEnc

Méthodes publiques

Méthode Description
PostCompRateAllocator ( CodedCBlkDataSrcEnc src, int nl, CSJ2K.j2k.codestream.writer.CodestreamWriter bw, CSJ2K.j2k.encoder.EncoderSpecs encSpec ) : System

Initializes the source of entropy coded data.

createInstance ( CodedCBlkDataSrcEnc src, CSJ2K.j2k.util.ParameterList pl, float rate, CSJ2K.j2k.codestream.writer.CodestreamWriter bw, CSJ2K.j2k.encoder.EncoderSpecs encSpec ) : PostCompRateAllocator

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.

initialize ( ) : void

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.

runAndWrite ( ) : void

Runs the rate allocation algorithm and writes the data to the bit stream. This must be called after the initialize() method.

Private Methods

Méthode Description
parseAlayers ( System params_Renamed, float rate ) : CSJ2K.j2k.entropy.encoder.LayersInfo

Convenience method that parses the 'Alayers' option.

Method Details

PostCompRateAllocator() public méthode

Initializes the source of entropy coded data.
public PostCompRateAllocator ( CodedCBlkDataSrcEnc src, int nl, CSJ2K.j2k.codestream.writer.CodestreamWriter bw, CSJ2K.j2k.encoder.EncoderSpecs encSpec ) : System
src CodedCBlkDataSrcEnc The source of entropy coded data. /// ///
nl int
bw CSJ2K.j2k.codestream.writer.CodestreamWriter The packet bit stream writer. /// ///
encSpec CSJ2K.j2k.encoder.EncoderSpecs
Résultat System

createInstance() public static méthode

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 static createInstance ( CodedCBlkDataSrcEnc src, CSJ2K.j2k.util.ParameterList pl, float rate, CSJ2K.j2k.codestream.writer.CodestreamWriter bw, CSJ2K.j2k.encoder.EncoderSpecs encSpec ) : PostCompRateAllocator
src CodedCBlkDataSrcEnc The source of entropy coded data. /// ///
pl CSJ2K.j2k.util.ParameterList The parameter lis (or options). /// ///
rate float The target bitrate for the rate allocation /// ///
bw CSJ2K.j2k.codestream.writer.CodestreamWriter The bit stream writer object, where the bit stream data will /// be written. /// ///
encSpec CSJ2K.j2k.encoder.EncoderSpecs
Résultat PostCompRateAllocator

initialize() public abstract méthode

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.
public abstract initialize ( ) : void
Résultat void

runAndWrite() public abstract méthode

Runs the rate allocation algorithm and writes the data to the bit stream. This must be called after the initialize() method.
public abstract runAndWrite ( ) : void
Résultat void

Property Details

encSpec protected_oe property

The source of entropy coded data
protected EncoderSpecs,CSJ2K.j2k.encoder encSpec
Résultat CSJ2K.j2k.encoder.EncoderSpecs

num_Layers protected_oe property

The number of layers.
protected int num_Layers
Résultat int

src protected_oe property

The source of entropy coded data
protected CodedCBlkDataSrcEnc src
Résultat CodedCBlkDataSrcEnc