⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hplx_vert_lifting.h

📁 JPEG2000实现的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company                                   */
/* All rights reserved                                                       */
/* File: "hplx_vert_lifting.h"                                               */
/* Description: Public definitions for "hplx_vert_lifting.c"                 */
/* Author: David Taubman                                                     */
/* Affiliation: Hewlett-Packard and                                          */
/*              The University of New South Wales, Australia                 */
/* Acknowledgements: Partly developed in collaboration with                  */
/*                   Christos Chrysafis of HP Labs                           */
/* Version: VM6.1                                                            */
/* Last Revised: 18 February, 2000                                           */
/*****************************************************************************/

/*****************************************************************************/
/* Modifications tagged with comment lines or delimiters involving the       */
/* string "BBDWT mod" have been made to implement the single-sample          */
/* overlap Wavelet transform within the frames paradigm -- this is the       */
/* BBDWT transform proposed by Canon Research France and accepted at the     */
/* meeting in Seoul, Korea.                                                  */
/*****************************************************************************/

/*****************************************************************************/
/* 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.                                          */
/*****************************************************************************/

/*****************************************************************************/
/* Modified by David Taubman to support interface modifications, arbitrary   */
/* changes in coding parameters from component to component and from tile    */
/* to tile, to support the full generality of PART-1 of the JPEG2000         */
/* standard, and to support most anticipated generality of PART-2.  Changes  */
/* are too numerous to flag individually within the code, which in some      */
/* places has been completely rewritten.  All changes copyrighted by HP with */
/* all rights reserved for the modified parts.                               */
/*****************************************************************************/

#ifndef HPLX_VERT_LIFTING_H
#define HPLX_VERT_LIFTING_H
#include "hplx_common.h"


/* ========================================================================= */
/* --------------------------- Forward Declarations ------------------------ */
/* ========================================================================= */

typedef struct hplx_buffering_stage *hplx_buffering_stage_ptr;
typedef struct hplx_row_buffer_state *hplx_row_buffer_state_ptr;

/* ========================================================================= */
/* -------------------------- Structure Definitions ------------------------ */
/* ========================================================================= */

/*****************************************************************************/
/*                            hplx_row_buffer_state                          */
/*****************************************************************************/

typedef
  struct hplx_row_buffer_state {
    int remaining_users;
    float *float_buf;
    ifc_int *int_buf;
    hplx_row_buffer_state_ptr next;
  } hplx_row_buffer_state; /* Pointer type declared forward. */
  /* This structure manages the state of a single row buffer.  Each
     buffer has a number of users (usually either 1 or 2).  The
     `remaining_users' value is decremented whenever we can be sure that
     a user will not be requesting access to the row again.  Most rows are
     used by lifting steps, where each lifting step applies a kernel to
     a range of source rows and uses the result to update a target row.  When
     a range of source rows is requested, the first row in the range will
     not be requested by the same user (lifting step) again so its
     `remaining_users' field may be decremented; also, when the target row
     is requested, it will not be requested again, so its `remaining_users'
     field should also be decremented.  Once there are no more users, the
     buffer is recycled through a global heap (see below).
         The `next' field is used to simplify management of a heap of
     recycled row buffers, as explained below. */

/*****************************************************************************/
/*                             hplx_row_buffer_heap                          */
/*****************************************************************************/

typedef
  struct hplx_row_buffer_heap {
    int use_floats;
    int buffer_length;
    hplx_row_buffer_state_ptr head;
  } hplx_row_buffer_heap, *hplx_row_buffer_heap_ptr;
  /* This structure manages a heap of row buffers.  It is the central
     data structure used to serve the heap access functions,
     `hplx_lift_heap__get_buffer' and `hplx_lift_heap__return_buffer'.  When
     new buffers must be created to satisfy a call to
     `hplx_lift_heap__get_buffer', they are created with the data type
     determined by the value of the `use_floats' flag, and with the length
     indicated by `buffer_length'.
         `head' points to the head of a linked list of recycled row buffers,
     connected via their `next' fields. */

/*****************************************************************************/
/*                              hplx_lifting_step                            */
/*****************************************************************************/

typedef
  struct hplx_lifting_step {
    int neg_support;
    int pos_support;
    float *float_taps;
    int *int_taps;
    int int_downshift;
    float dc_gain; /* BBDWT mod by David */
    hplx_buffering_stage_ptr source;
    hplx_buffering_stage_ptr target;
  } hplx_lifting_step, *hplx_lifting_step_ptr;
  /* This structure manages all information for a given lifting step.
         `neg_support' and `pos_support' are the regions of support returned
     by the relevant call to `forward_info__get_int_steps' or
     `forward_info__get_float_steps'.
         `float_taps' and `int_taps' the the kernel pointers returned by
     the relevant call to `forward_info__get_int_steps' or
     `forward_info__get_float_steps'.  Only one of the two pointers is
     non-NULL, depending upon the type of lifting operation to be performed.
     Also, note that these pointers point to the centre of the support of
     the relevant lifting kernel, not the beginning.
         `int_downshift' holds the downshift value returned by the
     call to `forward_info__get_int_steps', if any.
         `dc_gain' holds the DC gain associated with the samples produced
     by this lifting step.  It is used in the single sample overlap method
     (BBDWT) at frame boundaries, instead of performing the actual lifting
     step.
         `source' points to the buffering stage from which source rows should

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -