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

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

?? grp4comp.c

?? NIST Handwriting OCR Testbed
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*# proc: grp4comp - CCITT Group 4 compresses an image.# proc:*//*********************************************************************   File Name:  grp4comp.c					    **   Modified:   Darlene E. Frederick				    **               Michael D. Garris                                   **   Date:	January 25, 1990				    **   Package:    CCITT4 compression routines			    **                                                                   **   Modified 12/90 by Stan Janet                                    **		flush_buffer() was adding an extra byte to data     **		whether it was already byte-aligned or not          **   Modified 12/94 by Patrick Grother                               **               Reclared the all variables of type "short" to be    **               "int", using a macro SHORT defined in the include   **               file grp4comp.h.                                    **               On images with more than 2^15 rows the              **               result was garbage because of an overflowed line    **               counter. The new declaration has a limit of 2^31    **				   				    **   Contents:   ccitt4_compress()				    **		read_uncompressed_file_into_memory()		    **		control_compression()				    **		prepare_to_compress()				    **		compress_image()				    **		make_array_of_changing_elements()		    **		set_up_first_and_last_changing_elements_c()	    **		prepare_to_compress_next_line()			    **		set_up_first_line()				    **		crash_c()				  	    **								    *	********************************************************************/#ifdef TIME#include <sys/time.h>#endif#include <memory.h>#include <grp4comp.h>/* Added by MDG in order have option of passing alloc responsibilities to caller */#define NOALLOC 0#define ALLOC	1int comp_alloc_flag = ALLOC;int comp_write_init_flag;#ifdef TIME  struct timeval  t1, t2;  struct timezone tz;#endif/************************************************************************   grp4comp is the main routine of this file.  It does pre-           **   liminary setup, calls routines, and does final processing.         *************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   indata - buffer containing the uncompressed data.   **		   inbytes - the number of bytes in indata.            **  		   width - Width in pixels of scan line in indata.     **  		   height - Number of lines in indata.                 **	Returned:          					       **		   outdata - buffer containing the compressed data.    **		   outbytes - the number of bytes in outdata.          *************************************************************************/grp4comp(indata,inbytes,width,height,outdata,outbytes)unsigned char *indata, *outdata;int inbytes, width, height, *outbytes;{   struct uncompressed_descriptor uncompressed;   struct compressed_descriptor compressed;       	uncompressed.pixels_per_line = width;       	uncompressed.number_of_lines = height;        uncompressed.data = indata;        comp_alloc_flag = NOALLOC;        comp_write_init_flag = True;	read_uncompressed_file_into_memory( &uncompressed);        compressed.data = outdata;	control_compression( &uncompressed, &compressed );        *outbytes = compressed.length_in_bytes;/*	printf("\ncompressed:lines: %d, pixels:%d, length:%d\n",	 compressed.number_of_lines, compressed.pixels_per_line, 	 compressed.length_in_bytes); */}/***************************** control_compression **************************			calls the functions that compress the image			*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 *************************************************************************/void control_compression( uncompressed, compressed )struct uncompressed_descriptor *uncompressed;struct compressed_descriptor *compressed;{struct parameters 				 sole_parameters;struct parameters 				*params = &sole_parameters;#ifdef TIME  SHORT i;            tz.tz_minuteswest = 0;            tz.tz_dsttime     = 0;            gettimeofday(&t1, &tz); #endif        	prepare_to_compress( uncompressed, compressed, params );	compress_image( uncompressed, compressed, params );        /* memory deallocation added by Michael D. Garris 2/26/90 */        free(params->reference_line);        free(params->coding_line);#ifdef TIME           gettimeofday(&t2, &tz);            printf("\ntime difference: %ld:%ld\n", t2.tv_sec - t1.tv_sec,           t2.tv_usec - t1.tv_usec);           for(i=0; i<5; i++) printf("%c",'\07');*/#endif}/************************ read_uncompressed_file_into_memory *******************			allocates memory for the uncompressed image.					*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 *************************************************************************/void read_uncompressed_file_into_memory( uncompressed )struct uncompressed_descriptor *uncompressed;{int file_size;     if(comp_alloc_flag){	file_size = uncompressed->pixels_per_line * uncompressed->number_of_lines	 / Pixels_per_byte;	 	if((uncompressed->data = (char *)calloc( file_size, sizeof(char) )) == NULL) { 	    printf("\nCannot allocate enough memory for uncomp file.\n"); 	    crash_c(); 	}     }     else        if(uncompressed->data == NULL){           printf("\nNo memory allocated for input data!\n");           crash_c();        }} /* end read_uncompressed_file_into_memory() *//*************************** prepare_to_compress ****************************			initializes variables in preperation for compression					*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 **		   params - structure storing information needed for   **		   	    comparison and other tasks.		       *************************************************************************/void prepare_to_compress( uncompressed, compressed, params )struct uncompressed_descriptor  *uncompressed;struct compressed_descriptor 	*compressed;struct parameters 				*params;{	        		params->max_pixel   	    = uncompressed->pixels_per_line;	compressed->pixels_per_line = uncompressed->pixels_per_line;	compressed->number_of_lines = uncompressed->number_of_lines;		set_up_first_line_c( params ); 	prepare_to_write_bits_c( compressed );		 } /* end prepare_to_compress() *//****************************** compress_image *******************************					compresses the image						*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **	Returned:          					       **  		   compressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the compressed data.                 **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void compress_image( uncompressed, compressed, params )struct uncompressed_descriptor 	*uncompressed;struct compressed_descriptor 	*compressed;struct parameters *params;{SHORT  line;	for(line = 0; line < uncompressed->number_of_lines; line++) {			     make_array_of_changing_elements( params, uncompressed, line );	     set_up_first_and_last_changing_elements_c( params );	     compress_line( params );	     prepare_to_compress_next_line( params );	} /* end for each line loop */		write_bits_c("000000000001000000000001");	compressed->length_in_bytes = flush_buffer();}/************************ make_array_of_changing_elements *********************		stores in a list pointed to by "params->coding_line" the pixel numbers	of all the changing elements in the coding line	 						*****************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **  		   uncompressed	- structure containing the # of pixels **				  per line, the number of lines, and   **				  the uncompressed data.               **		   line_number -  the number of the line in the image  **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void make_array_of_changing_elements( params, uncompressed, line_number )struct parameters *params;struct uncompressed_descriptor 	*uncompressed;SHORT line_number;{SHORT 	bytes_per_line;int	line_offset;SHORT 	byte_offset;	bytes_per_line = params->max_pixel / Pixels_per_byte;	line_offset = bytes_per_line * line_number;	for(byte_offset=0; byte_offset < bytes_per_line; byte_offset++) {	    process_char(*(uncompressed->data+line_offset+byte_offset),params);	} 	}	/* end make_array_of_changing_elements() *//******************* set_up_first_and_last_changing_elements_c *****************		initializes the first and last changing elements in the coding line						******************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void set_up_first_and_last_changing_elements_c(params)struct parameters *params;{	*(params->coding_line) = Invalid;	*(params->coding_line + ++params->index) = params->max_pixel;	*(params->coding_line + ++params->index) = params->max_pixel;	*(params->coding_line + ++params->index) = params->max_pixel;		/* the previous lines may be necessary if when searching for b1, you	skip some elements because you know that they are the wrong color */}/************************ prepare_to_compress_next_line ***********************		initializes variables in preperation for compressing another line				******************************************************************************//************************************************************************  Arguments          						       **  ---------                					       **	Passed in:         					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       **	Returned:          					       **		   params - structure storing information need for     **		   	    comparison and other tasks.		       *************************************************************************/void prepare_to_compress_next_line(params)struct parameters *params;{SHORT *temp;	/* swap the reference and unchanged coding lines */		temp = params->reference_line;	params->reference_line = params->coding_line;	params->coding_line = temp;		params->pixel = 0;	params->index = 0;	params->previous_color = White;	} /* end prepare_to_read_next_line() */	/******************************* set_up_first_line_c ***************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人亚洲综合色影视| 久久综合九色综合欧美98| 国产精品少妇自拍| 国产一区二区视频在线播放| 欧美肥妇free| 亚洲电影欧美电影有声小说| 色94色欧美sute亚洲线路二| 国产精品美女视频| 99久久精品免费精品国产| 中文字幕免费不卡在线| 国内外成人在线视频| 久久午夜免费电影| 国产91精品精华液一区二区三区 | 99国产一区二区三精品乱码| 一本大道av伊人久久综合| 国产黄色精品视频| 国产精品美女一区二区三区| 不卡视频一二三| 亚洲va欧美va人人爽| 日韩欧美一区二区视频| 国产精品一区二区三区99| 中文字幕一区二区三区av | 国产精品福利av| 欧美亚洲另类激情小说| 男女性色大片免费观看一区二区| 日韩一区二区视频| av午夜一区麻豆| 日韩精品午夜视频| 国产精品福利一区| 日韩视频在线永久播放| 色乱码一区二区三区88| 麻豆精品在线观看| 亚洲综合成人网| 国产欧美一区在线| 日韩午夜av一区| 91影院在线观看| 国产成人在线电影| 蜜臀av一区二区| 亚洲午夜免费视频| 国产精品二三区| 国产午夜精品福利| 精品少妇一区二区三区 | 欧美高清dvd| 色久综合一二码| 91偷拍与自偷拍精品| 国产黄色成人av| 国产福利一区二区三区视频在线 | 国产91在线|亚洲| 精品一区二区在线观看| 免费日本视频一区| 免费在线观看一区| 精品一区二区三区在线观看国产 | 99国产精品久| 色偷偷一区二区三区| 91免费国产在线| 在线视频你懂得一区二区三区| 白白色亚洲国产精品| 成人激情免费电影网址| 91亚洲大成网污www| 色视频一区二区| 91精品国产色综合久久久蜜香臀| 欧美亚洲禁片免费| 欧美成人高清电影在线| 久久久蜜桃精品| 日韩一区欧美一区| 亚洲国产精品久久不卡毛片 | ㊣最新国产の精品bt伙计久久| 国产精品毛片高清在线完整版 | 亚洲欧美综合色| 天堂一区二区在线免费观看| 极品少妇xxxx精品少妇| 成人黄页毛片网站| 欧美一区二区三区啪啪| 久久先锋影音av鲁色资源| 日韩美女视频一区| 久久丁香综合五月国产三级网站| 99在线精品一区二区三区| 制服丝袜激情欧洲亚洲| 久久久久国产免费免费 | 久久综合成人精品亚洲另类欧美| 久久精品一区二区| 日韩精品亚洲专区| 91亚洲男人天堂| 久久久久久免费毛片精品| 亚洲最快最全在线视频| 国产精一品亚洲二区在线视频| 色综合久久88色综合天天6 | 26uuu久久天堂性欧美| 亚洲午夜激情av| 成人国产亚洲欧美成人综合网| 日韩三级av在线播放| 亚洲第一二三四区| 欧美写真视频网站| 亚洲天堂福利av| 国产精品123| 久久只精品国产| 狠狠色丁香婷婷综合久久片| 欧美三日本三级三级在线播放| 中文字幕日韩一区| 成人黄色免费短视频| 亚洲少妇屁股交4| 成人免费视频播放| ㊣最新国产の精品bt伙计久久| 不卡电影一区二区三区| 中文字幕欧美三区| 成人av高清在线| 亚洲女厕所小便bbb| 91久久线看在观草草青青| 一区二区三区在线播放| 国产精品不卡视频| 亚洲va欧美va国产va天堂影院| 91美女蜜桃在线| 一区二区不卡在线播放 | 国产精品国产三级国产| 99在线视频精品| 亚洲成人动漫av| 久久综合国产精品| 色av成人天堂桃色av| 日韩精品一二三| 中文字幕成人网| 欧美日韩一区不卡| 韩国中文字幕2020精品| 国产精品传媒入口麻豆| 欧美日韩国产一级二级| 国内久久婷婷综合| 亚洲国产成人av网| 国产欧美日韩在线视频| 欧美日韩第一区日日骚| 国产91综合网| 人人爽香蕉精品| 亚洲精品v日韩精品| 久久精品一区二区三区不卡 | 麻豆精品一二三| 一区二区不卡在线播放 | 成人性视频网站| 老司机免费视频一区二区| 一区二区三区毛片| 欧美国产日韩亚洲一区| 日韩免费福利电影在线观看| 91激情五月电影| 成人免费视频一区| 成人一区在线观看| 久久超级碰视频| 日韩av午夜在线观看| 亚洲精品videosex极品| 亚洲男女毛片无遮挡| 成人免费在线观看入口| 国产精品网站一区| 成人免费在线视频观看| 久久综合精品国产一区二区三区| 青青草97国产精品免费观看无弹窗版| 精品视频在线看| 天天操天天干天天综合网| 亚洲人一二三区| 亚洲欧美另类在线| 亚洲精品乱码久久久久久久久 | 国产伦精品一区二区三区视频青涩 | 欧美性受极品xxxx喷水| 欧美日韩精品电影| 欧美情侣在线播放| 欧美一级黄色大片| 久久久久久久久久久久久女国产乱| 精品日韩一区二区| 国产精品久久久久三级| 中文字幕色av一区二区三区| 亚洲高清免费观看高清完整版在线观看| 亚洲激情图片一区| 日本午夜精品视频在线观看| 国产在线精品不卡| 日本高清免费不卡视频| 欧美一区午夜精品| 国产精品乱码妇女bbbb| 亚洲va欧美va天堂v国产综合| 久久国产尿小便嘘嘘| 99精品一区二区三区| 欧美一区二区三区视频| 国产精品区一区二区三| 麻豆国产精品一区二区三区| 成人av午夜影院| 欧美精品一区二区三| 亚洲国产欧美日韩另类综合 | 夜夜嗨av一区二区三区中文字幕| 日韩av中文字幕一区二区| av成人老司机| 精品国产乱码久久久久久久久| 亚洲精品自拍动漫在线| 国内精品久久久久影院一蜜桃| 在线观看欧美日本| 国产精品电影一区二区| 丁香啪啪综合成人亚洲小说 | 国内成人免费视频| 91精品国产91久久久久久最新毛片| 国产精品国产三级国产普通话三级| 免费的国产精品| 欧美人牲a欧美精品| 亚洲人成小说网站色在线| 成人av电影在线| 亚洲欧洲一区二区三区| 不卡av电影在线播放| 综合久久久久久久|