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

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

?? imgdataconverter.java

?? jpeg2000算法實(shí)現(xiàn)
?? JAVA
字號:
/* * CVS Identifier: * * $Id: ImgDataConverter.java,v 1.13 2001/02/27 19:16:03 grosbois Exp $  * * Interface:           ImgDataConverter * * Description:         The abstract class for classes that provide *                      Image Data Convertres (int -> float, float->int). * * * * 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;import jj2000.j2k.image.*;import jj2000.j2k.*;/** * This class is responsible of all data type conversions. It should be used, * at encoder side, between Tiler and ForwardWT modules and, at decoder side, * between InverseWT/CompDemixer and ImgWriter modules. The conversion is * realized when a block of data is requested: if source and destination data * type are the same one, it does nothing, else appropriate cast is done. All * the methods of the 'ImgData' interface are implemented by the * 'ImgDataAdapter' class that is the superclass of this one, so they don't * need to be reimplemented by subclasses. * */public class ImgDataConverter extends ImgDataAdapter implements BlkImgDataSrc {    /** The block used to request data from the source in the case that a     * conversion seems necessary. It can be either int or float at     * initialization time. It will be checked (and corrected if necessary) by     * the source whenever necessary */    private DataBlk srcBlk = new DataBlkInt();    /** The source of image data */    private BlkImgDataSrc src;    /** The number of fraction bits in the casted ints */        private int fp;    /**     * Constructs a new ImgDataConverter object that operates on the specified     * source of image data.     *     * @param imgSrc The source from where to get the data to be transformed     *     * @param fp The number of fraction bits in the casted ints     *     * @see BlkImgDataSrc     * */    public ImgDataConverter(BlkImgDataSrc imgSrc, int fp) {        super(imgSrc);	src = imgSrc;        this.fp=fp;    }    /**     * Constructs a new ImgDataConverter object that operates on the specified     * source of image data.     *     * @param imgSrc The source from where to get the data to be transformed     *     * @see BlkImgDataSrc     * */    public ImgDataConverter(BlkImgDataSrc imgSrc) {        super(imgSrc);        src = imgSrc;	fp = 0;    }    /**     * 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.     *     * @param c The index of the component.     *     * @return The position of the fixed-point, which is the same as the     * number of fractional bits.     * */     public int getFixedPoint(int c){        return fp;     }    /**     * Returns, in the blk argument, a block of image data containing the     * specifed rectangular area, in the specified component, using the     * 'transfer type' specified in the block given as argument. The data is     * returned, as a copy of the internal data, therefore the returned data     * can be modified "in place".     *     * <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w'     * and 'h' members of the 'blk' argument, relative to the current     * tile. These members are not modified by this method. The 'offset' of     * the returned data is 0, and the 'scanw' is the same as the block's     * width. See the 'DataBlk' class.     *     * <P>This method, in general, is less efficient than the     * 'getInternCompData()' method since, in general, it copies the     * data. However if the array of returned data is to be modified by the     * caller then this method is preferable.     *     * <P>If the data array in 'blk' is 'null', then a new one is created. If     * the data array is not 'null' then it is reused, and it must be large     * enough to contain the block's data. Otherwise an 'ArrayStoreException'     * or an 'IndexOutOfBoundsException' is thrown by the Java system.     *     * <P>The returned data may have its 'progressive' attribute set. In this     * case the returned data is only an approximation of the "final" data.     *     * @param blk Its coordinates and dimensions specify the area to return,     * relative to the current tile. If it contains a non-null data array,     * then it must be large enough. If it contains a null data array a new     * one is created. Some fields in this object are modified to return the     * data.     *     * @param c The index of the component from which to get the data.     *     * @see #getInternCompData     * */    public DataBlk getCompData(DataBlk blk, int c){        return getData(blk,c,false);    }    /**     * Returns, in the blk argument, a block of image data containing the     * specifed rectangular area, in the specified component, using the     * 'transfer type' defined in the block given as argument. The data is     * returned, as a reference to the internal data, if any, instead of as a     * copy, therefore the returned data should not be modified.     *     * <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w'     * and 'h' members of the 'blk' argument, relative to the current     * tile. These members are not modified by this method. The 'offset' and     * 'scanw' of the returned data can be arbitrary. See the 'DataBlk' class.     *     * <P> If source data and expected data (blk) are using the same type,     * block returned without any modification. If not appropriate cast is     * used.     *     * <P>This method, in general, is more efficient than the 'getCompData()'     * method since it may not copy the data. However if the array of returned     * data is to be modified by the caller then the other method is probably     * preferable.     *     * <P>If the data array in <tt>blk</tt> is <tt>null</tt>, then a new one     * is created if necessary. The implementation of this interface may     * choose to return the same array or a new one, depending on what is more     * efficient. Therefore, the data array in <tt>blk</tt> prior to the     * method call should not be considered to contain the returned data, a     * new array may have been created. Instead, get the array from     * <tt>blk</tt> after the method has returned.     *     * <P>The returned data may have its 'progressive' attribute set. In this     * case the returned data is only an approximation of the "final" data.     *     * @param blk Its coordinates and dimensions specify the area to return,     * relative to the current tile. Some fields in this object are modified     * to return the data.     *     * @param c The index of the component from which to get the data.     *     * @return The requested DataBlk     *     * @see #getCompData     * */    public final DataBlk getInternCompData(DataBlk blk, int c){        return getData(blk,c,true);    }    /**     * Implements the 'getInternCompData()' and the 'getCompData()'     * methods. The 'intern' flag signals which of the two methods should run     * as.     *     * @param blk The data block to get.     *     * @param c The index of the component from which to get the data.     *     * @param intern If true behave as 'getInternCompData(). Otherwise behave     * as 'getCompData()'     *     * @return The requested data block     *     * @see #getInternCompData     *     * @see #getCompData     * */    private DataBlk getData(DataBlk blk, int c, boolean intern) {        DataBlk reqBlk;    // Reference to block used in request to source	// Keep request data type	int otype = blk.getDataType();        if (otype == srcBlk.getDataType()) {            // Probably requested type is same as source type            reqBlk = blk;        }        else {            // Probably requested type is not the same as source type            reqBlk = srcBlk;            // We need to copy requested coordinates and size            reqBlk.ulx = blk.ulx;            reqBlk.uly = blk.uly;            reqBlk.w = blk.w;            reqBlk.h = blk.h;        }	// Get source data block        if (intern) {            // We can use the intern variant            srcBlk = src.getInternCompData(reqBlk,c);        }        else {            // Do not use the intern variant. Note that this is not optimal            // since if we are going to convert below then we could have used            // the intern variant. But there is currently no way to know if we            // will need to do conversion or not before getting the data.            srcBlk = src.getCompData(reqBlk,c);        }	// Check if casting is needed	if(srcBlk.getDataType()==otype){	    return srcBlk;	}	int i;	int k,kSrc,kmin;	float mult;	int w=srcBlk.w;	int h=srcBlk.h;	switch(otype){	case DataBlk.TYPE_FLOAT: // Cast INT -> FLOAT	    float farr[];	    int srcIArr[];	    // Get data array from resulting blk	    farr = (float[]) blk.getData();	    if (farr == null || farr.length < w*h) {		farr = new float[w*h];		blk.setData(farr); 	    }	    	    blk.scanw = srcBlk.w;	    blk.offset = 0;	    blk.progressive = srcBlk.progressive;	    srcIArr=(int[]) srcBlk.getData();	    	    // Cast data from source to blk	    fp=src.getFixedPoint(c);	    if(fp!=0){		mult=1.0f/(1<<fp);		for (i=h-1, k=w*h-1, kSrc =                         srcBlk.offset+(h-1)*srcBlk.scanw+w-1; i>=0; i--) {		    for (kmin = k-w; k>kmin; k--, kSrc--) {			farr[k]=((srcIArr[kSrc]*mult));		    }		    // Jump to geggining of next line in source		    kSrc -= srcBlk.scanw - w;		}	    }	    else{		for (i=h-1, k=w*h-1, kSrc =                         srcBlk.offset+(h-1)*srcBlk.scanw+w-1; i>=0; i--) {		    for (kmin = k-w; k>kmin; k--, kSrc--) {			farr[k]=((float)(srcIArr[kSrc]));		    }		    // Jump to geggining of next line in source		    kSrc -= srcBlk.scanw - w;		}	    }	    break; // End of cast INT-> FLOAT	case DataBlk.TYPE_INT: // cast FLOAT -> INT		int iarr[];		float srcFArr[];    		// Get data array from resulting blk		iarr = (int[]) blk.getData();		if (iarr == null || iarr.length < w*h) {		    iarr = new int[w*h];		    blk.setData(iarr); 		}		blk.scanw = srcBlk.w;		blk.offset = 0;		blk.progressive = srcBlk.progressive;		srcFArr=(float[]) srcBlk.getData();				// Cast data from source to blk		if(fp!=0){		    mult=(float)(1<<fp);		    for (i=h-1, k=w*h-1, kSrc =                             srcBlk.offset+(h-1)*srcBlk.scanw+w-1; i>=0; i--) {			for (kmin = k-w; k>kmin; k--, kSrc--) {			    if (srcFArr[kSrc] > 0.0f) {				iarr[k] = (int) (srcFArr[kSrc]*mult+0.5f);			    }			    else {				iarr[k] = (int) (srcFArr[kSrc]*mult-0.5f);			    }			}			// Jump to geggining of next line in source			kSrc -= srcBlk.scanw - w;		    }		}		else{		    for (i=h-1, k=w*h-1, kSrc =                             srcBlk.offset+(h-1)*srcBlk.scanw+w-1; i>=0; i--) {			for (kmin = k-w; k>kmin; k--, kSrc--) {			    if (srcFArr[kSrc] > 0.0f) {				iarr[k] = (int) (srcFArr[kSrc]+0.5f);			    }			    else {				iarr[k] = (int) (srcFArr[kSrc]-0.5f);			    }			}			// Jump to geggining of next line in source			kSrc -= srcBlk.scanw - w;		    }		}		break; // End cast FLOAT -> INT	default:	    throw                new IllegalArgumentException("Only integer and float data "+                                             "are "+                                             "supported by JJ2000");	}	return blk;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品视频在线观看免费| 亚洲美女精品一区| 99r精品视频| 强制捆绑调教一区二区| 欧美国产综合一区二区| 欧美精品在欧美一区二区少妇| 亚洲欧美在线另类| 日韩精品一区二区三区中文精品 | 中文字幕在线观看一区| 欧美日韩一区中文字幕| 成人黄动漫网站免费app| 蜜臀久久99精品久久久久宅男| 国产精品久久久久久久久免费相片| 欧美精品久久久久久久多人混战| 福利一区在线观看| 久久国产免费看| 舔着乳尖日韩一区| 一区二区三区中文在线| 中文在线免费一区三区高中清不卡| 欧美老女人第四色| 色哦色哦哦色天天综合| 懂色av噜噜一区二区三区av| 久久国产精品72免费观看| 亚洲成人动漫av| 亚洲综合久久久| 亚洲激情校园春色| 成人欧美一区二区三区黑人麻豆| 精品粉嫩超白一线天av| 日韩欧美一级片| 日韩欧美中文字幕制服| 欧美肥妇bbw| 制服丝袜中文字幕亚洲| 欧美日韩卡一卡二| 欧美日韩一区二区欧美激情| 色一情一伦一子一伦一区| 91丨九色丨尤物| 99re66热这里只有精品3直播 | 精品成人在线观看| 欧美一区二区三区在线看| 欧美三级乱人伦电影| 欧美色图在线观看| 欧美日韩国产高清一区二区三区 | 欧美国产精品专区| 国产欧美一区二区三区沐欲| 国产亚洲精品中文字幕| 国产日韩v精品一区二区| 国产精品美女久久久久久| 国产精品久久久久久福利一牛影视| 日韩欧美亚洲国产另类| 精品剧情在线观看| 久久精品日韩一区二区三区| 国产精品网站在线播放| 亚洲特级片在线| 亚洲午夜精品17c| 免费成人在线播放| 国产精品一区二区91| 成人动漫在线一区| 一本久道久久综合中文字幕| 欧美视频你懂的| 日韩欧美国产综合在线一区二区三区| 91国内精品野花午夜精品| 欧美日精品一区视频| 欧美一区在线视频| 精品国产伦一区二区三区观看体验| 日韩精品一区二区三区在线| 国产欧美一区二区精品忘忧草| 久久天天做天天爱综合色| 国产欧美精品一区二区色综合朱莉| 国产精品午夜在线| 午夜天堂影视香蕉久久| 韩国三级在线一区| av网站一区二区三区| 欧美写真视频网站| 欧美大片在线观看一区| 国产精品久久99| 亚洲777理论| 福利电影一区二区| 欧美在线观看一区| www久久精品| 亚洲国产人成综合网站| 国内精品嫩模私拍在线| 91麻豆swag| 精品国产制服丝袜高跟| 日韩理论在线观看| 美女视频黄 久久| 99久久国产免费看| 日韩视频不卡中文| 亚洲免费在线看| 国产精品一区在线观看你懂的| 成人av网站大全| 亚洲欧洲日韩av| 激情综合色丁香一区二区| aaa亚洲精品| 久久久久久久久久久久久久久99| 中文字幕综合网| 国产一区二区91| 欧美日韩亚洲不卡| 亚洲欧洲日本在线| 国产精品原创巨作av| 欧美精品乱码久久久久久| 中文字幕国产精品一区二区| 日韩1区2区日韩1区2区| 91色porny| 国产精品丝袜91| 国产一区在线视频| 51精品秘密在线观看| 亚洲视频一区二区免费在线观看 | 国产精品一区免费视频| 欧美揉bbbbb揉bbbbb| 亚洲日本在线天堂| 国产成人av影院| 欧美精品一区二区三区很污很色的| 亚洲美女偷拍久久| 成人高清伦理免费影院在线观看| 日韩一区二区在线看片| 亚洲福利视频一区| 色婷婷国产精品| 国产精品高潮呻吟| 成人美女视频在线观看| 精品成人一区二区| 黄网站免费久久| 亚洲精品一区二区三区99| 日本不卡视频一二三区| 欧美日韩国产综合一区二区| 日韩一区欧美小说| av色综合久久天堂av综合| 国产精品久久久久久久久快鸭| 国产精一区二区三区| 精品国产污污免费网站入口| 麻豆一区二区三| 日韩免费福利电影在线观看| 麻豆国产精品777777在线| 91麻豆精品国产91久久久更新时间| 亚洲综合激情小说| 欧美色倩网站大全免费| 亚洲最新视频在线播放| 91成人免费在线| 亚洲一线二线三线视频| 欧美少妇xxx| 美女国产一区二区三区| 日韩美女主播在线视频一区二区三区 | 国产精品网站导航| 成人97人人超碰人人99| 国产精品入口麻豆原神| 9色porny自拍视频一区二区| 国产日本欧美一区二区| 风间由美中文字幕在线看视频国产欧美| 日韩三级在线免费观看| 国产一区在线观看视频| 国产亚洲成aⅴ人片在线观看| 男人的天堂久久精品| 欧美xxxxxxxx| 国产精品综合一区二区三区| 国产精品美日韩| 色狠狠桃花综合| 日韩高清欧美激情| 久久久三级国产网站| 99久久国产综合精品色伊| 亚洲福利一二三区| 久久综合国产精品| 99国产精品一区| 婷婷久久综合九色国产成人| 久久网站热最新地址| 91色九色蝌蚪| 美国三级日本三级久久99| 国产欧美日本一区二区三区| 91精品福利视频| 美女视频网站久久| 中文字幕一区二区三区av| 欧美日韩中文字幕精品| 精品一区二区三区免费观看| 国产精品久久久久久户外露出| 日本高清不卡视频| 美女视频黄久久| 中文字幕亚洲一区二区av在线 | 丰满放荡岳乱妇91ww| 亚洲精品乱码久久久久久黑人| 一本一道综合狠狠老| 免费观看在线综合| 国产精品久久777777| 欧美高清激情brazzers| 丁香六月综合激情| 日精品一区二区| 中文字幕在线不卡一区| 制服丝袜av成人在线看| 成人18视频在线播放| 免费看日韩a级影片| 自拍偷拍亚洲欧美日韩| 精品国产乱码久久久久久闺蜜| 成人精品国产免费网站| 秋霞av亚洲一区二区三| 中文字幕亚洲区| 精品对白一区国产伦| 欧美日韩国产综合一区二区| 成人av高清在线| 另类综合日韩欧美亚洲| 亚洲小说欧美激情另类| 国产精品国产三级国产普通话三级| 欧美日韩国产高清一区二区三区| 国产99久久久久|