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

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

?? filebitstreamreaderagent.java

?? jpeg2000算法實現
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * CVS identifier: * * $Id: FileBitstreamReaderAgent.java,v 1.44 2001/03/02 10:09:13 grosbois Exp $ * * Class:                   FileBitstreamReaderAgent * * Description:             Retrieve code-blocks codewords in the bit stream * * * * 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.codestream.reader;import jj2000.j2k.quantization.dequantizer.*;import jj2000.j2k.wavelet.synthesis.*;import jj2000.j2k.entropy.decoder.*;import jj2000.j2k.codestream.*;import jj2000.j2k.decoder.*;import jj2000.j2k.entropy.*;import jj2000.j2k.image.*;import jj2000.j2k.util.*;import jj2000.j2k.io.*;import jj2000.j2k.*;import java.util.*;import java.io.*;/** * This class reads the bit stream (with the help of HeaderDecoder for tile * headers and PktDecoder for packets header and body) and retrives location * of all code-block's codewords. * * <P>Note: All tile-parts headers are read by the constructor whereas packets * are processed when decoding related tile (when setTile method is called). * * <P>In parsing mode, the reader simulates a virtual layer-resolution * progressive bit stream with the same truncation points in each code-block, * whereas in truncation mode, only the first bytes are taken into account (it * behaves like if it is a real truncated codestream). * * @see HeaderDecoder * @see PktDecoder * */public class FileBitstreamReaderAgent extends BitstreamReaderAgent     implements Markers, ProgressionType, StdEntropyCoderOptions{    /** Reference to the PktDecoder instance */    public PktDecoder pktDec;        /** Reference to the ParameterList instance */    private ParameterList pl;    /** The RandomAccessIO where to get data from */    private RandomAccessIO in;    /** The number of tiles in the image */    private int nt;    /** Offset of the first packet in each tile-part in each tile */    private int[][] firstPackOff;    /** Number of bytes allocated to each tile. In parsing mode, this number     * is related to the tile length in the codestream whereas in truncation     * mode all the rate is affected to the first tiles. */    private int[] nBytes;    /** Length of each tile-part (written in Psot) */    private int[][] tilePartLen;    /** Total length of each tile */    private int[] totTileLen;    /** Total length of tiles' header */    private int[] totTileHeadLen;    /** First tile part header length*/    private int firstTilePartHeadLen;    /** Total length of all tile parts in all tiles */    private double totAllTileLen;    /** Length of main header */    private int mainHeadLen;    /** Length of all tile-part headers */    private int[][] tilePartHeadLen;    /** Length of each packet head found in the tile */    private Vector pktHL;    /** True if truncation mode is used. False if parsing mode */    private boolean isTruncMode;    /** The number of tile-parts that remain to read */    private int remainingTileParts;    /** The number of tile-parts read so far for each tile */    private int[] tilePartsRead;    /** Thetotal  number of tile-parts read so far */    private int totTilePartsRead=0;    /** The number of tile-parts in each tile */    private int[] tileParts;    /** The current tile part being used */    private int curTilePart;    /** The number of the tile-part in the codestream */    private int[][] tilePartNum;    /** Array containing info. for all the code-blocks:<br>     * - 1st dim: component index.<br>     * - 2nd dim: resolution level index.<br>     * - 3rd dim: subband index.<br>     * - 4th/5th dim: code-block index (vert. and horiz.).<br>     */    private CBlkInfo[][][][][] cbI;    /**      * Reads all tiles headers and keep offset of their first packet. Finally     * the rate allocation method is called.     *     * @param hd HeaderDecoder of the codestream.     *     * @param ehs The input stream where to read bit-stream.     *     * @param decSpec The decoder specifications      *     * @param pl The ParameterList instance created from the command-line     * arguments.     *     * @see #allocateRate     * */    public FileBitstreamReaderAgent(HeaderDecoder hd,RandomAccessIO ehs,                                    DecoderSpecs decSpec,ParameterList pl)    throws IOException {        super(hd,decSpec);                this.pl = pl;        String strInfo = "Codestream elements information in bytes "+            "(offset, total length, header length):\n\n";                // Get decoding rate        boolean rateInBytes;        boolean parsing = pl.getBooleanParameter("parsing");        try{            trate = pl.getFloatParameter("rate");        }        catch (NumberFormatException e) {            throw new Error("Invalid value in 'rate' option: "+                  pl.getParameter("rate"));        }        catch (IllegalArgumentException e) {            throw new Error("'rate' option is missing");        }                try{            tnbytes = pl.getIntParameter("nbytes");        }        catch (NumberFormatException e) {            throw new Error("Invalid value in 'nbytes' option: "+                  pl.getParameter("nbytes"));        }        catch (IllegalArgumentException e) {            throw new Error("'nbytes' option is missing");        }                // Check that '-rate' and '-nbytes' are not used at the same time        ParameterList defaults = pl.getDefaultParameterList();        if(tnbytes != defaults.getFloatParameter("nbytes"))            rateInBytes = true;        else            rateInBytes = false;        if(rateInBytes && trate != defaults.getIntParameter("rate")) {            throw new Error("Cannot use '-rate' and '-nbytes' options at the "+                  "same time.");        }        if(rateInBytes){            trate = tnbytes*8f/hd.getImgWidth()/hd.getImgHeight();        }        else {            tnbytes = (int)(trate*hd.getImgWidth()*hd.getImgHeight())/8;        }        isTruncMode = !pl.getBooleanParameter("parsing");        // initializations        nt = ntX * ntY;        in = ehs;        pktDec = new PktDecoder(decSpec,hd,ehs,this,isTruncMode);        tileParts = new int[nt];        totTileLen = new int[nt];	tilePartLen = new int[nt][];        tilePartNum = new int[nt][];        firstPackOff = new int[nt][];        tilePartsRead = new int[nt];        totTileHeadLen = new int[nt];	tilePartHeadLen = new int[nt][];	nBytes = new int[nt];        hd.nTileParts = new int[nt];	this.isTruncMode = isTruncMode;        int t=0, pos, tp=0, tptot=0;	// Keeps main header's length, takes file format into account        int cdstreamStart = hd.initPos; // Codestream offset in the file	mainHeadLen = in.getPos() - cdstreamStart;        anbytes = mainHeadLen;        strInfo += "Main header length    : "+cdstreamStart+", "+mainHeadLen+            ", "+mainHeadLen+"\n";        // If cannot even read the first tile-part        if(anbytes > tnbytes){            throw new Error("Requested bitrate is too small.");        }        // Read all tile-part headers from all tiles.	int tilePartStart;        boolean rateReached = false;        int mdl;        totAllTileLen = 0;        remainingTileParts = nt; // at least as many tile-parts as tiles        try{            while(remainingTileParts != 0){                tilePartStart = in.getPos();                // Read tile-part header		try{                    t = readTilePartHeader();                    tp = tilePartsRead[t];		}		catch(EOFException e){		    firstPackOff[t][tp]=in.length();		    throw e;		}                pos = in.getPos();                // In truncation mode, if target decoding rate is reached in                // tile-part header, skips the tile-part and stop reading                if(isTruncMode){                    if( (pos-cdstreamStart) > tnbytes ){                        firstPackOff[t][tp]=in.length();                        rateReached = true;                        break;                    }                }                                // Set tile part position and header length                firstPackOff[t][tp] = pos;                tilePartHeadLen[t][tp] = (pos-tilePartStart);                strInfo += "Tile-part "+tp+" of tile "+t+" : "+tilePartStart                    +", "+tilePartLen[t][tp]+", "+tilePartHeadLen[t][tp]+"\n";                // Update length counters                totTileLen[t] += tilePartLen[t][tp];                totTileHeadLen[t] += tilePartHeadLen[t][tp];                totAllTileLen += tilePartLen[t][tp];                if(isTruncMode){                    if(anbytes+tilePartLen[t][tp] > tnbytes) {                        anbytes += tilePartHeadLen[t][tp];                        rateReached = true;                        nBytes[t] += (tnbytes-anbytes);                        break;                    }                    else {                        anbytes += tilePartHeadLen[t][tp];                        nBytes[t] += (tilePartLen[t][tp]-                                      tilePartHeadLen[t][tp]);                    }                }                else {                    if(anbytes+tilePartHeadLen[t][tp] > tnbytes) {                        break;                    }                    else {                        anbytes += tilePartHeadLen[t][tp];                    }                }                                // If this is first tile-part, remember header length                if(tptot == 0)                    firstTilePartHeadLen = tilePartHeadLen[t][tp];                                // Go to the beginning of next tile part                tilePartsRead[t]++;                in.seek(tilePartStart+tilePartLen[t][tp]);                remainingTileParts--;                tptot++;            }        } catch(EOFException e) {            if(pl.getBooleanParameter("cdstr_info"))               FacilityManager.getMsgLogger().                   printmsg(MsgLogger.INFO,strInfo); 	    FacilityManager.getMsgLogger().		printmsg(MsgLogger.WARNING,"Codestream truncated in tile "+t);            // Bit-rate allocation            if(!isTruncMode)                allocateRate();            // Update 'res' value once all tile-part headers are read            if(pl.getParameter("res") == null){                res = decSpec.dls.getMin();            }            else{                try {                    res = pl.getIntParameter("res");                    if(res<0){                        throw new                            IllegalArgumentException("Specified negative "+                                                     "resolution level "+

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜欧美电影在线观看| 久草中文综合在线| 蜜臀久久久久久久| 不卡在线视频中文字幕| 在线电影欧美成精品| 99re视频这里只有精品| 日本道精品一区二区三区| 国产在线麻豆精品观看| 欧美午夜精品一区二区蜜桃| 久久精品日产第一区二区三区高清版 | 久久精子c满五个校花| 亚洲一二三区不卡| 精品成人一区二区| 一区二区日韩电影| 波多野结衣精品在线| 国产偷v国产偷v亚洲高清| 蜜桃av噜噜一区| 欧美体内she精高潮| 一区二区三区蜜桃| 99国产精品久久久久| 欧美国产精品一区二区| 国产酒店精品激情| 精品成人a区在线观看| 免费成人小视频| 91精品国产91综合久久蜜臀| 亚洲影视在线播放| 欧美在线制服丝袜| 亚洲蜜臀av乱码久久精品| 成人激情开心网| 中日韩免费视频中文字幕| 国产91富婆露脸刺激对白| 久久亚洲二区三区| 国产一区二区三区四区五区入口 | 国产成人aaa| 日本一区二区三区久久久久久久久不 | 精品国产精品网麻豆系列| 日本va欧美va精品| 精品国产乱码久久久久久夜甘婷婷| 亚洲高清不卡在线观看| 欧美日韩一卡二卡| 天天做天天摸天天爽国产一区| 欧美日韩久久不卡| 免费xxxx性欧美18vr| 精品国产免费久久| 成人午夜视频在线观看| 亚洲免费观看在线观看| 欧美色网站导航| 日韩福利电影在线| 精品国产91洋老外米糕| 国产成人精品aa毛片| 亚洲素人一区二区| 欧美日韩视频在线一区二区| 视频一区视频二区中文字幕| 精品国产髙清在线看国产毛片 | 久久精品夜色噜噜亚洲aⅴ| 成人av影视在线观看| 成人免费在线视频| 欧洲精品视频在线观看| 视频一区视频二区中文| 久久精品网站免费观看| 色综合天天天天做夜夜夜夜做| 粉嫩一区二区三区性色av| 亚洲欧洲精品一区二区三区| 欧美日韩在线三区| 国产乱人伦偷精品视频不卡| 亚洲欧洲成人av每日更新| 欧美美女视频在线观看| 国产剧情一区在线| 一区二区成人在线视频| 精品久久国产老人久久综合| 波多野结衣91| 久久精品免费观看| 亚洲婷婷综合色高清在线| 91精品国产91久久综合桃花| 成人午夜视频在线观看| 奇米精品一区二区三区在线观看一 | 99精品一区二区三区| 秋霞电影一区二区| |精品福利一区二区三区| 日韩视频在线一区二区| 色综合久久久久综合99| 国产麻豆精品视频| 香蕉加勒比综合久久| 国产精品麻豆视频| 日韩一区二区三区电影| 在线观看一区二区视频| 国产精品一区二区黑丝| 日本特黄久久久高潮| 亚洲免费在线观看| 欧美国产精品v| www久久精品| 日韩一区二区视频| 欧美肥妇毛茸茸| 色噜噜狠狠一区二区三区果冻| 国产一区二区看久久| 日本在线不卡一区| 亚洲成人午夜电影| 亚洲免费观看高清完整| 国产精品国产三级国产普通话99 | 极品瑜伽女神91| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲裸体xxx| 国产精品视频看| 欧美国产亚洲另类动漫| 国产日韩欧美不卡在线| 精品国产乱码久久久久久1区2区| 欧美一区二区久久| 欧美高清一级片在线| 欧美日韩一区二区三区四区五区| 91成人免费电影| 欧美色精品在线视频| 欧美伊人久久久久久午夜久久久久| av一区二区三区在线| 97久久久精品综合88久久| 丁香婷婷综合网| 成年人国产精品| 成人免费观看av| 不卡影院免费观看| 99麻豆久久久国产精品免费| 成人动漫视频在线| 色综合一个色综合| 欧美亚洲国产bt| 日韩一区二区三区四区| 欧美tk—视频vk| 国产欧美一区二区精品性| 欧美激情艳妇裸体舞| 中文字幕一区二区三区四区不卡| 亚洲同性同志一二三专区| 亚洲自拍都市欧美小说| 丝袜亚洲精品中文字幕一区| 欧美aaaaaa午夜精品| 欧美视频你懂的| 91精品国产色综合久久不卡蜜臀| 日韩一级片网站| 日本一区二区在线不卡| 一区二区三区资源| 日本aⅴ亚洲精品中文乱码| 国产精品中文字幕日韩精品| 国产91在线|亚洲| 色噜噜久久综合| 日韩精品一区二区三区在线观看| 日韩精品中文字幕在线不卡尤物| 久久精品视频免费| 亚洲一区二区三区视频在线| 麻豆精品蜜桃视频网站| 不卡av在线网| 欧美图区在线视频| ww久久中文字幕| 一区二区三区欧美激情| 久草中文综合在线| 一本色道久久综合亚洲aⅴ蜜桃 | 国产精品亚洲专一区二区三区 | 成人夜色视频网站在线观看| 色综合天天综合网天天狠天天| 日韩一区二区三区电影| 国产精品九色蝌蚪自拍| 奇米一区二区三区av| 99热国产精品| 欧美变态tickling挠脚心| 亚洲美女视频在线观看| 韩国v欧美v日本v亚洲v| 欧美色老头old∨ideo| 欧美国产精品专区| 美国毛片一区二区| 色综合天天综合| 久久精品视频在线免费观看| 三级欧美在线一区| 91香蕉国产在线观看软件| 日韩色在线观看| 午夜精品123| 91美女视频网站| 久久久国产精品麻豆| 天堂蜜桃91精品| 91蜜桃在线观看| 欧美激情一区二区| 狠狠色狠狠色综合系列| 911国产精品| 亚洲国产美国国产综合一区二区| www.在线成人| 久久嫩草精品久久久精品一| 午夜精品一区二区三区免费视频| 99re视频精品| 中文字幕在线观看一区| 国产一区二区三区免费看 | 精品亚洲aⅴ乱码一区二区三区| 欧美性猛片xxxx免费看久爱| 国产精品另类一区| 国产精品小仙女| 欧美精品一区二区蜜臀亚洲| 青青草成人在线观看| 欧美精品 日韩| 视频一区视频二区中文| 欧美日韩国产成人在线91| 亚洲综合图片区| 欧美视频在线观看一区| 亚洲国产精品嫩草影院| 欧美视频在线播放| 亚洲电影一级黄| 宅男在线国产精品| 青青草原综合久久大伊人精品|