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

📄 component_mix_local.h

📁 JPEG2000实现的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company                                   */
/* All rights reserved                                                       */
/* File: "component_mix_local.h"                                             */
/* Description: Private definitions for "component_mix.c"                    */
/* Author: David Taubman                                                     */
/* Affiliation: Hewlett-Packard and                                          */
/*              The University of New South Wales, Australia                 */
/* Version: VM9.0                                                            */
/* Last Revised: 20 April, 2001                                              */
/*****************************************************************************/

/*****************************************************************************/
/* 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 Ali Bilgin to support wavelet transforms across the component */
/* direction. Copyright 2000 University of Arizona, Arizona Board of Regents.*/
/* All rights reserved for the modified parts.                               */
/*****************************************************************************/

/*****************************************************************************/
/* Modified by David Taubman to implement changes in Tokyo between CD and    */
/* FCD for Part-1 of the standard.  Copyrighted by HP with all rights        */
/* reserved for the modified parts.                                          */
/*****************************************************************************/

/*****************************************************************************/
/* Modified by Brendt Wohlberg (Los Alamos National Laboratory) to include   */
/* component-direction wavelet transforms based on those defined in Part 2   */
/* Annex G. All modifications are Copyright 2001 University of California.   */
/*****************************************************************************/

#ifndef COMPONENT_MIX_LOCAL_H
#define COMPONENT_MIX_LOCAL_H
#include <ifc.h>

/* LANL begin */
#ifdef LANL_CMPNT_WVLT
#include "FilterBank.h"
#endif
/* LANL end */

#define MIXING_MEM_KEY "COMPONENT MIX/DEMIX OBJECT MEMORY"

/* UofA Begin */
extern int symmetric_extension_type(int evenFilter,
                                    int oddSignal,
                                    int Highpass_Not_LowPass,
                                    int right_Not_left);

/*****************************************************************************/
/*                               std_tap_info                                */
/*****************************************************************************/

typedef
  struct std_tap_info {
    int neg_support;
    int pos_support;
    float *taps;
    int *int_taps;
    int int_rdx;
  } std_tap_info, *std_tap_info_ptr;
  /* For the interpretation of negative and positive supports,
     consult the definition of `forward_info__get_kernel_info' in "ifc.h".
     For analysis and lifting step filters, the array of taps appears in
     inner-product order, which is the reverse of the order associated with
     the filter's impulse response.
         `int_taps' is non-NULL if and only if the structure is used to
     represent integer lifting coefficients, in which case the array
     contains a copy of the entries in the `taps' array, which have been
     scaled by 2^`int_rdx' and rounded to integers. */

/*****************************************************************************/
/*                            std_lifting_info                               */
/*****************************************************************************/

typedef
  struct std_lifting_info {
    int num_steps;
    std_tap_info_ptr steps;
    float lp_scale, hp_scale;
  } std_lifting_info, *std_lifting_info_ptr;
  /* This structure maintains all information required for a 1-D Wavelet
     kernel implementation via lifting.
         `num_steps' holds the total number of lifting steps (prediction, plus
     update steps), which must appear within the `steps' array in the order
     predict, update, predict, ...
         `steps' points to an array of precition steps, starting with the
     first prediction step, with update steps interleaved between prediction
     steps.  For synthesis, the order in which lifting steps must actually
     be applied is the reverse of that in which they appear in this array.
         `lp_scale' and `hp_scale' are used only for non-reversible lifting
     implementations.  In this case, the low-pass and high-pass sub-sequences
     produced by the various lifting steps must be scaled by `lp_scale'
     and `hp_scale' respectively to generate appropriately normalized
     coefficients.  For synthesis, of course, these scale factors must be
     inverted and applied before undoing any of the lifting steps. */

/*****************************************************************************/
/*                            std_kernel_info                                */
/*****************************************************************************/

typedef
  struct std_kernel_info {
    int kernel_type;
    std_lifting_info lifting;
    std_tap_info low[2];
    std_tap_info high[2];
  } std_kernel_info, *std_kernel_info_ptr;
  /* This structure manages the elements which together fully describe
     a 1D Wavelet transform kernel.
         `kernel_type' holds one of INFO__INT_LIFTING, INFO__FLOAT_LIFTING
     or INFO__CONVOLUTION.
         The `lifting' field is fully filled out, regardless of whether or
     not the kernel is to be implemented using lifting.
         The `low' and `high' arrays contain the analysis and synthesis
     filter taps.  Analysis taps are in the first element of each array and
     appear in inner-product (not convolution) order.  The synthesis taps
     appear in convolution order in the second entry of each array.
     The arrays are completely filled out regardless of whether or not
     convolution is to be used in implementing the kernel. */

/*****************************************************************************/
/*                            std_user_defined                               */
/*****************************************************************************/

typedef
  struct std_user_defined {
    int num_steps;
    int step_supports[8];
    int downshifts[8];
    int taps[8][7];
    struct std_user_defined *next;
  } std_user_defined, *std_user_defined_ptr;
  /* This structure is used to store the summary information which
     is actually recorded in the COD/COC marker for anything other than
     the two special Wavelet kernels, W9X7 and W5X3.  When multiple
     user-defined kernels are involved it can be convenient to build a
     linked list of these structures, which is why the `next' field is
     provided.
         `num_steps' identifies the number of lifting steps; note that
     Wavelet kernels are always specified in terms of lifting -- convolution
     kernels may be derived for particular implementations from the lifting
     steps.  At most 8 lifting steps are allowed.
         The `step_supports' array holds the number of taps for each of the
     lifting steps.
         The `downshifts' array holds the amount of downshift to be applied
     to each of the tap values in each successive lifting step to recover the
     floating point lifting step taps (non-reversible case).  For reversible
     decompositions, the integer tap values are used as-is and the downshift
     is applied to the result and rounded once in each lifting step.
         The `taps' array holds each of the integer-valued lifting step
     taps. */

typedef
  struct conv_info {
    int branch_neg_supports[2];
    int branch_pos_supports[2];
    float *branch_taps[2];
    int even_taps;
    int extend;
    float *in_buf;
    float *branch_bufs[2];
  } conv_info, *conv_info_ref;

typedef
  struct lifting_info {
    int kernel_type;
    int first_idx;
    int num_steps;
    int neg_supports[INFO__MAX_LIFTING_STEPS];
    int pos_supports[INFO__MAX_LIFTING_STEPS];

⌨️ 快捷键说明

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