📄 decompress_local.h
字号:
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company */
/* All rights reserved */
/* File: "decompress_local.h" */
/* Description: Contains local definitions used within "decompress.c". */
/* Author: David Taubman */
/* Affiliation: Hewlett-Packard and */
/* The University of New South Wales, Australia */
/* Version: VM8.5 */
/* Last Revised: 11 September, 2000 */
/*****************************************************************************/
/*****************************************************************************/
/* Modified by David Taubman to support arbitrary reference points for the */
/* transform and the various regular partitions, so as to facilitate */
/* cropping and geometric transformations in the compressed domain and to */
/* enable full support for CRF's single-sample overlap Wavelet transform, */
/* as originally documented in Seoul. Changes are too numerous to flag */
/* individually within the code. Changes copyrighted by HP with all rights */
/* reserved for the modified parts. */
/*****************************************************************************/
#ifndef DECOMPRESS_LOCAL_H
#define DECOMPRESS_LOCAL_H
#include <ifc.h>
#include <image_io.h>
#define INVOCATION_MEM_KEY "DECOMPRESSOR INVOCATION ENVIRONMENT MEMORY"
/*****************************************************************************/
/* dec_constructor_info */
/*****************************************************************************/
typedef
struct dec_constructor_info {
image_writer_ref (*image_writer)(void);
stream_in_ref (*stream_in)(void);
reverse_info_ref (*reverse_info)(void);
decoder_ref (*decoder)(void);
reverse_roi_ref (*reverse_roi)(void);
dequantizer_ref (*dequantizer)(void);
synthesis_ref (*synthesis)(void);
component_demix_ref (*component_demix)(void);
} dec_constructor_info, *dec_constructor_info_ptr;
/* Contains constructors for all the objects in the decompression
system. */
/*****************************************************************************/
/* dec_component_info */
/*****************************************************************************/
typedef
struct dec_component_info {
int rows, cols;
int tile_rows, tile_cols;
int ovlp_left, ovlp_right, ovlp_top, ovlp_bottom;
int max_buffer_rows, num_buffer_rows, min_buffer_row_idx;
ifc_int **buffer;
int row_offset;
int tile_row_idx, max_tile_row_idx;
float line_rate;
float line_remainder;
ifc_int downshift;
double offset;
int *tile_bottom_ovlp;
int last_right_ovlp;
} dec_component_info, *dec_component_info_ptr;
/* This structure is used by the `decompress_and_write_the_image' function.
It is motivated by the fact that different components may have different
sizes and we would like to work smoothly through the image in all
components at once, so as to minimize memory requirements.
`rows' and `cols' identify the whole image dimensions of the
relevant component. Note that this is after any de-mixing in the
`component_demix' object.
`tile_rows' and `tile_cols' identify the dimensions of the
component in the current tile. Note that these are the dimensions of
the relevant tile-component in the non-overlapping partition; the
dimensions of the tile-component which is recovered from the decompressor
may be larger due to overlap.
`max_buffer_rows' indicates the size of the `buffer' array, i.e.
the maximum number of buffered rows which can be stored in the current
buffer; it may be dynamically expanded as the need arises.
`num_buffer_rows' indicates the actual number of valid rows in the
buffer at any time, while `min_buffer_row_idx' holds the index of the
first row in the buffer relative to the start of the current tile
partition. This index can be negative.
`buffer' points to an array of `max_buffer_rows' line-buffers,
each of which has `cols' entries, which are used for buffering sample
values from the image. The number of rows which must actually be
buffered depends upon whether or not the image contains horizontal
tiles.
`tile_row_idx' identifies the zero-based index of the current
row within the current tile partition. Legal values may range
from -1 through to `tile_rows', since there may be an overlap row
at the beginning and/or end of any given tile in the partition.
the last legal index for the current tile is identified by the
`max_tile_row_idx'.
`line_rate' identifies the number of lines of this component which
should be written for each row of the component which has the largest
vertical dimension. This is used with `line_remainder' to interleave
accesses to rows of the various image components.
`downshift' is the value returned by `reverse_info__get_tile_info',
identifying the amount by which the relevant component's samples must
be downshifted before being fed into the `image_writer' object.
`offset' is the quantity which should be subtracted to the
raw image sample values after they have been retrieved from the
`component_demix' object and downshifted by `downshift'.
`tile_right_ovlp' is an array with one entry for each
horizontal tile in the component. The i'th entry holds a flag
indicating whether or not the most recently processed tile in
the i'th horizontal position included an overlap sample on its
right hand boundary.
`tile_bottom_ovlp' is an array with one entry for each horizontal
tile in the component. The i'th entry holds a flag indicating whether
or not the i'th tile on the previous row of tiles included an overlap
on its bottom boundary.
`last_right_ovlp' indicates whether or not the most recently
processed tile had an overlap sample on its left boundary. */
#endif /* DECOMPRESS_LOCAL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -