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

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

?? analysis.cpp

?? DWT分析濾波器的VC++ 代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*****************************************************************************/// File: analysis.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 forward DWT (subband/wavelet analysis).  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 "analysis_local.h"/* ========================================================================= *//*                               kdu_analysis                                *//* ========================================================================= *//*****************************************************************************//*                         kdu_analysis::kdu_analysis                        *//*****************************************************************************/kdu_analysis::kdu_analysis(kdu_resolution resolution,                           kdu_sample_allocator *allocator,                           bool use_shorts, float normalization,                           kdu_roi_node *roi)  // In the future, we may create separate, optimized objects for each kernel.{  state = new kd_analysis(resolution,allocator,use_shorts,normalization,roi);}/* ========================================================================= *//*                              kd_analysis                                  *//* ========================================================================= *//*****************************************************************************//*                        kd_analysis::kd_analysis                           *//*****************************************************************************/kd_analysis::kd_analysis(kdu_resolution resolution,                         kdu_sample_allocator *allocator,                         bool use_shorts, float normalization,                         kdu_roi_node *roi){  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;  if ((roi != NULL) && !resolution.propagate_roi())    {      roi->release();      roi = NULL;    }  if (roi != NULL)    roi_level.create(resolution,roi);  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_next = min.y;  y_max = max.y;  x_min = min.x;  x_max = max.x;    empty = !dims;  unit_height = (y_next==y_max);  unit_width = (x_min==x_max);  low_width = ((max.x+2)>>1) - ((min.x+1)>>1);  high_width = ((max.x+1)>>1) - (min.x>>1);  output_rows_remaining = y_max+1-y_next;  if (empty)    return;  // 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 downshift and subband nominal ranges.  float LL_range, HL_range, LH_range, HH_range;  LL_range = HL_range = LH_range = HH_range = normalization;  normalizing_downshift = 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.95*overflow_limit)        { // Leave a little extra headroom to allow for approximations in          // the numerical BIBO gain calculations.          normalizing_downshift++;          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.  kdu_roi_node *LL_node=NULL, *HL_node=NULL, *LH_node=NULL, *HH_node=NULL;  if (roi != NULL)    {      LL_node = roi_level.acquire_node(LL_BAND);      HL_node = roi_level.acquire_node(HL_BAND);      LH_node = roi_level.acquire_node(LH_BAND);      HH_node = roi_level.acquire_node(HH_BAND);    }  assert(resolution.which() > 0);  if (resolution.which() == 1)    hor_low[0] = kdu_encoder(resolution.access_next().access_subband(LL_BAND),                             allocator,use_shorts,LL_range,LL_node);  else    hor_low[0] = kdu_analysis(resolution.access_next(),                              allocator,use_shorts,LL_range,LL_node);  hor_high[0] = kdu_encoder(resolution.access_subband(HL_BAND),                            allocator,use_shorts,HL_range,HL_node);  hor_low[1] = kdu_encoder(resolution.access_subband(LH_BAND),                           allocator,use_shorts,LH_range,LH_node);  hor_high[1] = kdu_encoder(resolution.access_subband(HH_BAND),                            allocator,use_shorts,HH_range,HH_node);}/*****************************************************************************//*                       kd_analysis::~kd_analysis                           *//*****************************************************************************/kd_analysis::~kd_analysis(){  hor_low[0].destroy();  hor_low[1].destroy();  hor_high[0].destroy();  hor_high[1].destroy();  if (roi_level.exists())    roi_level.destroy(); // Important to do this last, giving descendants a                         // chance to call the `release' function on their                         // `roi_node' interfaces.}/*****************************************************************************//*                            kd_analysis::push                              *//*****************************************************************************/void  kd_analysis::push(kdu_line_buf &line, bool allow_exchange){  assert(y_next <= y_max);  assert(reversible == line.is_absolute());  if (empty)    {      y_next++;      output_rows_remaining--;      return;    }  int k, c;  if (!initialized)    { // Finish creating all the buffers.      augend.create(); augend.deactivate();      new_state.create(); new_state.deactivate();      for (k=0; k < L_max; k++)        { steps[k].state.create(); steps[k].state.deactivate(); }      initialized = true;    }  // Determine the appropriate input line.  kd_line_cosets *in = (y_next & 1)?(&augend):(&new_state);  if (!in->is_active())    in->activate();  in->lnum = y_next++;  // Copy the samples from `line', de-interleaving even and odd cosets  assert(line.get_width() == (low_width+high_width));  c = x_min & 1; // Index of first coset to be de-interleaved.  k = (line.get_width()+1)>>1; // May move one extra sample.  if (!use_shorts)    { // Working with 32-bit data      kdu_sample32 *sp = line.get_buf32();      kdu_sample32 *dp1 = in->cosets[c].get_buf32();      kdu_sample32 *dp2 = in->cosets[1-c].get_buf32();      if (normalizing_downshift == 0)        for (; k--; sp+=2, dp1++, dp2++)          { *dp1 = sp[0]; *dp2 = sp[1]; }      else        {          float scale = 1.0F / (float)(1<<normalizing_downshift);          for (; k--; sp+=2, dp1++, dp2++)            {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人97人人超碰人人99| 亚洲一区在线观看免费| www日韩大片| 91精品综合久久久久久| 99久久99精品久久久久久 | 久久久久久亚洲综合影院红桃| 欧美日韩成人在线| 91精品免费在线观看| 欧美视频在线一区二区三区| 欧美色图12p| 91精品国产欧美一区二区18| 日韩欧美高清在线| 国产网站一区二区| 欧美国产综合一区二区| 综合av第一页| 中文子幕无线码一区tr| 日韩视频免费观看高清完整版| 欧美日韩国产成人在线免费| 国产丝袜在线精品| 国产亲近乱来精品视频| 亚洲色图制服丝袜| 首页国产欧美日韩丝袜| 精品一区二区成人精品| 成人国产精品免费观看| 91成人在线精品| 日韩一区二区三免费高清| 久久久不卡网国产精品一区| 国产精品福利一区二区三区| 欧美在线观看视频在线| 欧美一区二区三区免费在线看| 欧美va亚洲va在线观看蝴蝶网| 中文字幕不卡的av| 图片区小说区区亚洲影院| 国产精一区二区三区| 日本久久电影网| 精品国产人成亚洲区| 亚洲精品久久久蜜桃| 美国三级日本三级久久99| 91在线视频播放| 精品国产91亚洲一区二区三区婷婷| 国产精品免费久久| 久久99国产精品免费网站| 色综合天天综合网国产成人综合天| 欧美一区二区三区色| 亚洲青青青在线视频| 韩国一区二区视频| 欧美久久一区二区| 综合激情成人伊人| 成人网在线播放| 精品国精品国产尤物美女| 亚洲国产一区二区三区| 成人av资源在线| 久久久九九九九| 亚洲线精品一区二区三区八戒| 国产成人av福利| 日韩一级成人av| 婷婷开心久久网| 在线视频国内一区二区| 国产精品对白交换视频| 国产美女精品在线| 欧美不卡一区二区| 免费在线欧美视频| 91精品国产手机| 视频在线观看一区二区三区| 国产精品1024| 精品福利一区二区三区免费视频| 午夜精品福利一区二区蜜股av| 一本大道久久a久久综合| 国产精品午夜电影| 成人免费视频caoporn| 久久香蕉国产线看观看99| 美脚の诱脚舐め脚责91| 91精品国产乱码| 亚洲国产你懂的| 亚洲国产精品嫩草影院| 91麻豆国产自产在线观看| 日韩理论在线观看| 99re视频精品| 亚洲九九爱视频| 欧美在线一区二区| 亚洲大片免费看| 欧美日本不卡视频| 美国av一区二区| 久久综合久久鬼色中文字| 国产真实乱偷精品视频免| 国产日韩av一区| av成人免费在线观看| 亚洲精品中文字幕在线观看| 欧美三级视频在线| 麻豆精品在线播放| 国产欧美日韩激情| 日本道免费精品一区二区三区| 亚洲电影一级片| 精品国产1区二区| 99在线精品免费| 亚洲国产精品尤物yw在线观看| 欧美日韩国产另类一区| 久久丁香综合五月国产三级网站| 久久综合给合久久狠狠狠97色69| 成人综合激情网| 一区二区高清视频在线观看| 日韩一区二区中文字幕| 国产九色精品成人porny | 久久国产精品99精品国产| 久久久99久久| 欧美三级蜜桃2在线观看| 麻豆精品视频在线观看免费| 国产精品第13页| 91精品国产高清一区二区三区| 国产91精品欧美| 三级不卡在线观看| 国产嫩草影院久久久久| 欧美日韩一区二区三区在线| 国产一区二区三区久久久| 亚洲一区二区三区不卡国产欧美| 一区免费观看视频| 国产成人免费视频网站| 一区二区在线看| 精品福利一区二区三区 | 成a人片亚洲日本久久| 亚洲午夜一区二区| 国产欧美精品国产国产专区| 欧美性色aⅴ视频一区日韩精品| 狠狠色狠狠色综合系列| 亚洲国产欧美日韩另类综合| 国产日韩欧美精品电影三级在线| 欧美午夜精品一区二区三区 | 日本一区二区三区免费乱视频| 欧美主播一区二区三区美女| 国产91精品露脸国语对白| 日本中文在线一区| 亚洲国产日韩a在线播放性色| 精品剧情在线观看| 国产一区二区三区四| 亚洲国产人成综合网站| 亚洲天堂av老司机| 欧美激情中文不卡| 久久综合中文字幕| 欧美岛国在线观看| 7777精品伊人久久久大香线蕉 | 欧美成人a在线| 欧美三级一区二区| 在线亚洲一区二区| 色哟哟一区二区在线观看| 成人天堂资源www在线| 国产一区二区精品久久99| 久久国产视频网| 老司机精品视频一区二区三区| 日一区二区三区| 日韩av网站免费在线| 天堂一区二区在线免费观看| 亚洲123区在线观看| 亚洲国产欧美一区二区三区丁香婷| 亚洲色图.com| 亚洲美女视频一区| 洋洋成人永久网站入口| 亚洲午夜久久久久中文字幕久| 亚洲精品国产a| 夜夜爽夜夜爽精品视频| 亚洲制服欧美中文字幕中文字幕| 一个色妞综合视频在线观看| 亚洲一区二区三区美女| 日韩精品午夜视频| 日本特黄久久久高潮| 精品影视av免费| 豆国产96在线|亚洲| 97精品国产露脸对白| 色诱视频网站一区| 欧美精品久久久久久久久老牛影院| 欧美色中文字幕| 日韩精品一区二区三区swag| 精品国产乱码久久久久久闺蜜| 欧美精品一区二区三区蜜桃 | 亚洲国产精品久久艾草纯爱| 视频在线观看91| 国产乱码精品1区2区3区| 波多野结衣91| 欧美色窝79yyyycom| 日韩欧美视频一区| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美日韩一二三| 91麻豆精品国产无毒不卡在线观看| 欧美一区二区三区电影| 2020日本不卡一区二区视频| 综合激情成人伊人| 蜜臀av一区二区在线免费观看 | 一区二区在线电影| 美国十次综合导航| 91影视在线播放| 精品日韩av一区二区| 国产精品不卡视频| 美女视频黄免费的久久| k8久久久一区二区三区| 欧美一区二区三区四区五区| 国产精品人成在线观看免费| 日日夜夜精品视频免费| 波多野结衣的一区二区三区| 日韩你懂的在线观看| 亚洲免费观看高清完整版在线| 久久精工是国产品牌吗|