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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? jchuff.c

?? 基于Linux的ffmepg decoder
?? C
字號(hào):
/* * jchuff.c * * Copyright (C) 1991-1997, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains Huffman entropy encoding routines. * * Much of the complexity here has to do with supporting output suspension. * If the data destination module demands suspension, we want to be able to * back up to the start of the current MCU.  To do this, we copy state * variables into local working storage, and update them back to the * permanent JPEG objects only upon successful completion of an MCU. */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"#include "jchuff.h"		/* Declarations shared with jcphuff.c */#include "local_mem.h"#include "portab.h"/* Expanded entropy encoder object for Huffman encoding. * * The savable_state subrecord contains fields that change within an MCU, * but must not be updated permanently until we complete the MCU. */typedef struct {  INT32 put_buffer;		/* current bit-accumulation buffer */  int put_bits;			/* # of bits now in it */  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */} savable_state;/* This macro is to work around compilers with missing or broken * structure assignment.  You'll need to fix this code if you have * such a compiler and you change MAX_COMPS_IN_SCAN. */#if 0#ifndef NO_STRUCT_ASSIGN#define ASSIGN_STATE(dest,src)  ((dest) = (src))#else#if MAX_COMPS_IN_SCAN == 4#define ASSIGN_STATE(dest,src)  \	((dest).put_buffer = (src).put_buffer, \	 (dest).put_bits = (src).put_bits, \	 (dest).last_dc_val[0] = (src).last_dc_val[0], \	 (dest).last_dc_val[1] = (src).last_dc_val[1], \	 (dest).last_dc_val[2] = (src).last_dc_val[2], \	 (dest).last_dc_val[3] = (src).last_dc_val[3])#endif#endif#endiftypedef struct {  struct jpeg_entropy_encoder pub; /* public fields */  savable_state saved;		/* Bit buffer & DC state at start of MCU */  /* These fields are NOT loaded into local working state. */  unsigned int restarts_to_go;	/* MCUs left in this restart interval */  int next_restart_num;		/* next restart number to write (0-7) */  /* Pointers to derived tables (these workspaces have image lifespan) */  c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS];  c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS];#ifdef ENTROPY_OPT_SUPPORTED	/* Statistics tables for optimization */  long * dc_count_ptrs[NUM_HUFF_TBLS];  long * ac_count_ptrs[NUM_HUFF_TBLS];#endif} huff_entropy_encoder;typedef huff_entropy_encoder * huff_entropy_ptr;/* Working state while writing an MCU. * This struct contains all the fields that are needed by subroutines. */typedef struct {  JOCTET * next_output_byte;	/* => next byte to write in buffer */  unsigned int * next_output_word;		//pwhsu++:20040113  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */  savable_state cur;		/* Current bit buffer & DC state */  j_compress_ptr cinfo;		/* dump_buffer needs access to this */} working_state;/* Forward declarations *///METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo,//					JBLOCKROW *MCU_data));METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo));//#ifdef ENTROPY_OPT_SUPPORTED//METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo,//					  JBLOCKROW *MCU_data));//METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo));//METHODDEF(void) Encode_block JPP((working_state * state, int last_dc_val, //							 int dc_tbln, int ac_tbln, int vlcnum));//#endif/* * Initialize for a Huffman-compressed scan. * If gather_statistics is TRUE, we do not output anything during the scan, * just count the Huffman symbols used and generate Huffman code tables. */#if 0METHODDEF(void)start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics){  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;  int ci, dctbl, actbl;  jpeg_component_info * compptr;//  entropy->pub.encode_mcu = encode_mcu_huff;  entropy->pub.finish_pass = finish_pass_huff;  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {    compptr = cinfo->cur_comp_info[ci];    dctbl = compptr->dc_tbl_no;    actbl = compptr->ac_tbl_no;    /* Compute derived values for Huffman tables */    /* We may do this more than once for a table, but it's not expensive */    jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,			      & entropy->dc_derived_tbls[dctbl]);		//pwhsu:20031016 玻ネdc huffman table     jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,			      & entropy->ac_derived_tbls[actbl]);		//pwhsu:20031016 玻ネac huffman table	  }  /* Initialize restart stuff */  entropy->restarts_to_go = cinfo->restart_interval;  entropy->next_restart_num = 0;}#endifvoid start_pass_huff1 (j_compress_ptr cinfo){  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;  int ci, dctbl, actbl;  jpeg_component_info * compptr;  entropy->pub.finish_pass = finish_pass_huff;  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {    compptr = cinfo->cur_comp_info[ci];    dctbl = compptr->dc_tbl_no;    actbl = compptr->ac_tbl_no;    /* Compute derived values for Huffman tables */    /* We may do this more than once for a table, but it's not expensive */    jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl,			      & entropy->dc_derived_tbls[dctbl]);		//pwhsu:20031016 玻ネdc huffman table     jpeg_make_c_derived_tbl(cinfo, FALSE, actbl,			      & entropy->ac_derived_tbls[actbl]);		//pwhsu:20031016 玻ネac huffman table	  }  /* Initialize restart stuff */  entropy->restarts_to_go = cinfo->restart_interval;  entropy->next_restart_num = 0;}/* * Compute the derived values for a Huffman table. * This routine also performs some validation checks on the table. * * Note this is also used by jcphuff.c. */GLOBAL(void)jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,			 c_derived_tbl ** pdtbl){  JHUFF_TBL *htbl;  c_derived_tbl *dtbl;  int p, i, l, lastp, si, maxsymbol;  char huffsize[257];  unsigned int huffcode[257];  unsigned int code;  int k1; //pwhsu++:20031022  unsigned int *curtbl;		//pwhsu++:20040107  unsigned int codesize;	//pwhsu++:20040107  /* Note that huffsize[] and huffcode[] are filled in code-length order,   * paralleling the order of the symbols themselves in htbl->huffval[].   */  /* Find the input Huffman table */  if (tblno < 0 || tblno >= NUM_HUFF_TBLS)    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);  htbl =    isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno];  if (htbl == NULL)    ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno);  /* Allocate a workspace if we haven't already done so. */  if (*pdtbl == NULL)    *pdtbl = (c_derived_tbl *)      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,				  SIZEOF(c_derived_tbl));  dtbl = *pdtbl;    /* Figure C.1: make table of Huffman code length for each symbol */  p = 0;  for (l = 1; l <= 16; l++) {    i = (int) htbl->bits[l];    if (i < 0 || p + i > 256)	/* protect against table overrun */      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);    while (i--)      huffsize[p++] = (char) l;  }  huffsize[p] = 0;  lastp = p;    /* Figure C.2: generate the codes themselves */  /* We also validate that the counts represent a legal Huffman code tree. */  code = 0;  si = huffsize[0];  p = 0;  while (huffsize[p]) {    while (((int) huffsize[p]) == si) {      huffcode[p++] = code;      code++;    }    /* code is now 1 more than the last code used for codelength si; but     * it must still fit in si bits, since no code is allowed to be all ones.     */    if (((INT32) code) >= (((INT32) 1) << si))      ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);    code <<= 1;    si++;  }    /* Figure C.3: generate encoding tables */  /* These are code and size indexed by symbol value */  /* Set all codeless symbols to have code length 0;   * this lets us detect duplicate VAL entries here, and later   * allows emit_bits to detect any attempt to emit such symbols.   *///  MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi));		//pwhsu--:20040128 memzero  //pwhsu++:20031022  /*  for ( k1=0; k1<256; k1++){	  if (isDC){		  rinfo.HuffsiDC[tblno][k1] = 0;	  }	  else{		  rinfo.HuffsiAC[tblno][k1] = 0;	  }  }  //pwhsu++:20031022  */  /* This is also a convenient place to check for out-of-range   * and duplicated VAL entries.  We allow 0..255 for AC symbols   * but only 0..15 for DC.  (We could constrain them further   * based on data depth and mode, but this seems enough.)   */  maxsymbol = isDC ? 15 : 255;  //pwhsu++:20040107  if(isDC){	  curtbl = tblno ? huftbl1_dc : huftbl0_dc;  }else{	  curtbl = tblno ? huftbl1_ac : huftbl0_ac;  }  for (p = 0; p < lastp; p++) {    i = htbl->huffval[p];	codesize = (huffcode[p]<< (5 + i%16) ) | (huffsize[p]+i%16);	curtbl[i] = codesize;  }}LOCAL(boolean)flush_bits (void){  unsigned char curbits;  unsigned char curbits2;  unsigned char	tmp;  unsigned int buf1;  unsigned char buf2;  	READ_VADR(curbits);	READ_VLASTWORD(buf1);  tmp = (((curbits-1) & 0xff) % 8);  curbits2 = 7-tmp;    /* fill any partial byte with ones */  if (curbits2 != 0){				   BitstreamPutBits((0x7F)>>tmp, curbits2);	   	   buf2 = ( buf1 >> (  ( 32-((curbits)&0x1F))&0x18 ) ) & 0xFF;	   switch(tmp){	   case 0:			buf2 = buf2 & 0x80 | 0x7f; 			break;	   case 1:			buf2 = buf2 & 0xc0 | 0x3f; 			break;	   case 2:			buf2 = buf2 & 0xe0 | 0x1f; 			break;       case 3:			buf2 = buf2 & 0xf0 | 0x0f; 			break;	   case 4:			buf2 = buf2 & 0xf8 | 0x07; 			break;	   case 5:			buf2 = buf2 & 0xfc | 0x03; 			break;	   case 6:			buf2 = buf2 & 0xfe | 0x01; 			break;	   default:			buf2 = 0x0; 			break;	   }	   if(buf2 == 0xff){		mFa526DrainWrBuf ();		BitstreamPutBits(0, 8);	   }	  }  return TRUE;}/* * Emit a restart marker & resynchronize predictions. */LOCAL(boolean)emit_restart (int restart_num){  if (! flush_bits())    return FALSE;  //BitstreamPutBits(0xFF,8);  BitstreamPutBits( 0xFF00 | JPEG_RST0 + restart_num,16);	SET_PYDCR(0);	SET_PUVDCR(0);	  return TRUE;}/* * Finish up at the end of a Huffman-compressed scan. */METHODDEF(void)finish_pass_huff (j_compress_ptr cinfo){	flush_bits();}/* * Module initialization routine for Huffman entropy encoding. */GLOBAL(void)jinit_huff_encoder (j_compress_ptr cinfo){  huff_entropy_ptr entropy;  int i;  entropy = (huff_entropy_ptr)    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,				SIZEOF(huff_entropy_encoder));  cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;//  entropy->pub.start_pass = start_pass_huff;  /* Mark tables unallocated */  for (i = 0; i < NUM_HUFF_TBLS; i++) {    entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;  }}//pwhsu++:20031030//The modified function of Encode one MCUboolean Encode_mcu (j_compress_ptr cinfo){  huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;  working_state state;  /* Update restart-interval state too */  if (cinfo->restart_interval) {    if (entropy->restarts_to_go == 0) {      entropy->restarts_to_go = cinfo->restart_interval;      entropy->next_restart_num++;      entropy->next_restart_num &= 7;    }    entropy->restarts_to_go--;  }    /* Emit restart marker if needed */  if (cinfo->restart_interval) {	  if (entropy->restarts_to_go == 0) {						if (! emit_restart(entropy->next_restart_num))				return FALSE;	  }  }  return TRUE;}//pwhsu++:20031030

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费毛片aaaaa**| 久久精品亚洲国产奇米99| 日韩欧美国产一二三区| 久久色在线观看| 午夜精品视频一区| 一区二区三区精密机械公司| 亚洲国产成人高清精品| 极品美女销魂一区二区三区免费 | 在线观看一区二区视频| 日韩欧美色电影| 亚洲精品菠萝久久久久久久| 久久99国产精品免费网站| 一本到高清视频免费精品| 亚洲精品在线电影| 亚洲一区二区三区四区五区黄| 精品在线视频一区| 欧美日韩国产123区| 欧美激情艳妇裸体舞| 奇米影视一区二区三区| 99久精品国产| 久久这里只精品最新地址| 亚洲国产日韩一区二区| 99re6这里只有精品视频在线观看| 欧美一级艳片视频免费观看| 综合久久国产九一剧情麻豆| 韩国精品主播一区二区在线观看| 欧美三级电影一区| 亚洲少妇30p| 一本色道久久综合狠狠躁的推荐 | 欧美tk—视频vk| 亚洲福利电影网| 欧美在线看片a免费观看| 亚洲欧美一区二区三区极速播放| 国产精品18久久久久久久久 | av在线综合网| 国产精品女上位| 成人做爰69片免费看网站| 久久精品一区二区| 国产99精品国产| 国产精品久久久久婷婷| 成人av在线一区二区| 成人欧美一区二区三区1314| 成人不卡免费av| 日韩电影免费一区| 欧美日韩免费高清一区色橹橹| 亚洲综合激情另类小说区| 91国偷自产一区二区使用方法| 亚洲一区影音先锋| 欧美日韩和欧美的一区二区| 青青草国产精品97视觉盛宴 | 亚洲精品国产品国语在线app| 在线国产电影不卡| 国内不卡的二区三区中文字幕| 久久天天做天天爱综合色| 99re66热这里只有精品3直播| 亚洲视频网在线直播| 8x福利精品第一导航| 国产成人在线视频网址| 伊人开心综合网| 欧美精品一区二区三区蜜桃| 成人禁用看黄a在线| 亚洲一二三区在线观看| 欧美成人三级电影在线| 色哟哟一区二区在线观看| 日本亚洲三级在线| 国产女同互慰高潮91漫画| 欧美高清hd18日本| 粉嫩av一区二区三区在线播放 | 日韩一区二区三区免费看 | 日韩激情在线观看| 亚洲精选视频免费看| 日韩午夜激情电影| 欧美日韩极品在线观看一区| aaa国产一区| 国产99久久久国产精品| 免费在线一区观看| 亚洲午夜三级在线| 免费一区二区视频| 综合久久综合久久| 国产目拍亚洲精品99久久精品| 日韩亚洲欧美一区| 欧美挠脚心视频网站| 欧美三电影在线| 日本久久精品电影| 91年精品国产| 91视频国产观看| 成人亚洲精品久久久久软件| 国产毛片精品国产一区二区三区| 日韩电影在线观看网站| 91行情网站电视在线观看高清版| 99久久免费精品高清特色大片| 夫妻av一区二区| 成人自拍视频在线观看| 国产馆精品极品| 久久亚洲二区三区| 国产日韩欧美精品综合| 欧美国产精品一区二区三区| 日韩一区和二区| 久久综合色婷婷| 欧美激情一区二区三区蜜桃视频| 国产精品欧美经典| 亚洲色图欧美激情| 日韩福利电影在线| 国产在线播放一区三区四| 丁香天五香天堂综合| 色美美综合视频| 欧美一区二区三区在| 26uuu精品一区二区| 亚洲丝袜美腿综合| 久久精品999| 成人99免费视频| 欧美日本国产一区| 亚洲欧洲无码一区二区三区| 视频一区二区三区入口| 九一久久久久久| 91女神在线视频| 精品日产卡一卡二卡麻豆| |精品福利一区二区三区| 韩国女主播一区| 日本久久精品电影| 国产日韩欧美精品综合| 蜜臀a∨国产成人精品| 国产一区二区视频在线| 欧美午夜片在线看| 国产精品国产精品国产专区不蜜 | 日韩欧美国产综合一区 | 成人一区二区三区| 日韩视频免费观看高清完整版在线观看 | 中文字幕国产精品一区二区| 亚洲va欧美va国产va天堂影院| 国产不卡视频在线播放| 91精品国模一区二区三区| 亚洲视频中文字幕| 国产91综合一区在线观看| 日韩欧美成人一区二区| 一区二区成人在线观看| 99久久精品国产一区二区三区| 精品国产乱码久久久久久1区2区 | 欧美日韩一区二区电影| 亚洲精品乱码久久久久久黑人| 国内精品免费**视频| 精品美女一区二区三区| 日本视频中文字幕一区二区三区| 色av一区二区| 亚洲一级电影视频| 在线观看亚洲精品视频| 亚洲人成亚洲人成在线观看图片| 国产一区二区免费视频| 久久品道一品道久久精品| 国产精品18久久久久久久久 | 午夜a成v人精品| 欧美放荡的少妇| 日本美女一区二区三区视频| 7777精品伊人久久久大香线蕉 | 麻豆91精品91久久久的内涵| 日韩一级高清毛片| 久久 天天综合| 国产精品黄色在线观看| 91无套直看片红桃| 亚洲自拍偷拍九九九| 91精品国产综合久久久蜜臀粉嫩| 五月天欧美精品| 国产日产欧美一区| 91麻豆福利精品推荐| 图片区小说区区亚洲影院| 欧美tickling挠脚心丨vk| 风间由美性色一区二区三区| 亚洲欧美日本韩国| 欧美一区二区三区成人| 国产成人综合视频| 午夜精品久久久久久久久| 亚洲精品一区二区三区四区高清| av电影天堂一区二区在线观看| 偷偷要91色婷婷| 亚洲日本在线天堂| 精品国产乱码久久久久久免费| 色婷婷久久久久swag精品| 蓝色福利精品导航| 亚洲精品美国一| 日本一区二区三区四区| 欧美日韩精品三区| 91亚洲国产成人精品一区二三| 激情五月激情综合网| 欧美一区二区网站| 日韩在线观看一区二区| 国产色91在线| 中文字幕av不卡| 国产精品的网站| 亚洲欧美另类图片小说| 亚洲人被黑人高潮完整版| 一区二区三区国产| 亚洲综合无码一区二区| 中文字幕亚洲电影| 亚洲色大成网站www久久九九| 亚洲欧美在线aaa| 中文字幕高清一区| 国产精品免费看片| 中文字幕一区视频| 国产精品初高中害羞小美女文| 国产日韩欧美一区二区三区乱码|