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

📄 libqccpackspiht.h

📁 该文件是小波信源编码SPIHT算法的C语言代码
💻 H
字号:
/* * * QccPack: Quantization, compression, and coding utilities * Copyright (C) 1997-2008  James E. Fowler *  *//* * ---------------------------------------------------------------------------- *  * Public License for the SPIHT Algorithm * Version 1.2, March 8, 2004 *  * ---------------------------------------------------------------------------- *  * The Set Partitioning In Hierarchical Trees (SPIHT) algorithm is protected * by US Patent #5,764,807 (issued June 9, 1998), US Patent #6,674,911 (issued * January 6, 2004), and other international patents and patents pending. An * implementation of the SPIHT algorithm is included herein with the gracious * permission of Dr. William A. Pearlman, President of PrimaComp, Inc., * exclusive holder of patent rights. PrimaComp, Inc., has granted the * following license governing the terms and conditions for use, copying, * distribution, and modification of the SPIHT algorithm implementation * contained herein (hereafter referred to as "the SPIHT source code"). *  * 0. Use of the SPIHT source code, including any executable-program or *    linkable-library form resulting from its compilation, is restricted to *    solely academic or non-commercial research activities. *  * 1. Any other use, including, but not limited to, use in the development *    of a commercial product, use in a commercial application, or commercial *    distribution, is prohibited by this license. Such acts require a separate *    license directly from Dr. Pearlman. *  * 2. For academic and non-commercial purposes, this license does not restrict *    use; copying, distribution, and modification are permitted under the *    terms of the GNU General Public License as published by the Free Software *    Foundation, with the further restriction that the terms of the present *    license shall also apply to all subsequent copies, distributions, *    or modifications of the SPIHT source code. *  * NO WARRANTY *  * 3. PrimaComp, Inc.,  dislaims all warranties, expressed or implied, *    including without limitation any warranty whatsoever as to the fitness *    for a particular use or the merchantability of the SPIHT source code. *  * 4. In no event shall PrimaComp, Inc., be liable for any loss of profits, *    loss of business, loss of use or loss of data, nor for indirect, special, *    incidental or consequential damages of any kind related to use of the *    SPIHT source code. *  *  * END OF TERMS AND CONDITIONS *  *  * Persons desiring to license the SPIHT algorithm for commercial purposes or * for uses otherwise prohibited by this license may wish to contact * PrimaComp, Inc., regarding the possibility of negotiating such licenses: *  *   PrimaComp, Inc. *   851 Maxwell Drive *   Schenectady, NY 12309 *   U.S.A. *   +1 (857) 231-6135 *   email: bmazor@spiht.com *   http://www.cipr.rpi.edu/research/SPIHT *  * ----------------------------------------------------------------------------*//* * ---------------------------------------------------------------------------- *  * Public License for the 3D-SPIHT Algorithm * Version 1.1, March 8, 2004 *  * ---------------------------------------------------------------------------- *  * The 3D Set Partitioning In Hierarchical Trees (3D-SPIHT) algorithm is * protected by US patents 5,764,807 and 6,674,911, and other patents pending. * An implementation of the 3D-SPIHT algorithm is included herein with the * gracious permission of Dr. William A. Pearlman, President of PrimaComp, * Inc., exclusive holder of patent rights. PrimaComp, Inc., has granted the * following license governing the terms and conditions for use, copying, * distribution, and modification of the 3D-SPIHT algorithm implementation * contained herein (hereafter referred to as "the 3D-SPIHT source code"). *  * 0. Use of the 3D-SPIHT source code, including any executable-program or *    linkable-library form resulting from its compilation, is restricted to *    solely academic or non-commercial research activities. *  * 1. Any other use, including, but not limited to, use in the development *    of a commercial product, use in a commercial application, or commercial *    distribution, is prohibited by this license. Such acts require a separate *    license directly from Dr. Pearlman. *  * 2. For academic and non-commercial purposes, this license does not restrict *    use; copying, distribution, and modification are permitted under the *    terms of the GNU General Public License as published by the Free Software *    Foundation, with the further restriction that the terms of the present *    license shall also apply to all subsequent copies, distributions, *    or modifications of the 3D-SPIHT source code. *  * NO WARRANTY *  * 3. PrimaComp, Inc., dislaims all warranties, expressed or implied, including *    without limitation any warranty whatsoever as to the fitness for a *    particular use or the merchantability of the 3D-SPIHT source code. *  * 4. In no event shall PrimaComp, Inc., be liable for any loss of profits, *    loss of business, loss of use or loss of data, nor for indirect, special, *    incidental or consequential damages of any kind related to use of the *    3D-SPIHT source code. *  *  * END OF TERMS AND CONDITIONS *  *  * Persons desiring to license the 3D-SPIHT algorithm for commercial purposes * or for uses otherwise prohibited by this license may wish to contact * Dr. Pearlman regarding the possibility of negotiating such licenses: *  *   Dr. William A. Pearlman, President *   PrimaComp, Inc. *   851 Maxwell Drive *   Niskayuna, NY 12309 *   U.S.A. *    *   e-mail: wpearlman@spiht.com *   tel.: +1 (518) 522-7781 *   fax: +1 (518) 393-7412 *   * ---------------------------------------------------------------------------- */#ifndef LIBQCCPACKSPIHT_H#define LIBQCCPACKSPIHT_H/*  spiht_common.c  */#define QCCSPIHT_LICENSE "\n******************************************************************************\n  The Set Partitioning In Hierarchical Trees (SPIHT) algorithm is protected\n  by US Patent #5,764,807 (issued June 9, 1998), US Patent #6,674,911 (issued\n  January 6, 2004), and other international patents and patents pending. An\n  implementation of the SPIHT algorithm is included herein (utility programs\n  spihtencode and spihtdecode, and spiht.c in the QccPackSPIHT module of the\n  QccPack library) with the permission of PrimaComp, Inc., exclusive holder\n  of patent rights. PrimaComp has graciously granted a license with certain\n  restrictions governing the terms and conditions for use, copying,\n  distribution, and modification of the SPIHT algorithm implementation\n  contained herein. Specifically, only use in academic and non-commercial\n  research is permitted, while all commercial use is prohibited.  Refer to\n  the file LICENSE-SPIHT for more details.\n****************************************************************************"#define QCCSPIHT3D_LICENSE "\n******************************************************************************\n  The 3D Set Partitioning In Hierarchical Trees (3D-SPIHT) algorithm is\n  protected by US patents 5,764,807 and 6,674,911, and other patents pending.\n  An implementation of the 3D-SPIHT algorithm is included herein (utility\n  programs spihtencode3d and spihtdecode3d, and spiht3d.c in the QccPack\n  library) with the permission of PrimaComp, Inc., exclusive holder of\n  patent rights. PrimaComp has graciously granted a license with certain\n  restrictions governing the terms and conditions for use, copying,\n  distribution, and modification of the 3D-SPIHT algorithm implementation\n  contained herein. Specifically, only use in academic and non-commercial\n  research is permitted, while all commercial use is prohibited.  Refer to\n  the file LICENSE-3D-SPIHT for more details.\n  ******************************************************************************"#define QCCSPIHT_MAJORVERSION 0#define QCCSPIHT_MINORVERSION 57#define QCCSPIHT_COPYRIGHT "Copyright (C) 1997-2008 James E. Fowler"#define QCCSPIHT_DATE "30-jun-2008"void QccSPIHTHeader(void);void QccSPIHT3DHeader(void);/*  spiht.c  */int QccSPIHTEncode(const QccIMGImageComponent *image,                   const QccIMGImageComponent *mask,                   QccBitBuffer *buffer,                   int num_levels,                   const QccWAVWavelet *wavelet,                   const QccWAVPerceptualWeights *perceptual_weights,                   int target_bit_cnt,                   int arithmetic_coded,                   FILE *rate_distortion_file);int QccSPIHTEncode2(QccWAVSubbandPyramid *image_subband_pyramid,                    QccWAVSubbandPyramid *mask_subband_pyramid,                    double image_mean,                    QccBitBuffer *buffer,                    int target_bit_cnt,                    int arithmetic_coded,                    FILE *rate_distortion_file);int QccSPIHTDecodeHeader(QccBitBuffer *buffer,                          int *num_levels,                          int *num_rows,                         int *num_cols,                         double *image_mean,                         int *max_coefficient_bits,                         int *arithmetic_coded);int QccSPIHTDecode(QccBitBuffer *buffer,                   QccIMGImageComponent *image,                   const QccIMGImageComponent *mask,                   int num_levels,                   const QccWAVWavelet *wavelet,                   const QccWAVPerceptualWeights *perceptual_weights,                   double image_mean,                   int max_coefficient_bits,                   int target_bit_cnt,                   int arithmetic_coded);int QccSPIHTDecode2(QccBitBuffer *buffer,                    QccWAVSubbandPyramid *image_subband_pyramid,                    QccWAVSubbandPyramid *mask_subband_pyramid,                    int max_coefficient_bits,                    int target_bit_cnt,                    int arithmetic_coded);                    /*  spiht3d.c  */#define QCCSPIHT3D_ZEROTREE_DYADIC 0#define QCCSPIHT3D_ZEROTREE_PACKET 1#define QCCSPIHT3D_ZEROTREE_ASPACKET 2int QccSPIHT3DEncode(const QccIMGImageCube *image,                     const QccIMGImageCube *mask,                     QccBitBuffer *buffer,                     int transform_type,                     int zerotree_type,                     int temporal_num_levels,                     int spatial_num_levels,                     const QccWAVWavelet *wavelet,                     int target_bit_cnt,                     int arithmetic_coded);int QccSPIHT3DEncode2(QccWAVSubbandPyramid3D *image_subband_pyramid,                      QccWAVSubbandPyramid3D *mask_subband_pyramid,                      int transform_type,                      int zerotree_type,                      double image_mean,                      QccBitBuffer *buffer,                      int target_bit_cnt,                      int arithmetic_coded);int QccSPIHT3DDecodeHeader(QccBitBuffer *buffer,                            int *transform_type,                           int *zerotree_type,                           int *temporal_num_levels,                            int *spatial_num_levels,                            int *num_frames,                           int *num_rows,                           int *num_cols,                           double *image_mean,                           int *max_coefficient_bits,                           int *arithmetic_coded);int QccSPIHT3DDecode(QccBitBuffer *buffer,                     QccIMGImageCube *image,                     const QccIMGImageCube *mask,                     int transform_type,                     int zerotree_type,                     int temporal_num_levels,                     int spatial_num_levels,                     const QccWAVWavelet *wavelet,                     double image_mean,                     int max_coefficient_bits,                     int target_bit_cnt,                     int arithmetic_coded);int QccSPIHT3DDecode2(QccBitBuffer *buffer,                      QccWAVSubbandPyramid3D *image_subband_pyramid,                      QccWAVSubbandPyramid3D *mask_subband_pyramid,                      int transform_type,                      int zerotree_type,                      int temporal_num_levels,                      int spatial_num_levels,                      int max_coefficient_bits,                      int target_bit_cnt,                      int arithmetic_coded);#endif /* LIBQCCPACKSPIHT_H */

⌨️ 快捷键说明

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