PICTools Programmer's Reference
LSSCAN

LSSCAN: OP_JLSP, OP_JLSE

The LSSCAN structure supplies additional compression parameters to the OP_JLSE and OP_JLSP opcodes used for expanding JPEG-LS images to DIBs and for compressing DIBs to JPEG-LS images, respectively.

 
Copy Code
typedef struct {
   LONG        ScanNum;
   LONG        NumComponents;
   LONG        NEARparam;
   LONG        ILVparam;
   LONG        Pt;
   LONG        MAXVAL;
   LONG        T1;
   LONG        T2;
   LONG        T3;
   LONG        RESET;
   LONG        RestartInterval;
   LONG        Reserved[10];
} LSSCAN;

Fields:

Name Description

ScanNum

NumComponents

These fields are not currently used and must be set to 0.

NEARparam

JPEG-LS NEAR parameter. NEARparam is the bound for maximum allowed reconstructed sample difference for using JPEG-LS in a near-lossless mode. OP_JLSE retrieves this value from the compressed image and makes it available following REQ_INIT. OP_JLSP requires that this be set to 0 for lossless compression or to a positive value specifying the tolerance for near-lossless compression.

If a nonzero value is specified, the compression is not lossless; the source image can no longer be exactly reconstructed from the compressed image.

ILVparam

JPEG-LS ILV parameter. ILVparam specifies the interleave mode for the multiple components in the scan. OP_JLSE retrieves this value from the compressed image and makes it available following REQ_INIT. Allowed values are JLS_NONINTERLEAVED, JLS_LINEINTERLEAVED, and JLS_SAMPLEINTERLEAVED.

Pt

Optional point transform to be applied to the image data. The point transform is the number of least significant bits truncated from each input sample prior to compression (and will be zero in each reconstructed sample after decompression). A point transform is another way to use the JPEG-LS algorithm in a near-lossless mode. OP_JLSE retrieves this value from the compressed image and makes it available following REQ_INIT. A value can be input to OP_JLSP or set to 0 if no point transform is to be used. Whenever point transform is set nonzero, OP_JLSP writes an LSE marker segment to explicitly specify the value of MAXVAL.

If a nonzero value is specified, the compression is not lossless; the source image can no longer be exactly reconstructed from the compressed image.

MAXVAL

JPEG-LS MAXVAL parameter. MAXVAL is the maximum possible image sample value over all components of a scan. OP_JLSE retrieves this value from the compressed image if an LSE marker segment is present; otherwise, OP_JLSE calculates this value from the bit precision of the samples. A MAXVAL value can be input to OP_JLSP or set to 0 for the default calculation based on bit precision of the samples (adjusted for point transform if a point transform is to be applied) to be used.

T1

T2

T3

JPEG-LS thresholds T1, T2, T3. These are the thresholds used for quantization of the local gradients in the JPEG-LS algorithm. OP_JLSE retrieves these values from the compressed image if an LSE marker is present; otherwise, OP_JLSE calculates these values based on defaults, MAXVAL, and NEARparam. Thresholds T1, T2, T3 can be input to OP_JLSP or set to 0 for the defaults to be used.

RESET

JPEG-LS RESET parameter. RESET is the threshold value at which counters in the JPEG-LS algorithm are halved. OP_JLSE retrieves this value from the compressed image if an LSE marker is present; otherwise, the default value is used. A RESET value can be input to OP_JLSP or set to 0 for the default to be used.

RestartInterval

Defines the size of restart intervals. OP_JLSE retrieves this value from the compressed image and makes it available following REQ_INIT. A value can be input to OP_JLSP or set to 0 if no restart intervals are to be defined.

 

 


©2022. Accusoft Corporation. All Rights Reserved.

Send Feedback