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

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

?? jcmaster.c

?? 基于Linux的ffmepg decoder
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * jcmaster.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 master control logic for the JPEG compressor. * These routines are concerned with parameter validation, initial setup, * and inter-pass control (determining the number of passes and the work  * to be done in each pass). */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"#include "local_mem.h"/* Private state */typedef enum {	main_pass,		/* input data, also do first output step */	huff_opt_pass,		/* Huffman code optimization pass */	output_pass		/* data output pass */} c_pass_type;typedef struct {  struct jpeg_comp_master pub;	/* public fields */  c_pass_type pass_type;	/* the type of the current pass */  int pass_number;		/* # of passes completed */  int total_passes;		/* total # of passes needed */  int scan_number;		/* current index in scan_info[] */} my_comp_master;typedef my_comp_master * my_master_ptr;/* * Support routines that do various essential calculations. */LOCAL(void)initial_setup (j_compress_ptr cinfo)/* Do computations that are needed before master selection phase */{  int ci;  jpeg_component_info *compptr;  long samplesperrow;  JDIMENSION jd_samplesperrow;  /* Sanity check on image dimensions */  if (cinfo->image_height <= 0 || cinfo->image_width <= 0      || cinfo->num_components <= 0 || cinfo->input_components <= 0)    ERREXIT(cinfo, JERR_EMPTY_IMAGE);  /* Make sure image isn't bigger than I can handle */  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);  /* Width of an input scanline must be representable as JDIMENSION. */  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;  jd_samplesperrow = (JDIMENSION) samplesperrow;  if ((long) jd_samplesperrow != samplesperrow)    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);  /* For now, precision must match compiled-in value... */  if (cinfo->data_precision != BITS_IN_JSAMPLE)    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);  /* Check that number of components won't exceed internal array sizes */  if (cinfo->num_components > MAX_COMPONENTS)    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,	     MAX_COMPONENTS);  /* Compute maximum sampling factors; check factor validity */  cinfo->max_h_samp_factor = 1;  cinfo->max_v_samp_factor = 1;  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)      ERREXIT(cinfo, JERR_BAD_SAMPLING);    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,				   compptr->h_samp_factor);    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,				   compptr->v_samp_factor);  }  /* Compute dimensions of components */  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    /* Fill in the correct component_index value; don't rely on application */    compptr->component_index = ci;    /* For compression, we never do DCT scaling. */    compptr->DCT_scaled_size = DCTSIZE;    /* Size in DCT blocks */    compptr->width_in_blocks = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,		    (long) (cinfo->max_h_samp_factor * DCTSIZE));    compptr->height_in_blocks = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,		    (long) (cinfo->max_v_samp_factor * DCTSIZE));    /* Size in samples */    compptr->downsampled_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,		    (long) cinfo->max_h_samp_factor);    compptr->downsampled_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,		    (long) cinfo->max_v_samp_factor);    /* Mark component needed (this flag isn't actually used for compression) */    compptr->component_needed = TRUE;  }  /* Compute number of fully interleaved MCU rows (number of times that   * main controller will call coefficient controller).   */  cinfo->total_iMCU_rows = (JDIMENSION)    jdiv_round_up((long) cinfo->image_height,		  (long) (cinfo->max_v_samp_factor*DCTSIZE));}#ifdef C_MULTISCAN_FILES_SUPPORTEDLOCAL(void)validate_script (j_compress_ptr cinfo)/* Verify that the scan script in cinfo->scan_info[] is valid; also * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. */{  const jpeg_scan_info * scanptr;  int scanno, ncomps, ci, coefi, thisi;  int Ss, Se, Ah, Al;  boolean component_sent[MAX_COMPONENTS];#ifdef C_PROGRESSIVE_SUPPORTED  int * last_bitpos_ptr;  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];  /* -1 until that coefficient has been seen; then last Al for it */#endif  if (cinfo->num_scans <= 0)    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;   * for progressive JPEG, no scan can have this.   */  scanptr = cinfo->scan_info;  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {#ifdef C_PROGRESSIVE_SUPPORTED    cinfo->progressive_mode = TRUE;    last_bitpos_ptr = & last_bitpos[0][0];    for (ci = 0; ci < cinfo->num_components; ci++)       for (coefi = 0; coefi < DCTSIZE2; coefi++)	*last_bitpos_ptr++ = -1;#else    ERREXIT(cinfo, JERR_NOT_COMPILED);#endif  } else {    cinfo->progressive_mode = FALSE;    for (ci = 0; ci < cinfo->num_components; ci++)       component_sent[ci] = FALSE;  }  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {    /* Validate component indexes */    ncomps = scanptr->comps_in_scan;    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);    for (ci = 0; ci < ncomps; ci++) {      thisi = scanptr->component_index[ci];      if (thisi < 0 || thisi >= cinfo->num_components)	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);      /* Components must appear in SOF order within each scan */      if (ci > 0 && thisi <= scanptr->component_index[ci-1])	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);    }    /* Validate progression parameters */    Ss = scanptr->Ss;    Se = scanptr->Se;    Ah = scanptr->Ah;    Al = scanptr->Al;    if (cinfo->progressive_mode) {#ifdef C_PROGRESSIVE_SUPPORTED      /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that       * seems wrong: the upper bound ought to depend on data precision.       * Perhaps they really meant 0..N+1 for N-bit precision.       * Here we allow 0..10 for 8-bit data; Al larger than 10 results in       * out-of-range reconstructed DC values during the first DC scan,       * which might cause problems for some decoders.       */#if BITS_IN_JSAMPLE == 8#define MAX_AH_AL 10#else#define MAX_AH_AL 13#endif      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||	  Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL)	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      if (Ss == 0) {	if (Se != 0)		/* DC and AC together not OK */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      } else {	if (ncomps != 1)	/* AC scans must be for only one component */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      }      for (ci = 0; ci < ncomps; ci++) {	last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];	if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	for (coefi = Ss; coefi <= Se; coefi++) {	  if (last_bitpos_ptr[coefi] < 0) {	    /* first scan of this coefficient */	    if (Ah != 0)	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	  } else {	    /* not first scan */	    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);	  }	  last_bitpos_ptr[coefi] = Al;	}      }#endif    } else {      /* For sequential JPEG, all progression parameters must be these: */      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);      /* Make sure components are not sent twice */      for (ci = 0; ci < ncomps; ci++) {	thisi = scanptr->component_index[ci];	if (component_sent[thisi])	  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);	component_sent[thisi] = TRUE;      }    }  }  /* Now verify that everything got sent. */  if (cinfo->progressive_mode) {#ifdef C_PROGRESSIVE_SUPPORTED    /* For progressive mode, we only check that at least some DC data     * got sent for each component; the spec does not require that all bits     * of all coefficients be transmitted.  Would it be wiser to enforce     * transmission of all coefficient bits??     */    for (ci = 0; ci < cinfo->num_components; ci++) {      if (last_bitpos[ci][0] < 0)	ERREXIT(cinfo, JERR_MISSING_DATA);    }#endif  } else {    for (ci = 0; ci < cinfo->num_components; ci++) {      if (! component_sent[ci])	ERREXIT(cinfo, JERR_MISSING_DATA);    }  }}#endif /* C_MULTISCAN_FILES_SUPPORTED */LOCAL(void)select_scan_parameters (j_compress_ptr cinfo)/* Set up the scan parameters for the current scan */{  int ci;#ifdef C_MULTISCAN_FILES_SUPPORTED  if (cinfo->scan_info != NULL) {    /* Prepare for current scan --- the script is already validated */    my_master_ptr master = (my_master_ptr) cinfo->master;    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;    cinfo->comps_in_scan = scanptr->comps_in_scan;    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {      cinfo->cur_comp_info[ci] =	&cinfo->comp_info[scanptr->component_index[ci]];    }    cinfo->Ss = scanptr->Ss;    cinfo->Se = scanptr->Se;    cinfo->Ah = scanptr->Ah;    cinfo->Al = scanptr->Al;  }  else#endif  {    /* Prepare for single sequential-JPEG scan containing all components */    if (cinfo->num_components > MAX_COMPS_IN_SCAN)      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,	       MAX_COMPS_IN_SCAN);    cinfo->comps_in_scan = cinfo->num_components;    for (ci = 0; ci < cinfo->num_components; ci++) {      cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci];    }    cinfo->Ss = 0;    cinfo->Se = DCTSIZE2-1;    cinfo->Ah = 0;    cinfo->Al = 0;  }}LOCAL(void)per_scan_setup (j_compress_ptr cinfo)/* Do computations that are needed before processing a JPEG scan *//* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */{  int ci, mcublks, tmp;  jpeg_component_info *compptr;  unsigned int mcublkn;		//pwhsu++:20040108  unsigned int Comp_member;	//pwhsu++:20040108  unsigned int tbidx;		//pwhsu++:20040108  unsigned short tbidx0;  unsigned short tbidx1;  unsigned short tbidx2;  unsigned int imginfo;  int i;  int blkidx = 0;  int icount = 0;	//pwhsu++:20040206  mcublkn = 0;  Comp_member = 0;  //tbidx=0;tbidx0=0;tbidx1=0;tbidx2=0;  //imginfo =0  if (cinfo->comps_in_scan == 1) {        /* Noninterleaved (single-component) scan */    compptr = cinfo->cur_comp_info[0];        /* Overall image size in MCUs */    cinfo->MCUs_per_row = compptr->width_in_blocks;    cinfo->MCU_rows_in_scan = compptr->height_in_blocks;        /* For noninterleaved scan, always one block per MCU */    compptr->MCU_width = 1;    compptr->MCU_height = 1;    compptr->MCU_blocks = 1;    compptr->MCU_sample_width = DCTSIZE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美夫妻性生活| 韩国成人精品a∨在线观看| 99精品视频免费在线观看| 国产精品无人区| fc2成人免费人成在线观看播放| 国产精品三级在线观看| 99久久久国产精品免费蜜臀| 亚洲婷婷综合久久一本伊一区| 91浏览器在线视频| 日韩影院在线观看| 久久先锋影音av| aa级大片欧美| 亚洲午夜影视影院在线观看| 欧美乱熟臀69xxxxxx| 久久se精品一区二区| 国产精品麻豆久久久| 欧美性大战久久久| 久久国产日韩欧美精品| 欧美韩国日本综合| 欧美性色综合网| 国产在线播放一区二区三区| 最新不卡av在线| 欧美精品九九99久久| 国产精品伊人色| 亚洲国产一区二区三区青草影视 | 喷白浆一区二区| 成人网在线播放| 亚洲一区二区三区精品在线| 日韩一二三四区| 99re8在线精品视频免费播放| 午夜影院久久久| 欧美经典一区二区| 欧美色综合影院| 国产91精品免费| 日韩—二三区免费观看av| 亚洲国产电影在线观看| 欧美日韩免费高清一区色橹橹 | 精品美女一区二区| 91网站在线播放| 免费成人你懂的| 一区二区三区在线视频免费| 精品99999| 欧美无砖专区一中文字| 国产xxx精品视频大全| 偷拍一区二区三区四区| 国产精品久久久久桃色tv| 欧美一区二区视频在线观看2022| 成人网在线免费视频| 国内精品视频666| 亚洲成人在线观看视频| 成人免费一区二区三区视频 | 欧美欧美欧美欧美首页| 99久久精品国产毛片| 91美女片黄在线| 一区二区三区精品视频| a美女胸又www黄视频久久| 亚洲综合在线五月| 91久久线看在观草草青青 | 日韩精品国产欧美| 日韩中文字幕1| 日韩一区二区高清| 欧美日本在线播放| 96av麻豆蜜桃一区二区| 国产高清亚洲一区| 精品在线观看视频| 日韩精品免费视频人成| 亚洲影视在线观看| 中文字幕视频一区| 国产精品久久久久国产精品日日| 精品国产免费一区二区三区香蕉| 日韩久久久久久| 欧美一级日韩免费不卡| 欧美精品色综合| 欧美日韩在线不卡| 欧美日本视频在线| 4hu四虎永久在线影院成人| 欧美在线你懂的| 精品视频一区 二区 三区| 欧美在线观看视频一区二区| 色综合天天性综合| eeuss鲁一区二区三区| 99久久精品免费| 欧美在线制服丝袜| 欧美一区二区人人喊爽| 欧美一级日韩一级| 精品精品国产高清a毛片牛牛 | 国产精品美女久久久久久久网站| 久久一区二区三区四区| 久久久久国产精品人| 国产日韩av一区| 亚洲欧美怡红院| 亚洲一区精品在线| 日韩精品乱码免费| 国产毛片精品视频| 成人18视频日本| 欧美自拍偷拍午夜视频| 777奇米四色成人影色区| 欧美电影免费观看高清完整版 | 欧美日本不卡视频| 精品福利一二区| 中文字幕第一区| 亚洲激情成人在线| 奇米四色…亚洲| 成人午夜精品在线| 欧美日韩一区二区三区免费看| 91精品国产黑色紧身裤美女| 精品国一区二区三区| 自拍视频在线观看一区二区| 亚洲福中文字幕伊人影院| 久久精品国产精品亚洲综合| 成人高清av在线| 欧美日韩国产小视频在线观看| 26uuu久久综合| 亚洲私人影院在线观看| 免费成人你懂的| av中文一区二区三区| 欧美乱妇15p| 中文字幕av在线一区二区三区| 亚洲综合激情另类小说区| 麻豆精品国产传媒mv男同 | 国产精品一区一区三区| 97久久精品人人做人人爽| 欧美精品色一区二区三区| 欧美韩日一区二区三区四区| 亚州成人在线电影| 高清成人在线观看| 在线电影一区二区三区| 国产精品无圣光一区二区| 日韩av午夜在线观看| 91影院在线免费观看| 精品电影一区二区| 亚洲黄色免费电影| 成人午夜视频网站| 精品久久人人做人人爱| 亚洲综合偷拍欧美一区色| 国产精品一区二区你懂的| 欧美日韩精品电影| 亚洲日本在线观看| 国产精品18久久久久| 欧美一区中文字幕| 亚洲黄色尤物视频| 成人h动漫精品| 欧美精品一区男女天堂| 五月天一区二区| 欧美性生交片4| 亚洲人成伊人成综合网小说| 国产成人av资源| 精品成a人在线观看| 蜜臀av一区二区在线免费观看 | 久久国产精品第一页| 欧美性大战久久久久久久| 成人欧美一区二区三区白人 | 97精品电影院| 久久久91精品国产一区二区精品| 捆绑调教美女网站视频一区| 欧美日韩免费一区二区三区视频| 亚洲人一二三区| 97国产一区二区| 亚洲同性同志一二三专区| 成人精品国产福利| 国产欧美精品区一区二区三区| 精品制服美女丁香| 日韩视频免费观看高清完整版在线观看 | 国产精品免费丝袜| 国产成人精品在线看| 精品国产91乱码一区二区三区| 日本一不卡视频| 欧美一区二区三区在线观看视频| 午夜精品一区在线观看| 欧美日韩一区二区三区四区| 亚洲一区二区欧美| 欧美日韩国产欧美日美国产精品| 亚洲最新在线观看| 欧美日韩卡一卡二| 欧美a一区二区| 精品久久久久久综合日本欧美| 国产专区综合网| 国产欧美精品在线观看| www.日韩在线| 亚洲国产精品久久人人爱蜜臀| 欧美丰满一区二区免费视频| 毛片av一区二区| 日本一区二区三区四区在线视频 | 色哟哟在线观看一区二区三区| 亚洲同性gay激情无套| 色爱区综合激月婷婷| 亚洲成人av一区二区| 日韩写真欧美这视频| 国产一区二区三区免费在线观看| 欧美国产日韩亚洲一区| 9人人澡人人爽人人精品| 一区二区三区四区av| 欧美一区二区三区系列电影| 玖玖九九国产精品| 中文字幕免费不卡在线| 91性感美女视频| 青青草精品视频| 欧美国产一区视频在线观看| 一本久久综合亚洲鲁鲁五月天| 日韩在线观看一区二区|