亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? synthesis.cpp

?? JPEG2000壓縮解壓圖像源碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*****************************************************************************/// File: synthesis.cpp [scope = CORESYS/TRANSFORMS]// Version: Kakadu, V2.2// Author: David Taubman// Last Revised: 20 June, 2001/*****************************************************************************/// Copyright 2001, David Taubman, The University of New South Wales (UNSW)// The copyright owner is Unisearch Ltd, Australia (commercial arm of UNSW)// Neither this copyright statement, nor the licensing details below// may be removed from this file or dissociated from its contents./*****************************************************************************/// Licensee: Book Owner// License number: 99999// The Licensee has been granted a NON-COMMERCIAL license to the contents of// this source file, said Licensee being the owner of a copy of the book,// "JPEG2000: Image Compression Fundamentals, Standards and Practice," by// Taubman and Marcellin (Kluwer Academic Publishers, 2001).  A brief summary// of the license appears below.  This summary is not to be relied upon in// preference to the full text of the license agreement, which was accepted// upon breaking the seal of the compact disc accompanying the above-mentioned// book.// 1. The Licensee has the right to Non-Commercial Use of the Kakadu software,//    Version 2.2, including distribution of one or more Applications built//    using the software, provided such distribution is not for financial//    return.// 2. The Licensee has the right to personal use of the Kakadu software,//    Version 2.2.// 3. The Licensee has the right to distribute Reusable Code (including//    source code and dynamically or statically linked libraries) to a Third//    Party, provided the Third Party possesses a license to use the Kakadu//    software, Version 2.2, and provided such distribution is not for//    financial return./******************************************************************************Description:   Implements the reverse DWT (subband/wavelet synthesis).  The implementationuses lifting to reduce memory and processing, while keeping as much of theimplementation as possible common to both the reversible and the irreversibleprocessing paths.  The implementation is generic to the extent that itsupports any odd-length symmetric wavelet kernels -- although only 3 arecurrently accepted by the "kdu_kernels" object.******************************************************************************/#include <assert.h>#include <string.h>#include <math.h>#include "kdu_messaging.h"#include "kdu_compressed.h"#include "kdu_sample_processing.h"#include "kdu_kernels.h"#include "synthesis_local.h"// Set things up for the inclusion of assembler optimized routines// for specific architectures.  The reason for this is to exploit// the availability of SIMD type instructions on many modern processors.#if defined KDU_PENTIUM_MSVC#  define KDU_SIMD_OPTIMIZATIONS#  include "msvc_dwt_mmx_local.h" // Header contains all asm commands in-linestatic int simd_exists = msvc_dwt_mmx_exists();#elif defined KDU_PENTIUM_GCC#  define KDU_SIMD_OPTIMIZATIONS#  include "gcc_dwt_mmx_local.h" // Header declares functs in separate .s filestatic int simd_exists = gcc_dwt_mmx_exists();#endif // KDU_PENTIUM_GCC/* ========================================================================= *//*                               kdu_synthesis                               *//* ========================================================================= *//*****************************************************************************//*                        kdu_synthesis::kdu_synthesis                       *//*****************************************************************************/kdu_synthesis::kdu_synthesis(kdu_resolution resolution,                             kdu_sample_allocator *allocator,                             bool use_shorts, float normalization)  // In the future, we may create separate, optimized objects for each kernel.{  state = new kd_synthesis(resolution,allocator,use_shorts,normalization);}/* ========================================================================= *//*                              kd_synthesis                                 *//* ========================================================================= *//*****************************************************************************//*                       kd_synthesis::kd_synthesis                          *//*****************************************************************************/kd_synthesis::kd_synthesis(kdu_resolution resolution,                           kdu_sample_allocator *allocator,                           bool use_shorts, float normalization){  reversible = resolution.get_reversible();  this->use_shorts = use_shorts;  int kernel_id = resolution.get_kernel_id();  kdu_kernels kernels(kernel_id,reversible);  float low_gain, high_gain;  float *factors =    kernels.get_lifting_factors(L_max,low_gain,high_gain);  int n;  assert(L_max <= 4); // We have statically sized the array to improve locality  for (n=0; n < L_max; n++)    {      steps[n].augend_parity = (n+1) & 1; // Step 0 updates odd locations      steps[n].lambda = factors[n];      if (kernels.get_lifting_downshift(n,steps[n].downshift))        { // Reversible case          steps[n].i_lambda = (kdu_int32)            floor(0.5 + steps[n].lambda*(1<<steps[n].downshift));        }      else        { // Irreversible case          steps[n].i_lambda = steps[n].downshift = 0;          kdu_int32 fix_lambda = (kdu_int32) floor(0.5 + factors[n]*(1<<16));          steps[n].fixpoint.fix_lambda = fix_lambda;          steps[n].fixpoint.i_lambda = 0;          while (fix_lambda >= (1<<15))            { steps[n].fixpoint.i_lambda++; fix_lambda -= (1<<16); }          while (fix_lambda < -(1<<15))            { steps[n].fixpoint.i_lambda--; fix_lambda += (1<<16); }          steps[n].fixpoint.remainder = (kdu_int16) fix_lambda;          steps[n].fixpoint.pre_offset = (kdu_int16)            floor(0.5 + ((double)(1<<15)) / ((double) fix_lambda));        }    }  kdu_dims dims;  kdu_coords min, max;  // Get output dimensions.  resolution.get_dims(dims);  min = dims.pos; max = min + dims.size; max.x--; max.y--;  y_out_next = min.y;  y_out_max = max.y;  x_out_min = min.x;  x_out_max = max.x;    empty = !dims;  if (empty)    return;  // Get input dimensions.  Note that the following code contains assert  // statements which may fail if the low- and high-pass filter lengths do not  // differ by 2 (as reported by `kdu_kernels' and used in `kdu_resolution' to  // compute the effects of kernel support on regions of interest.  resolution.access_next().get_dims(dims); // low-pass dimensions.  low_width = dims.size.x;  min = dims.pos; max = min + dims.size; max.x--; max.y--;  min.x+=min.x; min.y+=min.y; max.x+=max.x; max.y+=max.y;  y_in_next = min.y;  y_in_max = max.y;  x_in_min = min.x;  x_in_max = max.x;  resolution.access_subband(HH_BAND).get_dims(dims); // high-pass dimensions.  high_width = dims.size.x;  min = dims.pos; max = min + dims.size; max.x--; max.y--;  min.x+=min.x+1; min.y+=min.y+1; max.x+=max.x+1; max.y+=max.y+1;  assert(min.y <= y_in_next+1);  if (min.y < y_in_next)    { y_in_next--; assert(min.y==y_in_next); }  assert(max.y >= y_in_max-1);  if (max.y > y_in_max)    { y_in_max++; assert(max.y==y_in_max); }  assert(min.x <= x_in_min+1);  if (min.x < x_in_min)    { x_in_min--; assert(min.x==x_in_min); }  assert(max.x >= x_in_max-1);  if (max.x > x_in_max)    { x_in_max++; assert(max.x==x_in_max); }  assert((y_in_next <= y_out_next) && (y_in_max >= y_out_max));  assert((x_in_min <= x_out_min) && (x_in_max >= x_out_max));  assert((y_in_next <= y_in_max) && (x_in_min <= x_in_max));    unit_height = (y_in_next==y_in_max);  unit_width = (x_in_min==x_in_max);  // Pre-allocate the line buffers.  augend.pre_create(allocator,low_width,high_width,reversible,use_shorts);  new_state.pre_create(allocator,low_width,high_width,reversible,use_shorts);  for (n=0; n < L_max; n++)    steps[n].state.pre_create(allocator,low_width,high_width,                              reversible,use_shorts);  initialized = false; // Finalize creation in the first `push' call.  // Now determine the normalizing upshift and subband nominal ranges.  float LL_range, HL_range, LH_range, HH_range;  LL_range = HL_range = LH_range = HH_range = normalization;  normalizing_upshift = 0;  if (!reversible)    {      int lev_idx = resolution.get_dwt_level(); assert(lev_idx > 0);      double bibo_low, bibo_high, bibo_prev;      kernels.get_bibo_gains(lev_idx-1,bibo_prev,bibo_high);      double *bibo_steps = kernels.get_bibo_gains(lev_idx,bibo_low,bibo_high);      double bibo_max = 0.0;      // Find BIBO and nominal ranges for the vertical analysis transform.      if (unit_height)        bibo_max = normalization;      else        {          LL_range /= low_gain;  HL_range /= low_gain;          LH_range /= high_gain; HH_range /= high_gain;          bibo_prev *= normalization; // BIBO horizontal range at stage input          for (n=0; n < L_max; n++)            if ((bibo_prev * bibo_steps[n]) > bibo_max)              bibo_max = bibo_prev * bibo_steps[n];        }      // Find BIBO gains for horizontal analysis      if (!unit_width)        {          LL_range /= low_gain;  LH_range /= low_gain;          HL_range /= high_gain; HH_range /= high_gain;          bibo_prev = bibo_low / low_gain; // If bounded by vertical low band          if ((bibo_high / high_gain) > bibo_prev)            bibo_prev = bibo_high / high_gain; // Bounded by vertical high band          bibo_prev *= normalization; // BIBO vertical range at horiz. input          for (n=0; n < L_max; n++)            if ((bibo_prev * bibo_steps[n]) > bibo_max)              bibo_max = bibo_prev * bibo_steps[n];        }      double overflow_limit = 1.0 * (double)(1<<(16-KDU_FIX_POINT));          // This is the largest numeric range which can be represented in          // our signed 16-bit fixed-point representation without overflow.      while (bibo_max > 0.75*overflow_limit)        { // Leave some extra headroom to allow for the effects of          // dequantization artefacts.          normalizing_upshift++;          LL_range*=0.5F; LH_range*=0.5F; HL_range*=0.5F; HH_range*=0.5F;          bibo_max *= 0.5;        }    }  // Finally, create the subband interfaces.  assert(resolution.which() > 0);  if (resolution.which() == 1)    hor_low[0] = kdu_decoder(resolution.access_next().access_subband(LL_BAND),                             allocator,use_shorts,LL_range);  else    hor_low[0] = kdu_synthesis(resolution.access_next(),                               allocator,use_shorts,LL_range);  hor_high[0]  = kdu_decoder(resolution.access_subband(HL_BAND),                             allocator,use_shorts,HL_range);  hor_low[1]   = kdu_decoder(resolution.access_subband(LH_BAND),                             allocator,use_shorts,LH_range);  hor_high[1]  = kdu_decoder(resolution.access_subband(HH_BAND),                             allocator,use_shorts,HH_range);}/*****************************************************************************//*                      kd_synthesis::~kd_synthesis                          *//*****************************************************************************/kd_synthesis::~kd_synthesis(){  hor_low[0].destroy();  hor_low[1].destroy();  hor_high[0].destroy();  hor_high[1].destroy();}/*****************************************************************************//*                           kd_synthesis::pull                              *//*****************************************************************************/void  kd_synthesis::pull(kdu_line_buf &line, bool allow_exchange){  if (empty)    return;  if (!initialized)    { // Finish creating all the buffers.      augend.create(); augend.deactivate();      new_state.create(); new_state.deactivate();      for (int n=0; n < L_max; n++)        { steps[n].state.create(); steps[n].state.deactivate(); }      initialized = true;    }  int c, k;  kd_line_cosets *out = (y_out_next & 1)?(&new_state):(&augend);  assert(y_out_next <= y_out_max);  if (unit_height)    { // No transform performed in this special case.      horizontal_synthesis(*out);      if (reversible && (y_out_next & 1))        { // Need to halve integer sample values.          if (!use_shorts)            { // Working with 32-bit data              kdu_sample32 *dp;              for (c=0; c < 2; c++)                for (dp=out->cosets[c].get_buf32(),                     k=out->cosets[c].get_width(); k--; dp++)                  dp->ival >>= 1;            }          else            { // Working with 16-bit data              kdu_sample16 *dp;              for (c=0; c < 2; c++)                for (dp=out->cosets[c].get_buf16(),                     k=out->cosets[c].get_width(); k--; dp++)                  dp->ival >>= 1;            }        }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线高清视频| 免费在线一区观看| 91一区二区在线| 国产精品久久久久毛片软件| 丰满少妇在线播放bd日韩电影| 久久一区二区三区四区| 国产尤物一区二区| 国产精品乱码妇女bbbb| 91亚洲男人天堂| 亚洲综合偷拍欧美一区色| 欧美男男青年gay1069videost | 51精品秘密在线观看| 麻豆精品国产传媒mv男同 | 国产精品天天看| 成人晚上爱看视频| 亚洲九九爱视频| 欧美一区三区四区| 国产一区不卡精品| 亚洲精品欧美综合四区| 日韩一区二区三区视频在线观看| 国产精品一区二区三区网站| 国产精品成人在线观看| 欧美日韩国产色站一区二区三区| 久久99最新地址| 1区2区3区精品视频| 欧美男人的天堂一二区| 成人自拍视频在线| 午夜私人影院久久久久| 久久精品水蜜桃av综合天堂| 欧美亚洲综合在线| 国产尤物一区二区| 性做久久久久久久久| 国产日韩av一区二区| 欧美三区免费完整视频在线观看| 日韩av电影免费观看高清完整版| 久久毛片高清国产| 欧美日韩一区三区四区| 成人精品免费网站| 日本网站在线观看一区二区三区 | 国产三级精品三级在线专区| 欧美午夜精品理论片a级按摩| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲精品免费视频| 国产欧美视频一区二区三区| 欧美日韩国产首页| 色婷婷综合五月| 国产精品一区二区久激情瑜伽 | 亚洲日本在线天堂| 久久久久久99精品| 日韩午夜在线观看| 在线视频欧美区| 成人精品视频一区二区三区| 久久97超碰国产精品超碰| 亚洲成在人线免费| 亚洲老妇xxxxxx| 国产精品久久久久aaaa| 亚洲精品伦理在线| 国产女同性恋一区二区| 日韩色在线观看| 欧美日韩五月天| 欧美三级电影精品| 色婷婷国产精品久久包臀| 波多野结衣中文字幕一区二区三区| 精品一区二区三区香蕉蜜桃| 婷婷夜色潮精品综合在线| 一级精品视频在线观看宜春院| 国产精品毛片无遮挡高清| 国产欧美综合在线| 久久亚洲精品小早川怜子| 日韩精品一区二区三区视频在线观看| 日本高清不卡在线观看| 色综合天天综合给合国产| jlzzjlzz亚洲日本少妇| 成人18视频在线播放| 国产99久久久久| 成+人+亚洲+综合天堂| 国产.欧美.日韩| 成人精品国产福利| 不卡在线观看av| 91在线免费视频观看| 97久久精品人人做人人爽50路 | 一片黄亚洲嫩模| 亚洲va天堂va国产va久| 亚州成人在线电影| 欧美bbbbb| 狠狠色丁香婷婷综合| 国产成人av电影免费在线观看| 成人午夜激情影院| 91一区一区三区| 欧美日韩精品免费| 91精品国产色综合久久不卡蜜臀 | 亚洲123区在线观看| 亚洲成人中文在线| 美女视频网站黄色亚洲| 国产经典欧美精品| 99精品欧美一区| 欧美色图免费看| 日韩午夜在线影院| 国产日韩欧美精品综合| 国产精品国产精品国产专区不蜜 | 亚洲人成伊人成综合网小说| 亚洲精品视频在线观看网站| 日韩黄色免费电影| 国产乱码精品一区二区三 | 国产精品夜夜嗨| 91老司机福利 在线| 欧美日韩国产一区| 久久久久久久综合狠狠综合| 国产精品免费人成网站| 亚洲电影激情视频网站| 韩国午夜理伦三级不卡影院| 99久久99久久精品国产片果冻| 欧美日韩免费电影| 国产色综合一区| 亚洲一区影音先锋| 国产精品综合二区| 欧美日韩一区二区三区四区五区| 精品剧情v国产在线观看在线| 日本一区二区视频在线观看| 亚洲午夜电影在线| 国产乱码一区二区三区| 在线看国产日韩| 久久久精品2019中文字幕之3| 日韩国产欧美在线视频| proumb性欧美在线观看| 日韩一区二区中文字幕| 亚洲欧洲性图库| 久久99精品视频| 欧美在线|欧美| 亚洲国产精品二十页| 午夜久久久久久电影| 91一区在线观看| 国产亚洲精品超碰| 免费在线观看一区| 在线看国产一区二区| 国产精品久久久久桃色tv| 麻豆成人av在线| 欧美日韩国产精品自在自线| 中文字幕一区二区三区色视频| 美女脱光内衣内裤视频久久网站 | 中文字幕一区二区三区四区| 久久国产精品第一页| 欧美影视一区二区三区| 国产精品丝袜久久久久久app| 美腿丝袜亚洲色图| 欧美日韩在线播放三区| 亚洲日本中文字幕区| 国产成人免费视频网站| 精品日韩一区二区三区免费视频| 亚洲狠狠爱一区二区三区| 99久久精品免费精品国产| 久久久精品国产99久久精品芒果 | 欧美美女一区二区| 亚洲一区二区三区视频在线| 色综合久久99| 国产精品久久影院| 成人精品一区二区三区中文字幕| 久久免费精品国产久精品久久久久| 毛片av一区二区| 91精品免费观看| 亚洲成在人线在线播放| 欧美午夜宅男影院| 性做久久久久久免费观看欧美| 欧美羞羞免费网站| 亚洲已满18点击进入久久| 在线观看av一区| 亚洲网友自拍偷拍| 欧美日韩1234| 日韩专区欧美专区| 欧美一级视频精品观看| 琪琪一区二区三区| 欧美成人猛片aaaaaaa| 久久国产乱子精品免费女| 精品国精品自拍自在线| 国产在线精品免费| 国产欧美精品在线观看| 成人一二三区视频| 亚洲丝袜另类动漫二区| 欧洲人成人精品| 午夜视黄欧洲亚洲| 日韩午夜激情视频| 国产麻豆视频精品| 国产精品护士白丝一区av| 99久久久精品| 丝袜美腿亚洲色图| 久久综合九色综合97_久久久| 极品尤物av久久免费看| 欧美激情一区二区三区四区| 成人18视频日本| 亚洲成av人片在线观看无码| 欧美一区二区三区小说| 久久av老司机精品网站导航| 精品日韩在线观看| 91丝袜美女网| 亚洲国产精品欧美一二99| 91精品国产美女浴室洗澡无遮挡| 精品一区在线看| 亚洲精品国产成人久久av盗摄| 91 com成人网| 国产91清纯白嫩初高中在线观看 |