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

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

?? tif_fax3.h

?? 一款最完整的工業(yè)組態(tài)軟源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: tif_fax3.h,v 1.4 2004/10/16 15:34:33 drolon Exp $ */

/*
 * Copyright (c) 1990-1997 Sam Leffler
 * Copyright (c) 1991-1997 Silicon Graphics, Inc.
 *
 * Permission to use, copy, modify, distribute, and sell this software and 
 * its documentation for any purpose is hereby granted without fee, provided
 * that (i) the above copyright notices and this permission notice appear in
 * all copies of the software and related documentation, and (ii) the names of
 * Sam Leffler and Silicon Graphics may not be used in any advertising or
 * publicity relating to the software without the specific, prior written
 * permission of Sam Leffler and Silicon Graphics.
 * 
 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
 * 
 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
 * OF THIS SOFTWARE.
 */

#ifndef _FAX3_
#define	_FAX3_
/*
 * TIFF Library.
 *
 * CCITT Group 3 (T.4) and Group 4 (T.6) Decompression Support.
 *
 * Decoder support is derived, with permission, from the code
 * in Frank Cringle's viewfax program;
 *      Copyright (C) 1990, 1995  Frank D. Cringle.
 */
#include "tiff.h"

/*
 * To override the default routine used to image decoded
 * spans one can use the pseduo tag TIFFTAG_FAXFILLFUNC.
 * The routine must have the type signature given below;
 * for example:
 *
 * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
 *
 * where buf is place to set the bits, runs is the array of b&w run
 * lengths (white then black), erun is the last run in the array, and
 * lastx is the width of the row in pixels.  Fill routines can assume
 * the run array has room for at least lastx runs and can overwrite
 * data in the run array as needed (e.g. to append zero runs to bring
 * the count up to a nice multiple).
 */
typedef	void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*, uint32);

/*
 * The default run filler; made external for other decoders.
 */
#if defined(__cplusplus)
extern "C" {
#endif
extern	void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32);
#if defined(__cplusplus)
}
#endif


/* finite state machine codes */
#define S_Null		0
#define S_Pass		1
#define S_Horiz		2
#define S_V0		3
#define S_VR		4
#define S_VL		5
#define S_Ext		6
#define S_TermW		7
#define S_TermB		8
#define S_MakeUpW	9
#define S_MakeUpB	10
#define S_MakeUp	11
#define S_EOL		12

typedef struct {		/* state table entry */
	unsigned char State;	/* see above */
	unsigned char Width;	/* width of code in bits */
	uint32	Param;		/* unsigned 32-bit run length in bits */
} TIFFFaxTabEnt;

extern	const TIFFFaxTabEnt TIFFFaxMainTable[];
extern	const TIFFFaxTabEnt TIFFFaxWhiteTable[];
extern	const TIFFFaxTabEnt TIFFFaxBlackTable[];

/*
 * The following macros define the majority of the G3/G4 decoder
 * algorithm using the state tables defined elsewhere.  To build
 * a decoder you need some setup code and some glue code. Note
 * that you may also need/want to change the way the NeedBits*
 * macros get input data if, for example, you know the data to be
 * decoded is properly aligned and oriented (doing so before running
 * the decoder can be a big performance win).
 *
 * Consult the decoder in the TIFF library for an idea of what you
 * need to define and setup to make use of these definitions.
 *
 * NB: to enable a debugging version of these macros define FAX3_DEBUG
 *     before including this file.  Trace output goes to stdout.
 */

#ifndef EndOfData
#define EndOfData()	(cp >= ep)
#endif
/*
 * Need <=8 or <=16 bits of input data.  Unlike viewfax we
 * cannot use/assume a word-aligned, properly bit swizzled
 * input data set because data may come from an arbitrarily
 * aligned, read-only source such as a memory-mapped file.
 * Note also that the viewfax decoder does not check for
 * running off the end of the input data buffer.  This is
 * possible for G3-encoded data because it prescans the input
 * data to count EOL markers, but can cause problems for G4
 * data.  In any event, we don't prescan and must watch for
 * running out of data since we can't permit the library to
 * scan past the end of the input data buffer.
 *
 * Finally, note that we must handle remaindered data at the end
 * of a strip specially.  The coder asks for a fixed number of
 * bits when scanning for the next code.  This may be more bits
 * than are actually present in the data stream.  If we appear
 * to run out of data but still have some number of valid bits
 * remaining then we makeup the requested amount with zeros and
 * return successfully.  If the returned data is incorrect then
 * we should be called again and get a premature EOF error;
 * otherwise we should get the right answer.
 */
#ifndef NeedBits8
#define NeedBits8(n,eoflab) do {					\
    if (BitsAvail < (n)) {						\
	if (EndOfData()) {						\
	    if (BitsAvail == 0)			/* no valid bits */	\
		goto eoflab;						\
	    BitsAvail = (n);			/* pad with zeros */	\
	} else {							\
	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
	    BitsAvail += 8;						\
	}								\
    }									\
} while (0)
#endif
#ifndef NeedBits16
#define NeedBits16(n,eoflab) do {					\
    if (BitsAvail < (n)) {						\
	if (EndOfData()) {						\
	    if (BitsAvail == 0)			/* no valid bits */	\
		goto eoflab;						\
	    BitsAvail = (n);			/* pad with zeros */	\
	} else {							\
	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
	    if ((BitsAvail += 8) < (n)) {				\
		if (EndOfData()) {					\
		    /* NB: we know BitsAvail is non-zero here */	\
		    BitsAvail = (n);		/* pad with zeros */	\
		} else {						\
		    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;	\
		    BitsAvail += 8;					\
		}							\
	    }								\
	}								\
    }									\
} while (0)
#endif
#define GetBits(n)	(BitAcc & ((1<<(n))-1))
#define ClrBits(n) do {							\
    BitsAvail -= (n);							\
    BitAcc >>= (n);							\
} while (0)

#ifdef FAX3_DEBUG
static const char* StateNames[] = {
    "Null   ",
    "Pass   ",
    "Horiz  ",
    "V0     ",
    "VR     ",
    "VL     ",
    "Ext    ",
    "TermW  ",
    "TermB  ",
    "MakeUpW",
    "MakeUpB",
    "MakeUp ",
    "EOL    ",
};
#define DEBUG_SHOW putchar(BitAcc & (1 << t) ? '1' : '0')
#define LOOKUP8(wid,tab,eoflab) do {					\
    int t;								\
    NeedBits8(wid,eoflab);						\
    TabEnt = tab + GetBits(wid);					\
    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
	   StateNames[TabEnt->State], TabEnt->Param);			\
    for (t = 0; t < TabEnt->Width; t++)					\
	DEBUG_SHOW;							\
    putchar('\n');							\
    fflush(stdout);							\
    ClrBits(TabEnt->Width);						\
} while (0)
#define LOOKUP16(wid,tab,eoflab) do {					\
    int t;								\
    NeedBits16(wid,eoflab);						\
    TabEnt = tab + GetBits(wid);					\
    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
	   StateNames[TabEnt->State], TabEnt->Param);			\
    for (t = 0; t < TabEnt->Width; t++)					\
	DEBUG_SHOW;							\
    putchar('\n');							\
    fflush(stdout);							\
    ClrBits(TabEnt->Width);						\
} while (0)

#define SETVAL(x) do {							\
    *pa++ = RunLength + (x);						\
    printf("SETVAL: %d\t%d\n", RunLength + (x), a0);			\
    a0 += x;								\
    RunLength = 0;							\
} while (0)
#else
#define LOOKUP8(wid,tab,eoflab) do {					\
    NeedBits8(wid,eoflab);						\
    TabEnt = tab + GetBits(wid);					\
    ClrBits(TabEnt->Width);						\
} while (0)
#define LOOKUP16(wid,tab,eoflab) do {					\
    NeedBits16(wid,eoflab);						\
    TabEnt = tab + GetBits(wid);					\
    ClrBits(TabEnt->Width);						\
} while (0)

/*
 * Append a run to the run length array for the
 * current row and reset decoding state.
 */
#define SETVAL(x) do {							\
    *pa++ = RunLength + (x);						\
    a0 += (x);								\
    RunLength = 0;							\
} while (0)
#endif

/*
 * Synchronize input decoding at the start of each
 * row by scanning for an EOL (if appropriate) and
 * skipping any trash data that might be present
 * after a decoding error.  Note that the decoding
 * done elsewhere that recognizes an EOL only consumes
 * 11 consecutive zero bits.  This means that if EOLcnt
 * is non-zero then we still need to scan for the final flag
 * bit that is part of the EOL code.
 */
#define	SYNC_EOL(eoflab) do {						\
    if (EOLcnt == 0) {							\
	for (;;) {							\
	    NeedBits16(11,eoflab);					\
	    if (GetBits(11) == 0)					\

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久久久免费看| 国产成人午夜精品5599| 亚洲高清在线视频| 亚洲一区免费在线观看| 亚洲国产精品麻豆| 日韩成人一级片| 另类小说综合欧美亚洲| 国产精品亚洲一区二区三区妖精| 国内成人精品2018免费看| 久久国产三级精品| 91丨九色丨尤物| 51午夜精品国产| 中文字幕在线观看不卡| 久久综合五月天婷婷伊人| 国产精品私人自拍| 香蕉乱码成人久久天堂爱免费| 免费人成精品欧美精品| 国产成人免费在线| 欧美日韩一区不卡| 国产片一区二区三区| 亚洲不卡av一区二区三区| 久久成人羞羞网站| 日本精品一区二区三区高清 | 精品久久人人做人人爽| 国产精品久久久久久久第一福利 | 欧美在线观看视频在线| 精品国产一区二区三区久久影院| 亚洲精品日产精品乱码不卡| 麻豆精品久久久| 欧美四级电影在线观看| 国产人成一区二区三区影院| 亚洲va韩国va欧美va精品 | 26uuu国产在线精品一区二区| 国产精品久久久一区麻豆最新章节| 亚洲福利电影网| 在线观看不卡一区| 中文字幕在线不卡一区二区三区| 国产麻豆午夜三级精品| 欧美一区二区三区色| 日本亚洲电影天堂| 6080国产精品一区二区| 亚洲第一av色| 欧美日韩小视频| 五月激情六月综合| 7777女厕盗摄久久久| 欧美一区二区精品| 亚洲色图欧美在线| 色婷婷久久综合| 一级精品视频在线观看宜春院 | 亚洲人成小说网站色在线| 国产99精品视频| 亚洲国产欧美在线| 欧美一区二区三区人| 91免费看片在线观看| 亚洲精品国产一区二区精华液 | 色婷婷av一区二区三区软件| 亚洲综合色噜噜狠狠| 欧美高清www午色夜在线视频| 免费看欧美美女黄的网站| 欧美精品久久99| 国产91对白在线观看九色| 亚洲国产美国国产综合一区二区| 日韩一区二区三区电影在线观看| 麻豆精品精品国产自在97香蕉| 久久久久久久久久久久久久久99| eeuss鲁片一区二区三区| 天天综合色天天综合色h| 欧美国产一区二区| 日韩欧美中文一区| 欧美人体做爰大胆视频| 不卡免费追剧大全电视剧网站| 午夜精品国产更新| 最近中文字幕一区二区三区| 日韩欧美一级二级三级| 91高清视频免费看| 一本到不卡免费一区二区| 国模无码大尺度一区二区三区| 一区二区三区小说| 亚洲欧洲精品天堂一级| 国产欧美视频在线观看| 在线一区二区三区| 日韩精品免费专区| 中文字幕一区二区三区乱码在线| 91精品国产欧美一区二区18| 国产精品乡下勾搭老头1| 亚洲成人av免费| 日韩一区在线看| 国产精品久久久久久久岛一牛影视 | 亚洲欧美怡红院| 欧美国产国产综合| 亚洲欧洲色图综合| 亚洲乱码国产乱码精品精的特点| 综合久久久久综合| 亚洲精品视频在线| 亚洲小少妇裸体bbw| 亚洲成人av福利| 麻豆视频一区二区| 国产精品一区不卡| 不卡一区中文字幕| 91免费观看视频| 欧美日韩免费观看一区二区三区| 欧美精品久久天天躁| 日韩欧美国产综合| 欧美激情一区二区三区| 有坂深雪av一区二区精品| 午夜免费久久看| 蜜桃视频一区二区三区在线观看| 国产成人综合在线播放| 色噜噜狠狠色综合欧洲selulu| 91精品国产综合久久久蜜臀图片| 日韩欧美黄色影院| 一区精品在线播放| 蜜桃精品视频在线| va亚洲va日韩不卡在线观看| 欧美日韩一区二区欧美激情 | 欧美—级在线免费片| 亚洲欧美偷拍卡通变态| 强制捆绑调教一区二区| av一本久道久久综合久久鬼色| 欧美日韩一二区| 欧美国产1区2区| 免费在线观看日韩欧美| 菠萝蜜视频在线观看一区| 欧美肥大bbwbbw高潮| 国产视频一区二区三区在线观看 | 欧美日韩国产另类不卡| 久久午夜电影网| 亚洲一区欧美一区| 国产成人免费视频网站| 在线电影欧美成精品| 国产精品天干天干在线综合| 天天亚洲美女在线视频| jlzzjlzz欧美大全| 欧美电影免费观看高清完整版在 | 天天免费综合色| 国产成人综合在线播放| 日韩欧美综合一区| 亚洲一区二区四区蜜桃| 成av人片一区二区| 精品欧美黑人一区二区三区| 亚洲在线中文字幕| 92精品国产成人观看免费| 久久久影视传媒| 另类小说图片综合网| 欧美另类久久久品| 亚洲综合免费观看高清在线观看| 国产乱国产乱300精品| 日韩一区二区三区视频在线观看| 亚洲欧美日韩在线| 成人午夜av影视| 久久只精品国产| 麻豆精品久久久| 日韩欧美在线123| 亚洲成人av一区二区| 在线观看免费视频综合| 亚洲色图欧美激情| 99国产精品国产精品久久| 日本一区二区视频在线| 国产激情一区二区三区| 久久综合九色欧美综合狠狠| 美女在线视频一区| 精品欧美乱码久久久久久| 韩国毛片一区二区三区| 久久久蜜桃精品| 国产成人高清在线| 国产精品久久久久天堂| av成人免费在线| 亚洲色图制服丝袜| 欧美综合亚洲图片综合区| 亚洲乱码国产乱码精品精小说| 色诱视频网站一区| 亚洲国产日韩综合久久精品| 欧美日本韩国一区二区三区视频| 亚洲va天堂va国产va久| 91精品蜜臀在线一区尤物| 日本vs亚洲vs韩国一区三区二区| 日韩欧美激情一区| 国产激情视频一区二区在线观看| 日本一区二区三区国色天香| 成人av电影免费在线播放| 亚洲女同一区二区| 欧美日韩精品一二三区| 日韩制服丝袜av| 亚洲精品一区二区三区影院 | 欧美日精品一区视频| 亚洲一区二区视频| 欧美色窝79yyyycom| 一区二区三区在线观看视频| 欧美专区日韩专区| 亚洲欧美日韩电影| 91丨porny丨国产入口| 亚洲精品欧美激情| 欧美在线观看一区| 亚洲地区一二三色| 91精品国产一区二区三区蜜臀| 国产一区二区三区在线看麻豆| 久久综合九色综合97_久久久| 国产传媒日韩欧美成人| 一区二区免费视频| 欧美精品在线观看一区二区|