| synopsis || arguments || prev || next |

kdu_line_buf::pre_create

Java: Kdu_line_buf::Pre_create

void pre_create( kdu_sample_allocator * allocator, int width, bool absolute, bool use_shorts)

Java: void Pre_create( Kdu_sample_allocator allocator, int width, boolean absolute, boolean use_shorts)

[Declared in "../coresys/common/kdu_sample_processing.h"]

Go to class description.


Synopsis

Declares the characteristics of the internal storage which will later be created by create. If use_shorts is true, the sample values will have 16 bits each and normalized values will use a fixed point representation with KDU_FIX_POINT fraction bits. Otherwise, the sample values have 32 bits each and normalized values use a true floating point representation.

This function essentially calls allocator→pre_create, requesting enough storage for a line with width samples, providing for legal accesses up to two samples before the beginning of the line and 8 samples beyond the end of the line.


Arguments

allocator [kdu_sample_allocator *]

Pointer to the object which will later be used to complete the allocation of storage for the line. The pointer is saved internally until such time as the create function is called, so you must be careful not to delete this object. You must also be careful to call its kdu_sample_allocator::finalize function before calling create.

width [int]

Nominal width of (number of samples in) the line. Note that space is reserved for two extra samples before the line (negative indices) and 8 extra samples after the line.

absolute [bool]

If true, the sample values in the line buffer are to be used in JPEG2000's reversible processing path, which works with absolute integers. otherwise, the line is prepared for use with the irreversible processing path, which works with normalized (floating or fixed point) quantities.

use_shorts [bool]

If true, space is allocated for 16-bit sample values (array entries will be of type kdu_sample16). Otherwise, the line buffer will hold samples of type kdu_sample32.


| top || synopsis || arguments || prev || next |