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

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

?? postcomprateallocator.java

?? jpeg2000算法實現
?? JAVA
字號:
/* * CVS identifier: * * $Id: PostCompRateAllocator.java,v 1.50 2001/02/19 11:18:48 grosbois Exp $ * * Class:                   PostCompRateAllocator * * Description:             Generic interface for post-compression *                          rate allocator. * * * * 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.entropy.encoder;import jj2000.j2k.codestream.writer.*;import jj2000.j2k.wavelet.analysis.*;import jj2000.j2k.codestream.*;import jj2000.j2k.entropy.*;import jj2000.j2k.encoder.*;import jj2000.j2k.image.*;import jj2000.j2k.util.*;import jj2000.j2k.*;import java.io.*;/** * This is the abstract class from which post-compression rate allocators * which generate layers should inherit. The source of data is a * 'CodedCBlkDataSrcEnc' which delivers entropy coded blocks with * rate-distortion statistics. * * <P>The post compression rate allocator implementation should create the * layers, according to a rate allocation policy, and send the packets to a * CodestreamWriter. Since the rate allocator sends the packets to the bit * stream then it should output the packets to the bit stream in the order * imposed by the bit stream profiles. * * @see CodedCBlkDataSrcEnc * * @see jj2000.j2k.codestream.writer.CodestreamWriter * */public abstract class PostCompRateAllocator extends ImgDataAdapter {    /** The prefix for rate allocation options: 'A' */    public final static char OPT_PREFIX = 'A';    /** The list of parameters that is accepted for entropy coding. Options      * for entropy coding start with 'R'. */    private final static String [][] pinfo = {        { "Aptype", "[<tile idx>] res|layer|res-pos|"+          "pos-comp|comp-pos [res_start comp_start layer_end res_end "+          "comp_end "+          "prog] [[res_start comp_start ly_end res_end comp_end prog] ...] ["+          "[<tile-component idx>] ...]",          "Specifies which type of progression should be used when "+          "generating "+          "the codestream. The 'res' value generates a resolution "+          "progressive codestream with the number of layers specified by "+	  "'Alayers' option. The 'layer' value generates a layer progressive "+	  "codestream with multiple layers. In any case the rate-allocation "+          "algorithm optimizes for best quality in each layer. The quality "+          "measure is mean squared error (MSE) or a weighted version of it "+          "(WMSE). If no progression type is specified or imposed by other "+          "modules, the default value is 'layer'.\n"+          "It is also possible to describe progression order changes. In "+          "this case, 'res_start' is the index (from 0) of the first "+          "resolution "+	  "level, 'comp_start' is the index (from 0) of the first component, "+          "'ly_end' is the index (from 0) of the first layer not included, "+	  "'res_end' is the index (from 0) of the first resolution level not "+	  "included, 'comp_end' is index (from 0) of the first component not "+	  "included and 'prog' is the progression type to be used "+          "for the rest of the tile/image. Several progression order changes "+          "can be specified, one after the other."          , null},        { "Alayers", "<rate> [+<layers>] [<rate [+<layers>] [...]]",          "Explicitly specifies the codestream layer formation parameters. "+          "The <rate> parameter specifies the bitrate to which the first "+          "layer should be optimized. The <layers> parameter, if present, "+          "specifies the number of extra layers that should be added for "+          "scalability. These extra layers are not optimized. "+          "Any extra <rate> and <layers> parameters add more layers, in the "+          "same way. An additional layer is always added at the end, which"+          " is "+          "optimized to the overall target bitrate of the bit stream. Any "+          "layers (optimized or not) whose target bitrate is higher that the "+          "overall target bitrate are silently ignored. The bitrates of the "+          "extra layers that are added through the <layers> parameter are "+          "approximately log-spaced between the other target bitrates. If "+          "several <rate> [+<layers>] constructs appear the <rate>"+          " parameters "+          "must appear in increasing order. The rate allocation algorithm "+          "ensures that all coded layers have a minimal reasonable size, if "+          "not these layers are silently ignored.","0.015 +20 2.0 +10"}    };    /** The source of entropy coded data */    protected CodedCBlkDataSrcEnc src;        /** The source of entropy coded data */    protected EncoderSpecs encSpec;    /** The number of layers. */    protected int numLayers;    /** The bit-stream writer */    CodestreamWriter bsWriter;    /** The header encoder */    HeaderEncoder headEnc;        /**     * Initializes the source of entropy coded data.     *     * @param src The source of entropy coded data.     *     * @param ln The number of layers to create     *     * @param pt The progressive type, as defined in 'ProgressionType'.     *     * @param bw The packet bit stream writer.     *     * @see ProgressionType     * */    public PostCompRateAllocator(CodedCBlkDataSrcEnc src, int nl,                                 CodestreamWriter bw, EncoderSpecs encSpec) {        super(src);        this.src = src;        this.encSpec = encSpec;        numLayers = nl;        bsWriter = bw;    }    /**      * Keep a reference to the header encoder.     *     * @param headEnc The header encoder     * */    public void setHeaderEncoder(HeaderEncoder headEnc){	this.headEnc = headEnc;    }    /**     * Initializes the rate allocation points, taking into account header     * overhead and such. This method must be called after the header has been     * simulated but before calling the runAndWrite() one. The header must be     * rewritten after a call to this method since the number of layers may     * change.     *     * @param oldSyntax Whether or not the old syntax is used.     *     * @see #runAndWrite     * */    public abstract void initialize() throws IOException;    /**     * Runs the rate allocation algorithm and writes the data to the     * bit stream. This must be called after the initialize() method.     *     * @see #initialize     * */    public abstract void runAndWrite() throws IOException;    /**     * Returns the number of layers that are actually generated.     *     * @return The number of layers generated.     * */    public int getNumLayers() {        return numLayers;    }    /**     * 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 3 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;    }    /**     * Creates a PostCompRateAllocator object for the appropriate rate     * allocation parameters in the parameter list 'pl', having 'src' as the     * source of entropy coded data, 'rate' as the target bitrate and 'bw' as     * the bit stream writer object.     *     * @param src The source of entropy coded data.     *     * @param pl The parameter lis (or options).     *     * @param rate The target bitrate for the rate allocation     *     * @param bw The bit stream writer object, where the bit stream data will     * be written.     * */    public static PostCompRateAllocator createInstance(CodedCBlkDataSrcEnc src,                                                       ParameterList pl,                                                       float rate,                                                       CodestreamWriter bw,                                                       EncoderSpecs encSpec){        String lyropt = pl.getParameter("Alayers");        if (lyropt == null) {            if(pl.getParameter("Rroi") == null) {                lyropt = "res";            }            else {                lyropt = "layer";            }        }        // Check parameters        pl.checkList(OPT_PREFIX,pl.toNameArray(pinfo));        // Construct the layer specification from the Alayers option        LayersInfo lyrs = parseAlayers(lyropt,rate);	int nTiles = encSpec.nTiles;	int nComp = encSpec.nComp;	int numLayers = lyrs.getTotNumLayers();        // Parse the progressive type	encSpec.ps = new ProgressionSpec(nTiles,nComp,numLayers,encSpec.dls,					 ModuleSpec.SPEC_TYPE_TILE_COMP,pl);        return new EBCOTRateAllocator(src,lyrs,bw,encSpec,pl);    }    /**     * Convenience method that parses the 'Alayers' option.     *     * @param params The parameters of the 'Alayers' option     *     * @param rate The overall target bitrate     *     * @return The layer specification.     * */    private static LayersInfo parseAlayers(String params, float rate) {        LayersInfo lyrs;        StreamTokenizer stok;        boolean islayer,ratepending;        float r;        lyrs = new LayersInfo(rate);        stok = new StreamTokenizer(new StringReader(params));        stok.eolIsSignificant(false);        try {            stok.nextToken();        }        catch (IOException e) {            throw new Error("An IOException has ocurred where it "+                            "should never occur");        }        ratepending = false;        islayer = false;        r = 0; // to keep compiler happy        while (stok.ttype != stok.TT_EOF) {            switch(stok.ttype) {            case StreamTokenizer.TT_NUMBER:                if (islayer) { // layer parameter                    try {                        lyrs.addOptPoint(r,(int)stok.nval);                    }                    catch (IllegalArgumentException e) {                        throw new                            IllegalArgumentException("Error in 'Alayers' "+                                                     "option: "+e.getMessage());                    }                    ratepending = false;                    islayer = false;                }                else { // rate parameter                    if (ratepending) { // Add pending rate parameter                        try {                            lyrs.addOptPoint(r,0);                        }                        catch (IllegalArgumentException e) {                            throw new                                IllegalArgumentException("Error in 'Alayers' "+                                                         "option: "+                                                         e.getMessage());                        }                    }                    // Now store new rate parameter                    r = (float) stok.nval;                    ratepending = true;                }                break;            case '+':                if (!ratepending || islayer) {                    throw new                        IllegalArgumentException("Layer parameter without "+                                                 "previous rate parameter "+                                                 "in 'Alayers' option");                }                islayer = true; // Next number is layer parameter                break;            default:                throw new IllegalArgumentException("Error parsing 'Alayers' "+                                                   "option");            }            try {                stok.nextToken();            }            catch (IOException e) {                throw new Error("An IOException has ocurred where it "+                                "should never occur");            }        }        if (islayer) {            throw new IllegalArgumentException("Error parsing 'Alayers' "+                                               "option");        }        if (ratepending) {            try {                lyrs.addOptPoint(r,0);            }            catch (IllegalArgumentException e) {                throw new                    IllegalArgumentException("Error in 'Alayers' "+                                             "option: "+                                             e.getMessage());            }        }        return lyrs;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合天天狠狠| 美女视频网站久久| 日韩毛片精品高清免费| 国产欧美一二三区| 国产亚洲综合色| 国产精品美女www爽爽爽| 久久久精品蜜桃| 国产精品国产三级国产aⅴ中文 | 日韩精品影音先锋| 精品少妇一区二区三区日产乱码| 欧美精品久久一区| 日韩欧美的一区| 中文字幕精品一区二区精品绿巨人 | 国产一区二区三区在线观看免费视频| 一个色在线综合| 九九精品一区二区| 99久久精品免费精品国产| 91小视频免费看| 日韩一区二区在线看| 久久久久综合网| 亚洲精品自拍动漫在线| 日韩国产欧美三级| 高清成人在线观看| 91精品婷婷国产综合久久竹菊| 91精品免费观看| 最新久久zyz资源站| 蜜臀av在线播放一区二区三区| 国产99精品国产| 91精品一区二区三区久久久久久| 国产亚洲自拍一区| 日本v片在线高清不卡在线观看| 成人亚洲一区二区一| 欧美电影免费观看完整版| 亚洲欧美福利一区二区| 国产盗摄女厕一区二区三区 | 国产欧美日韩麻豆91| 日韩有码一区二区三区| 色一区在线观看| 成人欧美一区二区三区白人| 精品在线播放免费| 日韩欧美色综合网站| 亚洲一区二区三区四区中文字幕| 国产黄色精品视频| 国产午夜精品一区二区 | 欧美日韩高清一区二区不卡| 亚洲视频在线一区观看| 95精品视频在线| 亚洲嫩草精品久久| 91精品国产乱码久久蜜臀| 亚洲精品你懂的| 色综合久久中文综合久久牛| 亚洲欧美二区三区| 欧美精品v国产精品v日韩精品 | 99精品欧美一区| 亚洲视频资源在线| 欧美日韩电影一区| 国产在线播放一区二区三区| 国产日韩在线不卡| 91热门视频在线观看| 丝袜亚洲另类欧美综合| 日韩女优制服丝袜电影| 成人黄色电影在线| 一区二区三区四区乱视频| 日韩一区二区麻豆国产| 成人一区二区三区在线观看 | 色综合久久九月婷婷色综合| 亚洲大片精品永久免费| 亚洲精品一线二线三线| 97se亚洲国产综合在线| 精品在线你懂的| 图片区小说区区亚洲影院| 久久久久久夜精品精品免费| 91在线视频播放地址| 九一九一国产精品| 亚洲精品乱码久久久久久日本蜜臀| 欧美日韩亚洲综合一区二区三区| 久久爱www久久做| 亚洲一二三专区| 国产精品美女久久久久高潮| 精品国产一区二区精华| 欧美视频在线不卡| 一本久久综合亚洲鲁鲁五月天| 精品一区二区三区免费观看 | 北条麻妃一区二区三区| 免费日韩伦理电影| 日本免费在线视频不卡一不卡二| 国产精品乱码一区二区三区软件| 日韩欧美123| 精品福利一二区| 久久精品一区二区三区不卡牛牛 | 三级亚洲高清视频| 亚洲一区二区三区爽爽爽爽爽| 综合激情成人伊人| 亚洲精品乱码久久久久久黑人| 亚洲女与黑人做爰| 亚洲一二三区视频在线观看| 亚洲综合免费观看高清完整版| 国产精品伦理在线| 一区二区成人在线| 午夜精品福利在线| 久久国产精品第一页| 国产传媒一区在线| 97国产一区二区| 欧美日韩中文精品| 国产午夜三级一区二区三| 中文字幕综合网| 日产国产高清一区二区三区| 韩国av一区二区三区四区| 99久久99久久精品国产片果冻| 色狠狠桃花综合| 精品处破学生在线二十三| 中文字幕在线一区二区三区| 亚洲一区在线播放| 国产一本一道久久香蕉| 欧美日精品一区视频| 欧美极品aⅴ影院| 亚洲成精国产精品女| 国产成人在线视频免费播放| 欧美视频一区在线| 国产欧美日韩视频在线观看| 午夜视频久久久久久| 成人av网站大全| www国产成人| 丝袜美腿成人在线| 在线视频欧美精品| 中文字幕一区二区三区四区不卡| 亚洲高清免费在线| 色综合久久综合中文综合网| 国产精品久久毛片a| 国产激情一区二区三区四区| 精品久久久久一区| 91在线看国产| 日本一区二区免费在线观看视频 | 亚洲女同女同女同女同女同69| 国产美女在线观看一区| 精品国产麻豆免费人成网站| 精品一区二区三区免费播放| 3atv在线一区二区三区| 日韩高清一区在线| 欧美一级在线视频| 国产在线视频不卡二| xf在线a精品一区二区视频网站| 免费成人你懂的| 精品国产不卡一区二区三区| 国产一区二区伦理| 国产三级精品三级在线专区| 成人av网站大全| 视频精品一区二区| 日韩欧美另类在线| 成人免费高清在线| 天天综合色天天| 久久青草国产手机看片福利盒子| 国产.欧美.日韩| 偷窥少妇高潮呻吟av久久免费| 91精品国产综合久久福利软件 | 欧美精品一级二级| 国产综合色在线视频区| 亚洲在线观看免费| 欧美v亚洲v综合ⅴ国产v| 99国产精品久久久久久久久久久 | 日韩高清在线电影| 欧美精品v日韩精品v韩国精品v| 亚洲欧洲日产国码二区| 99久久精品免费看国产免费软件| 欧美电影免费观看高清完整版在 | 丁香婷婷综合色啪| 国产精品免费网站在线观看| 欧美区在线观看| 成人av电影免费观看| 午夜激情一区二区三区| 国产精品天天看| 日韩免费电影网站| 欧美性xxxxxx少妇| 成人免费毛片app| 国产91精品露脸国语对白| 另类小说一区二区三区| 丝瓜av网站精品一区二区| 亚洲狠狠丁香婷婷综合久久久| 国产日韩在线不卡| 国产午夜精品久久| 欧美日韩国产乱码电影| 国产一区二区三区香蕉| 日本亚洲三级在线| 欧美aaa在线| 国产一区二区在线免费观看| 狠狠色综合日日| 国产精品一区二区x88av| 国产一区二区在线影院| 成人免费视频app| 成人性生交大片免费看视频在线| 国产一区二区在线电影| eeuss鲁一区二区三区| 99国产精品久久| 欧美日韩国产一级| 日韩欧美高清在线| 国产精品久久久久影院亚瑟| 中文字幕一区在线观看| 亚洲最新在线观看| 精品一区二区在线免费观看| 国产九色sp调教91|