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

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

?? rawnjl2.cc

?? 在Linux開發環境下實現JPEG_LS壓縮標注
?? CC
?? 第 1 頁 / 共 4 頁
字號:
#include <math.h>#include "bnstream.h"#include "bnopt.h"#include "mesgtext.h"#ifdef USEOWNLOG2#if USEOWNLOG2static inline double log2(double x) { return log(x)/log(2); }#endif#endif// Test of new lossless JPEG proposal ISO/IEC WD 14495static inline Uint32 Maximum(Uint32 a,Uint32 b) { return (a > b) ? a : b; }static inline Uint16 Maximum(Uint16 a,Uint16 b) { return (a > b) ? a : b; }static inline Uint32 Minimum(Uint32 a,Uint32 b) { return (a > b) ? b : a; }static inline Uint16 Minimum(Uint16 a,Uint16 b) { return (a > b) ? b : a; }static inline Uint32 Abs(Int32 x) { return (Uint32)((x < 0) ? -x : x); }static inline Uint16 Abs(Int16 x) { return (Uint16)((x < 0) ? -x : x); }static inline double Log(double x)	{ return (log2(x)); }static inline Uint32 Floor(double x)	{ return Uint32(floor(x)); }static inline Uint32 Ceiling(double x)	{ return Uint32(ceil(x)); }static inline Uint32 FloorDivision(Uint32 n,Uint32 d)	{ return Uint32(floor(double(n)/double(d))); }static inline Uint32 CeilingDivision(Uint32 n,Uint32 d)	{ return Uint32(ceil(double(n)/double(d))); }// Constant tables for run length codes ...static const Uint16 J[32] = {		// Order of run length codes	0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,5,5,6,6,7,7,8,9,10,11,12,13,14,15};static const Uint16 J_rm[32] = {	// Length of run length codes (ie. 1<<J[n])	1u<<0,1u<<0,1u<<0,1u<<0,	1u<<1,1u<<1,1u<<1,1u<<1,	1u<<2,1u<<2,1u<<2,1u<<2,	1u<<3,1u<<3,1u<<3,1u<<3,	1u<<4,1u<<4,	1u<<5,1u<<5,	1u<<6,1u<<6,	1u<<7,1u<<7,	1u<<8,	1u<<9,	1u<<10,	1u<<11,	1u<<12,	1u<<13,	1u<<14,	1u<<15};static Uint32readRow(BinaryInputStream &in, Uint16 *buffer, Uint32 n,Uint16 bpp){	Uint32 count=0;	if (bpp <= 8) {		while (n-- && in) {			unsigned char value;			in >> value;			*buffer++=Uint16(value);			if (in || in.eof()) ++count;		}	}	else {		while (n-- && in) {			in >> *buffer++;			if (in || in.eof()) ++count;		}	}	return (in || in.eof()) ? count : 0;}static BinaryOutputStream &writeRow(BinaryOutputStream &out, Uint16 *buffer, Uint32 n,Uint16 bpp){	if (bpp <= 8) {		while (n-- && out) out << (unsigned char)(*buffer++);	}	else {		while (n-- && out) out << *buffer++;	}	return out;}static Uint32 		readBitByteOffset=0;static Int16 		readBitCount=0;static unsigned char 	readBitByte=0;static unsigned char 	readForwardByte;static bool		readHaveForwardByte=false;static BinaryInputStream &readBit(BinaryInputStream &in,Uint32 &bit){	// first bits are read from msb of byte	Assert(readBitCount >= 0);	if (readBitCount < 1) {		++readBitByteOffset;		if (readHaveForwardByte) {			readHaveForwardByte=false;			readBitByte=readForwardByte;			readBitCount=7;			// skip the stuffed zero bit (otherwise would have been marker)(hence never 0xff)		}		else {			in.read(&readBitByte,1);			if (readBitByte == 0xff) {	// could be marker segment or data 0xff with following stuffed zero bit				Assert(readHaveForwardByte == false);				//while (in.read(&readForwardByte,1) && readForwardByte == 0xff);	// skip padding bytes (strings of 0xff)				in.read(&readForwardByte,1);				if (in) {					if ((readForwardByte & 0x80) == 0) {	// stuffed zero bit after valid 0xff						readHaveForwardByte=true;						// the valid 0xff is already in readBitByte						readBitCount=8;					}					else {	// marker segment						// marker identifier is 0xff00+readForwardBytecerr << "readBitByte=" << hex << unsigned(readBitByte) << dec << endl;cerr << "readForwardByte=" << hex << unsigned(readForwardByte) << dec << endl;						Assert(0);	// for now					}				}				else {					readBitCount=0;	// just in case ... will trigger assertion next time					return in;	// failed miserably (ie. can't be valid JPEG syntax if have 0xff as last byte in file)				}			}			else				readBitCount=8;		}	}	bit=(readBitByte>>(--readBitCount)) & 1;//cerr << (bit ? "1" : "0");	return in;}static voiddumpReadBitPosition(void){	cerr << "dumpReadBitPosition: " << (readBitByteOffset-1+(readBitCount ? 0 : 1)) << "." << (readBitCount ? (8-readBitCount) : 0) << endl;}static Uint32 		writeBitByteOffset=0;static Uint16 		writeBitCount=0;static unsigned char 	writeBitByte=0;static BinaryOutputStream &writeBit(BinaryOutputStream &out,Uint32 bit){	// first bits are written into msb of byte	Assert(writeBitCount<8);	writeBitByte=writeBitByte<<1;	if (bit) writeBitByte|=1;//cerr << (bit ? "1" : "0");	if (++writeBitCount >= 8) {		++writeBitByteOffset;		out.write(&writeBitByte,1);		// need to stuff with a following zero bit to distinguish from JPEG marker		writeBitCount=(writeBitByte == 0xff) ? 1 : 0;		writeBitByte=0;	}	return out;}static BinaryOutputStream &writeBitFlush(BinaryOutputStream &out){	Assert(writeBitCount<8);	writeBitByte=writeBitByte<<(8-writeBitCount);	out.write(&writeBitByte,1);	writeBitByte=0;	writeBitCount=0;	return out;}static voiddumpWriteBitPosition(void){	cerr << "dumpWriteBitPosition: " << writeBitByteOffset << "." << writeBitCount << endl;}static BinaryOutputStream &write16BE(BinaryOutputStream &out,Uint16 word){	unsigned char byte;	byte=word>>8;	out.write(&byte,1);	byte=word&0xff;	out.write(&byte,1);	return out;}static BinaryOutputStream &write8(BinaryOutputStream &out,unsigned char byte){	out.write(&byte,1);	return out;}static BinaryInputStream &read16BE(BinaryInputStream &in,Uint16 &value){	unsigned char byte;	in.read(&byte,1);	value=Uint16(byte)<<8;	in.read(&byte,1);	value|=byte;	return in;}static BinaryInputStream &read8(BinaryInputStream &in,unsigned char &byte){	in.read(&byte,1);	return in;}// JPEG Syntax - Marker Segment stuff ....const Uint16 JPEG_MARKER_DNL = 0xffdc;const Uint16 JPEG_MARKER_EOI = 0xffd9;const Uint16 JPEG_MARKER_SOI = 0xffd8;const Uint16 JPEG_MARKER_SOS = 0xffda;// New for JPEG-LS (14495-1:1997)const Uint16 JPEG_MARKER_SOF55 = 0xfff7;const Uint16 JPEG_MARKER_LSE   = 0xfff8;const unsigned char JPEG_LSE_ID_L1   = 0x01;const unsigned char JPEG_LSE_ID_L2   = 0x02;const unsigned char JPEG_LSE_ID_L3   = 0x03;const unsigned char JPEG_LSE_ID_L4   = 0x04;static BinaryOutputStream &writeSOI(BinaryOutputStream &out){	write16BE(out,JPEG_MARKER_SOI);	return out;}static BinaryOutputStream &writeSOF55(BinaryOutputStream &out,Uint16 P,Uint16 ROWS,Uint16 COLUMNS){	write16BE(out,JPEG_MARKER_SOF55);	write16BE(out,11);			// length (inclusive of self)	Assert(P < 256);	write8(out,(unsigned char)P);		// sample precision	write16BE(out,ROWS);			// Y - number of lines	write16BE(out,COLUMNS);			// X - number of samples per line	write8(out,1);				// one component per frame only	write8(out,1);				// component identifier is 1	write8(out,0x11);			// no horizontal or vertical sampling factor	write8(out,0);				// no quantization table used in JPEG-LS	return out;}static BinaryOutputStream &writeSOS(BinaryOutputStream &out,Uint16 NEAR){	write16BE(out,JPEG_MARKER_SOS);	write16BE(out,8);			// length (inclusive of self)	write8(out,1);				// one component per scan only	write8(out,1);				// select component 1	write8(out,0);				// no mapping table	Assert(NEAR < 256);	write8(out,(unsigned char)NEAR);	// in place of start of spectral selection	write8(out,0);				// ILV - interleave mode is 0 (none)	write8(out,0);				// not used in JPEG-LS	return out;}static BinaryOutputStream &writeLSE1(BinaryOutputStream &out,Uint16 MAXVAL,Uint16 T1,Uint16 T2,Uint16 T3,Uint16 RESET){	write16BE(out,JPEG_MARKER_LSE);	write16BE(out,13);	write8(out,JPEG_LSE_ID_L1);	write16BE(out,MAXVAL);	write16BE(out,T1);	write16BE(out,T2);	write16BE(out,T3);	write16BE(out,RESET);	return out;}static BinaryOutputStream &writeEOI(BinaryOutputStream &out){	write16BE(out,JPEG_MARKER_EOI);	return out;}static boolreadJPEGMarker(BinaryInputStream &in,Uint16 &marker){	return read16BE(in,marker) && (marker&0xff80) != 0;}static boolreadSOI(BinaryInputStream &in,Uint16 marker){	return marker == JPEG_MARKER_SOI;}static boolreadSOF55(BinaryInputStream &in,Uint16 marker,Uint16 &P,Uint32 &ROWS,Uint32 &COLUMNS){//cerr << "readSOF55:" << endl;	Uint16 length;	unsigned char precision;	Uint16 rows;	Uint16 columns;	unsigned char ncomponents;	unsigned char componentid;	unsigned char hvsampling;	unsigned char quanttable;	return marker == JPEG_MARKER_SOF55			// && (cerr << "readSOF55: JPEG_MARKER_SOF55" << endl)	    && read16BE(in,length) && length == 11		// && (cerr << "readSOF55: length = " << dec << length << endl)	    && read8(in,precision) && (P=precision,true)	// && (cerr << "readSOF55: P = " << dec << P << endl)	    && read16BE(in,rows) && (ROWS=rows,true)		// && (cerr << "readSOF55: ROWS = " << dec << ROWS << endl)	    && read16BE(in,columns) && (COLUMNS=columns,true)	// && (cerr << "readSOF55: COLUMNS = " << dec << COLUMNS << endl)	    && read8(in,ncomponents) && ncomponents == 1	// && (cerr << "readSOF55: ncomponents = " << dec << Uint16(ncomponents) << endl)	    && read8(in,componentid)				// && (cerr << "readSOF55: componentid = " << dec << Uint16(componentid) << endl)	    && read8(in,hvsampling)				// && (cerr << "readSOF55: hvsampling = " << dec << Uint16(hvsampling) << endl)	    && read8(in,quanttable)				// && (cerr << "readSOF55: quanttable = " << dec << Uint16(quanttable) << endl)	;}static boolreadSOS(BinaryInputStream &in,Uint16 marker,Uint16 &NEAR){	Uint16 length;	unsigned char ncomponents;	unsigned char componentid;	unsigned char mappingtable;	unsigned char near;	unsigned char ilv;	unsigned char dummy;	return marker == JPEG_MARKER_SOS	    && read16BE(in,length) && length == 8	    && read8(in,ncomponents) && ncomponents == 1	    && read8(in,componentid)	    && read8(in,mappingtable)	    && read8(in,near) && (NEAR=near,true)	    && read8(in,ilv)	    && read8(in,dummy);}static boolreadLSE1(BinaryInputStream &in,Uint16 marker,Uint32 &MAXVAL,Uint16 &T1,Uint16 &T2,Uint16 &T3,Uint16 &RESET){	Uint16 length;	unsigned char id;	Uint16 maxval;	return marker == JPEG_MARKER_LSE	    && read16BE(in,length) && length > 2	    && read8(in,id) && id == JPEG_LSE_ID_L1	    && length == 13	    && read16BE(in,maxval) && (MAXVAL=maxval,true)	    && read16BE(in,T1)	    && read16BE(in,T2)	    && read16BE(in,T3)	    && read16BE(in,RESET);}// JPEG-LS support routines ...static Uint16determineGolombParameter(Uint32 n,Uint32 a){	Uint16 k;//cerr << "\t\tdetermineGolombParameter: n = " << n << endl;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
波多野结衣一区二区三区| 亚洲天堂中文字幕| 欧美日韩一区精品| 欧美午夜精品久久久久久孕妇| 懂色av一区二区三区免费观看 | 成人国产一区二区三区精品| 精品在线播放免费| 国产在线精品一区二区夜色| 久久er99精品| 高清beeg欧美| 色综合亚洲欧洲| 欧美日韩视频在线观看一区二区三区| 欧洲在线/亚洲| 欧美军同video69gay| 欧美电影免费观看完整版| 日韩欧美黄色影院| 国产欧美日韩在线| 亚洲欧美一区二区三区国产精品 | 日本网站在线观看一区二区三区| 婷婷夜色潮精品综合在线| 蜜臀av一区二区在线免费观看| 久久精品国产77777蜜臀| 国产精品自拍网站| 色综合久久综合网97色综合 | 日韩国产精品大片| 国产一区二区三区蝌蚪| 99久久久久免费精品国产 | 国产成人精品午夜视频免费 | 欧美电影一区二区| 久久综合久久综合亚洲| 亚洲欧美日本在线| 日韩成人午夜电影| 成人综合婷婷国产精品久久| 91黄色免费看| 久久久久9999亚洲精品| 亚洲综合区在线| 激情小说亚洲一区| 91福利区一区二区三区| 欧美成人伊人久久综合网| 亚洲欧洲日韩av| 黄一区二区三区| 日本伦理一区二区| 国产欧美一区二区精品久导航 | 99久久久精品免费观看国产蜜| 色乱码一区二区三区88 | 国产乱妇无码大片在线观看| 91麻豆蜜桃一区二区三区| 7777精品伊人久久久大香线蕉| 国产网站一区二区| 久久99在线观看| 欧美日韩国产综合久久| 国产午夜三级一区二区三| 亚洲成人动漫精品| 日本电影亚洲天堂一区| 久久精品视频一区二区| 亚洲1区2区3区4区| 日本久久精品电影| 亚洲欧洲成人自拍| 成人毛片在线观看| 亚洲视频小说图片| 欧美美女一区二区在线观看| 国产精品免费视频一区| 成人精品视频.| 欧美电影免费观看高清完整版在线 | 亚洲人成7777| 日本亚洲三级在线| 欧美唯美清纯偷拍| 一区二区三区精品| 色综合色狠狠天天综合色| 国产精品毛片大码女人| 国产成人欧美日韩在线电影| 欧美精品一区视频| 蜜臀av一区二区在线观看| 欧美一区二区高清| 亚洲视频在线观看三级| 色婷婷久久99综合精品jk白丝| 国产综合久久久久影院| 91麻豆精品国产91久久久使用方法 | 色婷婷综合五月| 亚洲麻豆国产自偷在线| 在线亚洲一区二区| 一区二区三区不卡在线观看 | 国产一区二区三区综合| 精品国产一二三| 国产精品自拍网站| 国产亚洲成aⅴ人片在线观看| 国产suv精品一区二区6| 成人免费一区二区三区视频 | 欧美一区二区大片| 国产曰批免费观看久久久| 日韩色在线观看| 亚洲色图制服诱惑| 亚洲一级二级在线| 免费视频最近日韩| 欧美va在线播放| 黑人精品欧美一区二区蜜桃| 中文字幕免费不卡| 欧美亚洲一区二区在线| 美国一区二区三区在线播放| 久久影院午夜片一区| 99riav久久精品riav| 日韩—二三区免费观看av| 国产三级欧美三级日产三级99| 99免费精品视频| 图片区小说区区亚洲影院| 久久综合五月天婷婷伊人| 97成人超碰视| 蜜臀精品久久久久久蜜臀 | 97精品电影院| 午夜精品久久久| 久久午夜老司机| 国产剧情一区二区三区| 成人动漫在线一区| 北岛玲一区二区三区四区| 欧美成人一级视频| 色综合天天做天天爱| 蜜桃视频一区二区三区| 亚洲伦理在线免费看| 日韩天堂在线观看| 一本色道久久综合亚洲91| 寂寞少妇一区二区三区| 一区二区三区成人| 国产精品无人区| 日韩欧美一卡二卡| 欧美三电影在线| 97精品视频在线观看自产线路二| 日本成人在线一区| 亚洲小说欧美激情另类| 亚洲欧洲性图库| 久久久久久亚洲综合| 91精品国产免费| 色偷偷久久一区二区三区| 国产高清久久久| 激情伊人五月天久久综合| 国产自产v一区二区三区c| 久久精品亚洲一区二区三区浴池| 国产三区在线成人av| 成人午夜在线免费| 一区二区三区在线免费播放| 欧美男生操女生| 日本高清成人免费播放| 成人视屏免费看| 激情丁香综合五月| 日韩av一二三| 天堂蜜桃91精品| 亚洲一区二区三区中文字幕在线| 国产精品网站一区| 中文字幕第一区第二区| 国产午夜亚洲精品羞羞网站| 2023国产精品自拍| 久久综合999| 久久夜色精品国产噜噜av | 国产精品久久久久四虎| 久久久久久黄色| 日本一区二区三区高清不卡| 国产日韩精品一区二区三区在线| 日韩欧美视频在线| 97久久精品人人做人人爽50路| 国产精品一区二区三区99| 国产乱淫av一区二区三区| 成人黄色在线视频| 国产剧情一区二区| 国产成人8x视频一区二区| 丁香一区二区三区| 91视频免费观看| 欧美日韩中文另类| 日韩三级电影网址| 国产欧美视频在线观看| 亚洲色图欧洲色图| 亚洲高清免费视频| 久久99精品久久久久久动态图| 激情综合色综合久久| 大白屁股一区二区视频| eeuss鲁片一区二区三区| 99久久99久久精品免费观看 | 欧美精品在线视频| 日韩精品一区二区三区在线| 国产亚洲成年网址在线观看| 亚洲欧美国产高清| 日韩电影在线一区| 成人网页在线观看| 欧美日本不卡视频| 精品国产区一区| 亚洲免费观看视频| 久久精品噜噜噜成人88aⅴ| 国产成人aaa| 在线成人免费观看| 国产精品卡一卡二卡三| 亚洲国产日韩av| 国产精品一二一区| 欧美亚一区二区| 久久伊人蜜桃av一区二区| 亚洲欧美一区二区三区国产精品| 日本成人在线电影网| 99精品国产91久久久久久| 91精品国产麻豆| 国产精品久久久久久久久图文区| 亚洲成人一二三| 不卡一区二区三区四区| 欧美理论片在线|