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

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

?? jdmaster.c

?? 基于Linux的ffmepg decoder
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * jdmaster.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 decompressor. * These routines are concerned with selecting the modules to be executed * and with determining the number of passes and the work to be done in each * pass. */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"/* Private state */typedef struct {  struct jpeg_decomp_master pub; /* public fields */  int pass_number;		/* # of passes completed */  boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */  /* Saved references to initialized quantizer modules,   * in case we need to switch modes.   */  struct jpeg_color_quantizer * quantizer_1pass;  struct jpeg_color_quantizer * quantizer_2pass;} my_decomp_master;typedef my_decomp_master * my_master_ptr;/* * Determine whether merged upsample/color conversion should be used. * CRUCIAL: this must match the actual capabilities of jdmerge.c! */LOCAL(boolean)use_merged_upsample (j_decompress_ptr cinfo){#ifdef UPSAMPLE_MERGING_SUPPORTED  /* Merging is the equivalent of plain box-filter upsampling */  if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling)    return FALSE;  /* jdmerge.c only supports YCC=>RGB color conversion */  if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 ||      cinfo->out_color_space != JCS_RGB ||      cinfo->out_color_components != RGB_PIXELSIZE)    return FALSE;  /* and it only handles 2h1v or 2h2v sampling ratios */  if (cinfo->comp_info[0].h_samp_factor != 2 ||      cinfo->comp_info[1].h_samp_factor != 1 ||      cinfo->comp_info[2].h_samp_factor != 1 ||      cinfo->comp_info[0].v_samp_factor >  2 ||      cinfo->comp_info[1].v_samp_factor != 1 ||      cinfo->comp_info[2].v_samp_factor != 1)    return FALSE;  /* furthermore, it doesn't work if we've scaled the IDCTs differently */  if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size ||      cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size ||      cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size)    return FALSE;  /* ??? also need to test for upsample-time rescaling, when & if supported */  return TRUE;			/* by golly, it'll work... */#else  return FALSE;#endif}/* * Compute output image dimensions and related values. * NOTE: this is exported for possible use by application. * Hence it mustn't do anything that can't be done twice. * Also note that it may be called before the master module is initialized! */GLOBAL(void)jpeg_calc_output_dimensions (j_decompress_ptr cinfo)/* Do computations that are needed before master selection phase */{#ifdef IDCT_SCALING_SUPPORTED  int ci;  jpeg_component_info *compptr;#endif  /* Prevent application from calling me at wrong times */  if (cinfo->global_state != DSTATE_READY)    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);#ifdef IDCT_SCALING_SUPPORTED  /* Compute actual output image dimensions and DCT scaling choices. */  if (cinfo->scale_num * 8 <= cinfo->scale_denom) {    /* Provide 1/8 scaling */    cinfo->output_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width, 8L);    cinfo->output_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height, 8L);    cinfo->min_DCT_scaled_size = 1;  } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) {    /* Provide 1/4 scaling */    cinfo->output_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width, 4L);    cinfo->output_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height, 4L);    cinfo->min_DCT_scaled_size = 2;  } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) {    /* Provide 1/2 scaling */    cinfo->output_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width, 2L);    cinfo->output_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height, 2L);    cinfo->min_DCT_scaled_size = 4;  } else {    /* Provide 1/1 scaling */    cinfo->output_width = cinfo->image_width;    cinfo->output_height = cinfo->image_height;    cinfo->min_DCT_scaled_size = DCTSIZE;  }  /* In selecting the actual DCT scaling for each component, we try to   * scale up the chroma components via IDCT scaling rather than upsampling.   * This saves time if the upsampler gets to use 1:1 scaling.   * Note this code assumes that the supported DCT scalings are powers of 2.   */  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    int ssize = cinfo->min_DCT_scaled_size;    while (ssize < DCTSIZE &&	   (compptr->h_samp_factor * ssize * 2 <=	    cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) &&	   (compptr->v_samp_factor * ssize * 2 <=	    cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) {      ssize = ssize * 2;    }    compptr->DCT_scaled_size = ssize;  }  /* Recompute downsampled dimensions of components;   * application needs to know these if using raw downsampled data.   */  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    /* Size in samples, after IDCT scaling */    compptr->downsampled_width = (JDIMENSION)      jdiv_round_up((long) cinfo->image_width *		    (long) (compptr->h_samp_factor * compptr->DCT_scaled_size),		    (long) (cinfo->max_h_samp_factor * DCTSIZE));    compptr->downsampled_height = (JDIMENSION)      jdiv_round_up((long) cinfo->image_height *		    (long) (compptr->v_samp_factor * compptr->DCT_scaled_size),		    (long) (cinfo->max_v_samp_factor * DCTSIZE));  }#else /* !IDCT_SCALING_SUPPORTED */  /* Hardwire it to "no scaling" */  cinfo->output_width = cinfo->image_width;  cinfo->output_height = cinfo->image_height;  /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE,   * and has computed unscaled downsampled_width and downsampled_height.   */#endif /* IDCT_SCALING_SUPPORTED */  /* Report number of components in selected colorspace. */  /* Probably this should be in the color conversion module... */  switch (cinfo->out_color_space) {  case JCS_GRAYSCALE:    cinfo->out_color_components = 1;    break;  case JCS_RGB:#if RGB_PIXELSIZE != 3    cinfo->out_color_components = RGB_PIXELSIZE;    break;#endif /* else share code with YCbCr */  case JCS_YCbCr:    cinfo->out_color_components = 3;    break;  case JCS_CMYK:  case JCS_YCCK:    cinfo->out_color_components = 4;    break;  default:			/* else must be same colorspace as in file */    cinfo->out_color_components = cinfo->num_components;    break;  }  cinfo->output_components = (cinfo->quantize_colors ? 1 :			      cinfo->out_color_components);  /* See if upsampler will want to emit more than one row at a time */  if (use_merged_upsample(cinfo))    cinfo->rec_outbuf_height = cinfo->max_v_samp_factor;  else    cinfo->rec_outbuf_height = 1;}/* * Several decompression processes need to range-limit values to the range * 0..MAXJSAMPLE; the input value may fall somewhat outside this range * due to noise introduced by quantization, roundoff error, etc.  These * processes are inner loops and need to be as fast as possible.  On most * machines, particularly CPUs with pipelines or instruction prefetch, * a (subscript-check-less) C table lookup *		x = sample_range_limit[x]; * is faster than explicit tests *		if (x < 0)  x = 0; *		else if (x > MAXJSAMPLE)  x = MAXJSAMPLE; * These processes all use a common table prepared by the routine below. * * For most steps we can mathematically guarantee that the initial value * of x is within MAXJSAMPLE+1 of the legal range, so a table running from * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient.  But for the initial * limiting step (just after the IDCT), a wildly out-of-range value is  * possible if the input data is corrupt.  To avoid any chance of indexing * off the end of memory and getting a bad-pointer trap, we perform the * post-IDCT limiting thus: *		x = range_limit[x & MASK]; * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit * samples.  Under normal circumstances this is more than enough range and * a correct output will be generated; with bogus input data the mask will * cause wraparound, and we will safely generate a bogus-but-in-range output. * For the post-IDCT step, we want to convert the data from signed to unsigned * representation by adding CENTERJSAMPLE at the same time that we limit it. * So the post-IDCT limiting table ends up looking like this: *   CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, *   MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), *   0          (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), *   0,1,...,CENTERJSAMPLE-1 * Negative inputs select values from the upper half of the table after * masking. * * We can save some space by overlapping the start of the post-IDCT table * with the simpler range limiting table.  The post-IDCT table begins at * sample_range_limit + CENTERJSAMPLE. * * Note that the table is allocated in near data space on PCs; it's small * enough and used often enough to justify this. */LOCAL(void)prepare_range_limit_table (j_decompress_ptr cinfo)/* Allocate and fill in the sample_range_limit table */{  JSAMPLE * table;  int i;  table = (JSAMPLE *)    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,		(5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE));  table += (MAXJSAMPLE+1);	/* allow negative subscripts of simple table */  cinfo->sample_range_limit = table;  /* First segment of "simple" table: limit[x] = 0 for x < 0 */  MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE));  /* Main part of "simple" table: limit[x] = x */  for (i = 0; i <= MAXJSAMPLE; i++)    table[i] = (JSAMPLE) i;  table += CENTERJSAMPLE;	/* Point to where post-IDCT table starts */  /* End of simple table, rest of first half of post-IDCT table */  for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++)    table[i] = MAXJSAMPLE;  /* Second half of post-IDCT table */  MEMZERO(table + (2 * (MAXJSAMPLE+1)),	  (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE));  MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE),	  cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE));}/* * Master selection of decompression modules. * This is done once at jpeg_start_decompress time.  We determine * which modules will be used and give them appropriate initialization calls.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜嗨av一区二区三区| 国产激情一区二区三区四区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲精品免费电影| 蜜桃精品视频在线观看| 波多野结衣中文一区| 欧美精品在线视频| 国产精品成人在线观看| 极品销魂美女一区二区三区| 欧美日韩亚洲高清一区二区| 亚洲aⅴ怡春院| 99久久婷婷国产精品综合| 久久嫩草精品久久久精品| 一区二区三区国产| 99久久99久久精品免费看蜜桃| 日韩欧美一区二区免费| 亚洲一区二区在线播放相泽| 波多野结衣在线aⅴ中文字幕不卡| 日韩欧美国产系列| 日日夜夜一区二区| 91国产精品成人| 亚洲天堂av老司机| av爱爱亚洲一区| 国产欧美日韩视频在线观看| 久久精品国产精品亚洲红杏| 欧美久久久久久蜜桃| 亚洲宅男天堂在线观看无病毒| 国产成人精品亚洲日本在线桃色 | 久久国产精品99久久久久久老狼 | 色8久久人人97超碰香蕉987| 国产精品视频一二三区| 国产麻豆成人传媒免费观看| 欧美videossexotv100| 日本午夜一本久久久综合| 欧美日韩久久久久久| 亚洲一卡二卡三卡四卡五卡| 色成人在线视频| 亚洲狠狠丁香婷婷综合久久久| www.亚洲色图.com| 亚洲欧洲精品一区二区精品久久久 | 精品亚洲porn| 欧美大胆一级视频| 国产一区视频在线看| 久久日一线二线三线suv| 激情综合色丁香一区二区| 欧美精品一区视频| 国产精品99久久久久久宅男| 国产欧美精品一区二区色综合朱莉 | 在线播放视频一区| 久久精品国产99国产精品| 精品国产不卡一区二区三区| 国产最新精品免费| 日本一区免费视频| 一本大道av伊人久久综合| 亚洲精品视频在线看| 欧美日韩免费一区二区三区| 日韩电影在线看| 26uuu色噜噜精品一区二区| 国产一区三区三区| 亚洲欧洲日韩女同| 欧美日韩精品一区二区三区四区| 蜜臀国产一区二区三区在线播放| 精品福利av导航| 成人黄色免费短视频| 亚洲成人激情综合网| 欧美精品一区二区不卡| 精品国产不卡一区二区三区| 国产精品夜夜嗨| 一区二区免费在线播放| 日韩免费看的电影| 色综合色综合色综合| 日韩高清电影一区| 国产精品美日韩| 欧美日韩一区二区在线观看 | 午夜影院久久久| 精品av久久707| 一本大道综合伊人精品热热| 老司机免费视频一区二区| 国产精品网友自拍| 欧美一级欧美三级在线观看 | 麻豆精品视频在线观看视频| 国产精品国产自产拍在线| 在线综合视频播放| av一区二区三区在线| 麻豆精品视频在线观看免费| 一区二区三区四区乱视频| www久久精品| 欧美精品在线一区二区三区| 成人av在线电影| 久久精品999| 亚洲综合色丁香婷婷六月图片| 久久久一区二区| 欧美日韩久久不卡| 91成人在线精品| 国产suv一区二区三区88区| 蜜臀精品久久久久久蜜臀| 亚洲精品免费看| 国产精品国产三级国产aⅴ中文| 亚洲自拍偷拍欧美| 国产精品你懂的在线欣赏| 欧美成人免费网站| 欧美精品99久久久**| 91一区一区三区| 不卡在线视频中文字幕| 国产乱码一区二区三区| 免费高清不卡av| 日日夜夜免费精品视频| 亚洲国产综合色| 亚洲综合视频网| 亚洲猫色日本管| 亚洲色大成网站www久久九九| 国产蜜臀av在线一区二区三区| 久久久不卡网国产精品一区| 日韩精品中午字幕| 日韩美女在线视频| 日韩一二三四区| 日韩精品一区二区三区在线| 777xxx欧美| 日韩免费成人网| 久久午夜电影网| 久久久99免费| 国产精品的网站| 亚洲欧美一区二区久久| 亚洲免费在线观看| 亚洲一区二区在线观看视频| 亚洲国产成人高清精品| 亚洲综合激情另类小说区| 亚洲资源中文字幕| 亚洲成av人影院| 人人狠狠综合久久亚洲| 精品无人码麻豆乱码1区2区| 激情深爱一区二区| 高潮精品一区videoshd| 91亚洲男人天堂| 欧美视频一区在线观看| 3d成人动漫网站| 久久亚洲欧美国产精品乐播| 久久久精品影视| 亚洲欧美日韩国产综合| 午夜精品一区二区三区电影天堂| 日日夜夜免费精品视频| 激情综合网av| 99v久久综合狠狠综合久久| 欧美在线视频日韩| 日韩三级视频在线观看| 久久精品人人做| 一区二区三区在线播| 美国av一区二区| 99精品黄色片免费大全| 欧美二区在线观看| 国产色婷婷亚洲99精品小说| 国产宾馆实践打屁股91| 91日韩一区二区三区| 欧美理论电影在线| 国产欧美一区二区三区鸳鸯浴| 亚洲精品一二三| 国模套图日韩精品一区二区| 91亚洲国产成人精品一区二区三| 欧美一区二区三区视频| 中文字幕中文字幕一区| 免费视频一区二区| 91亚洲国产成人精品一区二区三| 日韩一区二区视频在线观看| 国产精品久久久久久亚洲毛片| 亚洲国产欧美日韩另类综合| 国产成人鲁色资源国产91色综 | 日韩一区二区三区在线| 中文一区一区三区高中清不卡| 亚洲bt欧美bt精品| www.亚洲国产| 欧美精品一区二区在线观看| 亚洲在线成人精品| eeuss鲁片一区二区三区| 日韩美一区二区三区| 国产精品伦一区二区三级视频| 国产成人亚洲精品青草天美| 色婷婷久久久久swag精品| 中文字幕在线不卡视频| 日本不卡的三区四区五区| 成人性视频免费网站| 国产日韩精品一区二区浪潮av| 午夜精品成人在线| 色综合天天综合在线视频| 日本韩国欧美三级| 久久久久久久久蜜桃| 七七婷婷婷婷精品国产| 欧美日韩久久久| 国产乱人伦偷精品视频不卡| 91在线免费视频观看| 精品国产乱码久久久久久免费 | 国产欧美精品国产国产专区| 美女视频免费一区| 欧美精品久久99久久在免费线| 亚洲日韩欧美一区二区在线| 成人在线一区二区三区| 精品成人一区二区三区四区| 青椒成人免费视频| 日韩欧美亚洲国产精品字幕久久久| 亚洲国产美国国产综合一区二区| 在线观看欧美精品|