📄 compress_local.h
字号:
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company */
/* All rights reserved */
/* File: "compress_local.h" */
/* Description: Contains local definitions used within "compress.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 COMPRESS_LOCAL_H
#define COMPRESS_LOCAL_H
#include <ifc.h>
#include <image_io.h>
#define INVOCATION_MEM_KEY "COMPRESSOR INVOCATION ENVIRONMENT MEMORY"
/*****************************************************************************/
/* enc_constructor_info */
/*****************************************************************************/
typedef
struct enc_constructor_info {
image_reader_ref (*image_reader)(void);
stream_out_ref (*stream_out)(void);
forward_info_ref (*forward_info)(void);
encoder_ref (*encoder)(void);
forward_roi_ref (*forward_roi)(void);
quantizer_ref (*quantizer)(void);
analysis_ref (*analysis)(void);
component_mix_ref (*component_mix)(void);
} enc_constructor_info, *enc_constructor_info_ptr;
/* Contains constructors for all the objects in the compression
system. */
/*****************************************************************************/
/* enc_component_info */
/*****************************************************************************/
typedef
struct enc_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 upshift;
double offset;
} enc_component_info, *enc_component_info_ptr;
/* This structure is used by the `read_and_compress_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 prior to any mixing in the
`component_mix' 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 presented to the compressor
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 read 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.
`upshift' is the value returned by `forward_info__get_tile_info',
identifying the amount by which the relevant component's samples must
be upshifted before being fed into the `component_mix' object. Note
that this value might be negative, in which case the sample values
must be downshifted.
`offset' is the quantity which should be added to the
raw image sample values before they are upshifted and before they are
fed into the `component_mix' object. */
#endif /* COMPRESS_LOCAL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -