C# Класс 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.

Наследование: CSJ2K.j2k.image.ImgDataAdapter
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
encSpec CSJ2K.j2k.encoder.EncoderSpecs
num_Layers int
src CodedCBlkDataSrcEnc

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
parseAlayers ( System params_Renamed, float rate ) : CSJ2K.j2k.entropy.encoder.LayersInfo

Convenience method that parses the 'Alayers' option.

Описание методов

PostCompRateAllocator() публичный Метод

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
Результат System

createInstance() публичный статический Метод

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
Результат PostCompRateAllocator

initialize() публичный абстрактный Метод

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
Результат void

runAndWrite() публичный абстрактный Метод

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
Результат void

Описание свойств

encSpec защищенное свойство

The source of entropy coded data
protected EncoderSpecs,CSJ2K.j2k.encoder encSpec
Результат CSJ2K.j2k.encoder.EncoderSpecs

num_Layers защищенное свойство

The number of layers.
protected int num_Layers
Результат int

src защищенное свойство

The source of entropy coded data
protected CodedCBlkDataSrcEnc src
Результат CodedCBlkDataSrcEnc