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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? forwcomptransf.java

?? jpeg2000算法實(shí)現(xiàn)
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * CVS Identifier: * * $Id: ForwCompTransf.java,v 1.17 2000/12/05 22:45:20 grosbois Exp $ * * Class:               ForwCompTransf * * Description:         Component transformations applied to tiles * * * * COPYRIGHT: *  * This software module was originally developed by Rapha雔 Grosbois and * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel * Askel鰂 (Ericsson Radio Systems AB); and Bertrand Berthelot, David * Bouchard, F閘ix Henry, Gerard Mozelle and Patrice Onno (Canon Research * Centre France S.A) in the course of development of the JPEG2000 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This * software module is an implementation of a part of the JPEG 2000 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio * Systems AB and Canon Research Centre France S.A (collectively JJ2000 * Partners) agree not to assert against ISO/IEC and users of the JPEG * 2000 Standard (Users) any of their rights under the copyright, not * including other intellectual property rights, for this software module * with respect to the usage by ISO/IEC and Users of this software module * or modifications thereof for use in hardware or software products * claiming conformance to the JPEG 2000 Standard. Those intending to use * this software module in hardware or software products are advised that * their use may infringe existing patents. The original developers of * this software module, JJ2000 Partners and ISO/IEC assume no liability * for use of this software module or modifications thereof. No license * or right to this software module is granted for non JPEG 2000 Standard * conforming products. JJ2000 Partners have full right to use this * software module for his/her own purpose, assign or donate this * software module to any third party and to inhibit third parties from * using this software module for non JPEG 2000 Standard conforming * products. This copyright notice must be included in all copies or * derivative works of this software module. *  * Copyright (c) 1999/2000 JJ2000 Partners. * */package jj2000.j2k.image.forwcomptransf;import jj2000.j2k.wavelet.analysis.*;import jj2000.j2k.wavelet.*;import jj2000.j2k.encoder.*;import jj2000.j2k.image.*;import jj2000.j2k.util.*;import jj2000.j2k.*;/**  * This class apply component transformations to the tiles depending * on user specifications. These transformations can be used to * improve compression efficiency but are not related to colour * transforms used to map colour values for display purposes. JPEG * 2000 part I defines 2 component transformations: RCT (Reversible * Component Transformation) and ICT (Irreversible Component * Transformation). * * @see ModuleSpec * */public class ForwCompTransf extends ImgDataAdapter    implements BlkImgDataSrc {    /** Identifier for no component transformation. Value is 0. */    public static final int NONE = 0;    /** Identifier for the Forward Reversible Component Transformation        (FORW_RCT). Value is 1. */    public static final int FORW_RCT = 1;    /** Identifier for the Forward Irreversible Component        Transformation (FORW_ICT). Value is 2 */    public static final int FORW_ICT = 2;    /** The source of image data */    private BlkImgDataSrc src;    /** The component transformations specifications */    private CompTransfSpec cts;    /** The wavelet filter specifications */    private AnWTFilterSpec wfs;    /** The type of the current component transformation JPEG 2000     * part I only support NONE, FORW_RCT and FORW_ICT types*/    private int transfType = NONE;    /** The bit-depths of transformed components */    private int tdepth[];    /** Output block used instead of the one provided as an argument        if the later is DataBlkFloat.*/    private DataBlk outBlk;    /** Block used to request component with index 0 */    private DataBlkInt block0;    /** Block used to request component with index 1*/    private DataBlkInt block1;    /** Block used to request component with index 2*/    private DataBlkInt block2;     /**     * Constructs a new ForwCompTransf object that operates on the     * specified source of image data.     *     * @param imgSrc The source from where to get the data to be     * transformed     *     * @param encSpec The encoder specifications     *     * @see BlkImgDataSrc     * */    public ForwCompTransf(BlkImgDataSrc imgSrc, EncoderSpecs encSpec) {        super(imgSrc);	this.cts = encSpec.cts;        this.wfs = encSpec.wfs;        src = imgSrc;    }    /** The prefix for component transformation type: 'M' */    public final static char OPT_PREFIX = 'M';    /** The list of parameters that is accepted by the forward     * component transformation module. Options start with an 'M'. */    private final static String [][] pinfo = {	{ "Mct", "[<tile index>] [on|off] ...",	  "Specifies to use component transformation with some tiles. "+	  " If the wavelet transform is reversible (w5x3 filter), the "+          "Reversible Component Transformation (RCT) is applied. If not "+          "(w9x7 filter), the Irreversible Component Transformation (ICT)"+          " is used.", null},    };    /**     * Returns the position of the fixed point in the specified     * component. This is the position of the least significant integral     * (i.e. non-fractional) bit, which is equivalent to the number of     * fractional bits. For instance, for fixed-point values with 2 fractional     * bits, 2 is returned. For floating-point data this value does not apply     * and 0 should be returned. Position 0 is the position of the least     * significant bit in the data.     *     * <P>This default implementation assumes that the number of     * fractional bits is not modified by the component mixer.     *     * @param c The index of the component.     *     * @return The value of the fixed point position of the source     * since the color transform does not affect it.     * */     public int getFixedPoint(int c){         return src.getFixedPoint(c);             }                   /**     * Returns the parameters that are used in this class and implementing     * classes. It returns a 2D String array. Each of the 1D arrays is for a     * different option, and they have 4 elements. The first element is the     * option name, the second one is the synopsis, the third one is a long     * description of what the parameter is and the fourth is its default     * value. The synopsis or description may be 'null', in which case it is     * assumed that there is no synopsis or description of the option,     * respectively. Null may be returned if no options are supported.     *     * @return the options name, their synopsis and their explanation,      * or null if no options are supported.     * */    public static String[][] getParameterInfo(){        return pinfo;    }    /**     * Calculates the bitdepths of the transformed components, given the     * bitdepth of the un-transformed components and the component     * tranformation type.     *     * @param ntdepth The bitdepth of each non-transformed components.     *     * @param ttype The type ID of the component transformation.     *     * @param tdepth If not null the results are stored in this     * array, otherwise a new array is allocated and returned.     *     * @return The bitdepth of each transformed component.     * */    public static        int[] calcMixedBitDepths(int ntdepth[], int ttype, int tdepth[]) {        if (ntdepth.length < 3 && ttype != NONE) {            throw new IllegalArgumentException();        }        if (tdepth == null) {            tdepth = new int[ntdepth.length];        }        switch (ttype) {        case NONE:            System.arraycopy(ntdepth,0,tdepth,0,ntdepth.length);            break;        case FORW_RCT:            if (ntdepth.length >3) {                System.arraycopy(ntdepth,3,tdepth,3,ntdepth.length-3);            }            // The formulas are:            // tdepth[0] = ceil(log2(2^(ntdepth[0])+2^ntdepth[1]+            //                        2^(ntdepth[2])))-2+1            // tdepth[1] = ceil(log2(2^(ntdepth[1])+2^(ntdepth[2])-1))+1            // tdepth[2] = ceil(log2(2^(ntdepth[0])+2^(ntdepth[1])-1))+1            // The MathUtil.log2(x) function calculates floor(log2(x)), so we            // use 'MathUtil.log2(2*x-1)+1', which calculates ceil(log2(x))            // for any x>=1, x integer.            tdepth[0] = MathUtil.log2((1<<ntdepth[0])+(2<<ntdepth[1])+                                      (1<<ntdepth[2])-1)-2+1;            tdepth[1] = MathUtil.log2((1<<ntdepth[2])+(1<<ntdepth[1])-1)+1;            tdepth[2] = MathUtil.log2((1<<ntdepth[0])+(1<<ntdepth[1])-1)+1;            break;        case FORW_ICT:            if (ntdepth.length >3) {                System.arraycopy(ntdepth,3,tdepth,3,ntdepth.length-3);            }            // The MathUtil.log2(x) function calculates floor(log2(x)), so we            // use 'MathUtil.log2(2*x-1)+1', which calculates ceil(log2(x))            // for any x>=1, x integer.            tdepth[0] =                MathUtil.log2((int)Math.floor((1<<ntdepth[0])*0.299072+                                              (1<<ntdepth[1])*0.586914+                                              (1<<ntdepth[2])*0.114014)-1)+1;            tdepth[1] =                MathUtil.log2((int)Math.floor((1<<ntdepth[0])*0.168701+                                              (1<<ntdepth[1])*0.331299+                                              (1<<ntdepth[2])*0.5)-1)+1;            tdepth[2] =                MathUtil.log2((int)Math.floor((1<<ntdepth[0])*0.5+                                              (1<<ntdepth[1])*0.418701+                                              (1<<ntdepth[2])*0.081299)-1)+1;            break;        }        return tdepth;    }    /**      * Initialize some variables used with RCT. It must be called, at least,     * at the beginning of each new tile.     * */    private void initForwRCT(){        int i;	        if (src.getNumComps() < 3) {            throw new IllegalArgumentException();        }        // Check that the 3 components have the same dimensions        if (src.getCompWidth(0) != src.getCompWidth(1) ||            src.getCompWidth(0) != src.getCompWidth(2) ||            src.getCompHeight(0) != src.getCompHeight(1) ||            src.getCompHeight(0) != src.getCompHeight(2)) {            throw new IllegalArgumentException("Can not use RCT "+                                               "on components with different "+                                               "dimensions");        }        // Initialize bitdepths        int utd[]; // Premix bitdepths        utd = new int[src.getNumComps()];        for (i=utd.length-1; i>=0; i--) {            utd[i] = src.getNomRangeBits(i);        }        tdepth = calcMixedBitDepths(utd,FORW_RCT,null);    }    /**      * Initialize some variables used with ICT. It must be called, at least,     * at the beginning of a new tile.     * */    private void initForwICT(){        int i;        if (src.getNumComps() < 3) {            throw new IllegalArgumentException();        }        // Check that the 3 components have the same dimensions        if (src.getCompWidth(0) != src.getCompWidth(1) ||            src.getCompWidth(0) != src.getCompWidth(2) ||            src.getCompHeight(0) != src.getCompHeight(1) ||            src.getCompHeight(0) != src.getCompHeight(2)) {            throw new IllegalArgumentException("Can not use ICT "+                                               "on components with different "+                                               "dimensions");        }        // Initialize bitdepths        int utd[]; // Premix bitdepths        utd = new int[src.getNumComps()];        for (i=utd.length-1; i>=0; i--) {            utd[i] = src.getNomRangeBits(i);        }        tdepth = calcMixedBitDepths(utd,FORW_ICT,null);    }    /**     * Returns a string with a descriptive text of which forward component     * transformation is used. This can be either "Forward RCT" or "Forward     * ICT" or "No component transformation" depending on the current tile.     *     * @return A descriptive string     * */    public String toString() {        switch(transfType){        case FORW_RCT:	    return "Forward RCT";        case FORW_ICT:	    return "Forward ICT";        case NONE:	    return "No component transformation";        default:            throw new IllegalArgumentException("Non JPEG 2000 part I"+                                               " component transformation");        }    }    /**     * Returns the number of bits, referred to as the "range bits",     * corresponding to the nominal range of the data in the specified     * component and in the current tile. If this number is <i>b</i> then for     * unsigned data the nominal range is between 0 and 2^b-1, and for signed     * data it is between -2^(b-1) and 2^(b-1)-1. Note that this value can be     * affected by the multiple component transform.     *     * @param c The index of the component.     *     * @return The bitdepth of component 'c' after mixing.     * */    public int getNomRangeBits(int c) {        switch(transfType){        case FORW_RCT:        case FORW_ICT:            return tdepth[c];        case NONE:            return src.getNomRangeBits(c);        default:            throw new IllegalArgumentException("Non JPEG 2000 part I"+                                               " component transformation");        }    }    /**     * Returns true if this transform is reversible in current     * tile. Reversible component transformations are those which operation     * can be completely reversed without any loss of information (not even     * due to rounding).     *     * @return Reversibility of component transformation in current tile     * */    public boolean isReversible(){        switch(transfType){        case NONE:        case FORW_RCT:            return true;        case FORW_ICT:            return false;        default:            throw new IllegalArgumentException("Non JPEG 2000 part I"+                                               " component transformation");        }    }    /**     * Apply forward component transformation associated with the current     * tile. If no component transformation has been requested by the user,     * data are not modified.     *     * <P>This method calls the getInternCompData() method, but respects the     * definitions of the getCompData() method defined in the BlkImgDataSrc     * interface.     *     * @param blk Determines the rectangular area to return, and the     * data is returned in this object.     *     * @param c Index of the output component.     *     * @return The requested DataBlk     *     * @see BlkImgDataSrc#getCompData     * */    public DataBlk getCompData(DataBlk blk, int c){        // If requesting a component whose index is greater than 3 or there is        // no transform return a copy of data (getInternCompData returns the        // actual data in those cases)        if (c>=3 || transfType == NONE) {            return src.getCompData(blk,c);        }        else { // We can use getInternCompData (since data is a copy anyways)            return getInternCompData(blk,c);        }    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区国产精华| 亚洲成人1区2区| 久久久久久亚洲综合| 欧美一区二区私人影院日本| 91麻豆视频网站| 91美女福利视频| 91论坛在线播放| 91免费看片在线观看| 91行情网站电视在线观看高清版| 国产999精品久久久久久绿帽| 精品午夜久久福利影院 | 亚洲国产一区二区三区| 亚洲少妇30p| 日韩美女视频一区二区| 亚洲人成7777| 亚洲福利一区二区| 蜜臀99久久精品久久久久久软件| 日韩精品国产精品| 国模少妇一区二区三区| 国产精品影视在线| 成a人片国产精品| 色国产精品一区在线观看| 欧亚一区二区三区| 欧美一卡二卡在线观看| 久久伊人中文字幕| 国产精品免费网站在线观看| 亚洲图片激情小说| 午夜影视日本亚洲欧洲精品| 免费看欧美女人艹b| 56国语精品自产拍在线观看| 欧美一级久久久| 久久一区二区视频| 国产精品国产三级国产aⅴ入口| 亚洲精品伦理在线| 日本不卡一区二区三区高清视频| 国产自产2019最新不卡| 成人动漫精品一区二区| 欧美亚洲一区二区在线| 欧美不卡视频一区| 国产精品国产三级国产a| 亚洲国产精品麻豆| 国产一区二区三区观看| 99精品国产99久久久久久白柏| 欧美视频一区二| 久久这里都是精品| 一区二区三区波多野结衣在线观看| 青青草原综合久久大伊人精品| 国产一区二区三区观看| 欧洲av在线精品| 国产亚洲一本大道中文在线| 一区二区三区欧美| 麻豆91在线播放免费| jizzjizzjizz欧美| 日韩一级免费一区| 综合色天天鬼久久鬼色| 蜜臀久久久久久久| 色综合天天综合狠狠| 日韩精品一区二区三区老鸭窝| 最新高清无码专区| 久久国产精品99久久久久久老狼 | 91传媒视频在线播放| 精品99一区二区| 夜夜嗨av一区二区三区中文字幕| 精品午夜一区二区三区在线观看| 在线精品观看国产| 亚洲国产精品黑人久久久| 日韩av中文字幕一区二区| 一本色道久久综合狠狠躁的推荐| 欧美va亚洲va在线观看蝴蝶网| 一区二区三区中文字幕精品精品| 国产一区二区三区观看| 91精品国产综合久久精品图片| 国产精品久久久久毛片软件| 久久电影网电视剧免费观看| 欧美系列一区二区| 日韩一区在线看| 国产麻豆视频精品| 日韩一区二区三区在线视频| 亚洲综合一区二区三区| 99久久99精品久久久久久| 亚洲精品一区二区三区福利| 婷婷久久综合九色综合绿巨人| 成人黄色777网| 久久网站热最新地址| 日本91福利区| 91精品国产综合久久福利| 一区二区三国产精华液| av男人天堂一区| 欧美国产禁国产网站cc| 国产在线精品不卡| 日韩你懂的在线播放| 日韩二区三区在线观看| 欧美色电影在线| 亚洲伊人色欲综合网| 91美女视频网站| 亚洲免费三区一区二区| 91在线无精精品入口| 国产精品萝li| 成人黄色软件下载| 国产精品久久久久久久久久久免费看 | 亚洲电影在线播放| 日本精品一区二区三区高清| 亚洲欧洲国产日本综合| 丁香六月久久综合狠狠色| 久久久午夜电影| 国产乱色国产精品免费视频| 欧美成人video| 极品少妇xxxx精品少妇| 精品久久久久香蕉网| 精品一二三四区| 国产香蕉久久精品综合网| 国产一区欧美日韩| 亚洲国产激情av| 不卡视频一二三四| 亚洲日本成人在线观看| 日本乱码高清不卡字幕| 亚洲成av人片在线观看无码| 欧美日韩电影一区| 日本成人在线视频网站| 欧美tk—视频vk| 国产成a人亚洲精| 国产精品久久久久婷婷| 欧美最猛性xxxxx直播| 亚洲第一精品在线| 欧美成人精品3d动漫h| 国产一区福利在线| 国产精品美女久久久久av爽李琼| 99久久免费精品高清特色大片| 亚洲视频1区2区| 欧美日本韩国一区| 精品亚洲欧美一区| 国产精品九色蝌蚪自拍| 欧美日韩精品是欧美日韩精品| 日韩二区三区在线观看| 久久精品人人做人人综合| 91色|porny| 免费成人深夜小野草| 中文字幕免费一区| 欧美在线观看18| 韩国三级中文字幕hd久久精品| 中文字幕第一区二区| 欧洲视频一区二区| 久久超碰97中文字幕| 国产精品免费丝袜| 69av一区二区三区| 国产sm精品调教视频网站| 一区二区国产视频| 欧美大胆一级视频| 91免费看片在线观看| 卡一卡二国产精品| 国产精品大尺度| 在线视频欧美精品| 久久国产麻豆精品| 亚洲精品乱码久久久久久久久| 日韩一二在线观看| av在线播放不卡| 午夜在线电影亚洲一区| 国产精品婷婷午夜在线观看| 欧美精品xxxxbbbb| 国产成人亚洲精品青草天美| 亚洲一区在线播放| 精品国产乱子伦一区| 日本高清不卡在线观看| 国产在线视频一区二区三区| 一区二区三区产品免费精品久久75| 26uuu色噜噜精品一区二区| 91国偷自产一区二区开放时间| 国内精品久久久久影院一蜜桃| 一区二区成人在线| 国产婷婷一区二区| 欧美一区二区三区不卡| 色婷婷亚洲婷婷| 国产精品夜夜嗨| 久久精品国产亚洲一区二区三区 | av激情亚洲男人天堂| 欧美精品乱码久久久久久按摩| 高清国产一区二区| 麻豆国产欧美日韩综合精品二区| 亚洲婷婷综合色高清在线| 国产亚洲综合性久久久影院| 91精品国产色综合久久不卡电影| 色综合久久综合中文综合网| 国产激情一区二区三区四区| 婷婷开心久久网| 亚洲国产成人高清精品| 亚洲天堂a在线| 亚洲国产精品成人综合| 久久久久久综合| 日韩欧美卡一卡二| 欧美日韩极品在线观看一区| 99久久国产综合精品色伊| 成人午夜视频网站| 久久99精品久久久久婷婷| 青青草97国产精品免费观看无弹窗版| 亚洲乱码日产精品bd| 中文一区二区完整视频在线观看| 精品国产欧美一区二区| 日韩欧美国产高清| 91精品久久久久久久久99蜜臂| 欧美撒尿777hd撒尿|