int QccWAVdcttceEncode(const
QccIMGImageComponent *image, int num_levels, int target_bit_cnt, double
stepsize, int overlap_sample, double smooth_factor, QccBitBuffer *output_buffer);
int QccWAVdcttceDecodeHeader(QccBitBuffer *input_buffer, int *num_levels,
int *num_rows, int *num_cols, double *image_mean, double *stepsize, int
*max_coefficient_bits, int *overlap_sample, double *smooth_factor);
int
QccWAVdcttceDecode(QccBitBuffer *input_buffer, QccIMGImageComponent *image,
int num_levels, double image_mean, double stepsize, int max_coefficient_bits,
int target_bit_cnt, int overlap_sample, double smooth_factor);
QccWAVdcttceEncode() encodes an image component, image, using the DCT-TCE algorithm by Shah et al. The DCT-TCE algorithm combines a block-based lapped biorthogonal transform (LBT) based on the DCT with the embedded TCE coder. See "ALGORITHM" below for more detail.
image is the image component to be coded and output_buffer is the output bitstream. output_buffer must be of QCCBITBUFFER_OUTPUT type and opened via a prior call to QccBitBufferStart(3) .
The LBT is controlled by the parameters num_levels, overlap_sample, and smooth_factor. overlap_sample and smooth_factor are parameters to the LBT's prefilter that is applied before its block-based DCT. Specifically, overlap_sample is the number of samples of overlap between DCT blocks; smooth_factor is the smoothing constant for the prefilter. num_levels specifies the block size of the block-based DCT that underlies the LBT. Specifically, the block size is 2^num_levels x 2^num_levels. After the LBT coefficients are reorganized into the dyadic structure, the dyadic decomposition has num_levels resolution levels. See "ALGORITHM" below for more detail.
Two encoding modes are supported. Mode 1 consists of first applying a scalar quantizer to all transform coefficients and then encoding the coefficients, bitplane by bitplane, until all bitplanes are encoded. Mode 2 consists of direct bitplane encoding without any scalar quantization of coefficients; in this mode, encoding stops when the target bitrate is reached. Mode 1 is selected by specifying a quantization stepsize that is greater than zero. If stepsize is less than or equal to zero, then Mode 2 is selected. In this case, a target encoding bit count, target_bit_cnt must be specified.
Since the input image is partitioned into blocks for the DCT that underlies the LBT, image must have size that is an integer multiple of the DCT block size in both directions. QccWAVdcttceEncode() returns in error if this is not the case.
QccWAVdcttceDecodeHeader() decodes the header information in the bitstream in the input input_buffer (which must be of QCCBITBUFFER_INPUT type and opened via a prior call to QccBitBufferStart(3) ). The header information is returned in num_levels (number of levels of wavelet decomposition), num_rows (vertical size of image), num_cols (horizontal size of image), image_mean (the mean value of the original image), stepsize (quantization stepsize), max_coefficient_bits (the number of bits used to represent the magnitude of the coefficient with largest absolute value), overlap_sample (the number of samples of overlap between DCT blocks), and smooth_factor (the smoothing factor to the pre/postfiler).
QccWAVdcttceDecode() decodes the bitstream input_buffer, producing the reconstructed image component, image. The bitstream must already have had its header read by a prior call to QccWAVdcttceDecodeHeader() (i.e., you call QccWAVdcttceDecodeHeader() first and then QccWAVdcttceDecode()).
During encoding, after the LBT is performed, the LBT coefficients are rearranged into a pyramid structure similar to that of a dyadic DWT pyramid; this dyadic pyramid has num_levels resolution levels, where the block size of the DCT blocks is 2^num_levels x 2^num_levels. At this point, the TCE image coder is applied to the resulting "subbands" in a manner identical to that of the original wavelet-based TCE coder. In decoding, after the TCE decoder assmebles the dyadic pyramid from the bitstream, the reconstructed LBT coefficients are rearranged into their original block-based organization before the inverse LBT is performed.
V. P. Shah, J. E. Fowler, and N. H. Younan, "Tarp Filtering of Block-Transform Coefficients for Embedded Image Coding," in Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing, Toulouse, France, May 2006, vol. 2, pp. 21-24.
C. Tian and S. S. Hemami, "An Embedded Image Coding System Based on Tarp Filter with Classification," in Proceedings of the International Conference on Acoustics, Speech, and Signal Processing, Montreal, Quebec, Canada, May 2004, vol. 3, pp. 49-52.
T. D. Tran, J. Liang, and C. Tu, "Lapped transform via time-domain pre- and post-filtering," IEEE Transactions on Signal Processing, vol. 51, no. 6, pp. 1557-1571, June 2003.
C. Tu and T. D. Tran, "Context-based entropy coding of block transform coefficients for image compression," IEEE Transactions on Image Processing, vol. 11, no. 11, pp. 1271-1283, November 2002.
Copyright (C) 1997-2021 James E. Fowler