[]
        
(Showing Draft Content)

CSJ2K.j2k.entropy.encoder.CBlkRateDistStats.-ctor

CBlkRateDistStats Constructor

CBlkRateDistStats()

Creates a new CBlkRateDistStats object without allocating any space for 'truncRates', 'truncSlopes', 'truncDists' and 'truncIdxs' or 'data'.

Declaration
public CBlkRateDistStats()

CBlkRateDistStats(int, int, int, byte[], int[], double[], bool[], int, bool)

Creates a new CBlkRateDistStats object and initializes the valid truncation points, their rates and their slopes, from the 'rates' and 'dist' arrays. The 'rates', 'dist' and 'termp' arrays must contain the rate (in bytes), the reduction in distortion (from nothing coded) and the flag indicating if termination is used, respectively, for each truncation point.

       <p>The valid truncation points are selected by taking them as lying on
       a convex hull. This is done by calling the method
       selectConvexHull().</p><p>Note that the arrays 'rates' and 'termp' are copied, not referenced,
       so they can be modified after a call to this constructor.</p>
Declaration
public CBlkRateDistStats(int m, int n, int skipMSBP, byte[] data, int[] rates, double[] dists, bool[] termp, int np, bool inclast)
Parameters
Type Name Description
int m

The horizontal index of the code-block, within the subband.

int n

The vertical index of the code-block, within the subband.

int skipMSBP

The number of skipped most significant bit-planes for this code-block.

byte[] data

The compressed data. This array is referenced by this object so it should not be modified after.

int[] rates

The rates (in bytes) for each truncation point in the compressed data. This array is modified by the method but no reference is kept to it.

double[] dists

The reduction in distortion (with respect to no information coded) for each truncation point. This array is modified by the method but no reference is kept to it.

bool[] termp

An array of boolean flags indicating, for each pass, if a pass is terminated or not (true if terminated). If null then it is assumed that no pass is terminated except the last one which always is.

int np

The number of truncation points contained in 'rates', 'dist' and 'termp'.

bool inclast

If false the convex hull is constructed as for lossy coding. If true it is constructed as for lossless coding, in which case it is ensured that all bit-planes are sent (i.e. the last truncation point is always included).