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

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

?? jcdctmgr.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
字號:
/* * jcdctmgr.c * * Copyright (C) 1994-1996, 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 the forward-DCT management logic. * This code selects a particular DCT implementation to be used, * and it performs related housekeeping chores including coefficient * quantization. */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"#include "jdct.h"		/* Private declarations for DCT subsystem *//* Private subobject for this module */typedef struct {  struct jpeg_forward_dct pub;	/* public fields */  /* Pointer to the DCT routine actually in use */  forward_DCT_method_ptr do_dct;  /* The actual post-DCT divisors --- not identical to the quant table   * entries, because of scaling (especially for an unnormalized DCT).   * Each table is given in normal array order.   */  DCTELEM * divisors[NUM_QUANT_TBLS];#ifdef DCT_FLOAT_SUPPORTED  /* Same as above for the floating-point case. */  float_DCT_method_ptr do_float_dct;  FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];#endif} my_fdct_controller;typedef my_fdct_controller * my_fdct_ptr;/* * Initialize for a processing pass. * Verify that all referenced Q-tables are present, and set up * the divisor table for each one. * In the current implementation, DCT of all components is done during * the first pass, even if only some components will be output in the * first scan.  Hence all components should be examined here. */METHODDEF(void)start_pass_fdctmgr (j_compress_ptr cinfo){  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;  int ci, qtblno, i;  jpeg_component_info *compptr;  JQUANT_TBL * qtbl;  DCTELEM * dtbl;  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    qtblno = compptr->quant_tbl_no;    /* Make sure specified quantization table is present */    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||	cinfo->quant_tbl_ptrs[qtblno] == NULL)      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);    qtbl = cinfo->quant_tbl_ptrs[qtblno];    /* Compute divisors for this quant table */    /* We may do this more than once for same table, but it's not a big deal */    switch (cinfo->dct_method) {#ifdef DCT_ISLOW_SUPPORTED    case JDCT_ISLOW:      /* For LL&M IDCT method, divisors are equal to raw quantization       * coefficients multiplied by 8 (to counteract scaling).       */      if (fdct->divisors[qtblno] == NULL) {	fdct->divisors[qtblno] = (DCTELEM *)	  (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,				      DCTSIZE2 * SIZEOF(DCTELEM));      }      dtbl = fdct->divisors[qtblno];      for (i = 0; i < DCTSIZE2; i++) {	dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;      }      break;#endif#ifdef DCT_IFAST_SUPPORTED    case JDCT_IFAST:      {	/* For AA&N IDCT method, divisors are equal to quantization	 * coefficients scaled by scalefactor[row]*scalefactor[col], where	 *   scalefactor[0] = 1	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7	 * We apply a further scale factor of 8.	 */#define CONST_BITS 14	static const INT16 aanscales[DCTSIZE2] = {	  /* precomputed values scaled up by 14 bits */	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247	};	SHIFT_TEMPS	if (fdct->divisors[qtblno] == NULL) {	  fdct->divisors[qtblno] = (DCTELEM *)	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,					DCTSIZE2 * SIZEOF(DCTELEM));	}	dtbl = fdct->divisors[qtblno];	for (i = 0; i < DCTSIZE2; i++) {	  dtbl[i] = (DCTELEM)	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],				  (INT32) aanscales[i]),		    CONST_BITS-3);	}      }      break;#endif#ifdef DCT_FLOAT_SUPPORTED    case JDCT_FLOAT:      {	/* For float AA&N IDCT method, divisors are equal to quantization	 * coefficients scaled by scalefactor[row]*scalefactor[col], where	 *   scalefactor[0] = 1	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7	 * We apply a further scale factor of 8.	 * What's actually stored is 1/divisor so that the inner loop can	 * use a multiplication rather than a division.	 */	FAST_FLOAT * fdtbl;	int row, col;	static const double aanscalefactor[DCTSIZE] = {	  1.0, 1.387039845, 1.306562965, 1.175875602,	  1.0, 0.785694958, 0.541196100, 0.275899379	};	if (fdct->float_divisors[qtblno] == NULL) {	  fdct->float_divisors[qtblno] = (FAST_FLOAT *)	    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,					DCTSIZE2 * SIZEOF(FAST_FLOAT));	}	fdtbl = fdct->float_divisors[qtblno];	i = 0;	for (row = 0; row < DCTSIZE; row++) {	  for (col = 0; col < DCTSIZE; col++) {	    fdtbl[i] = (FAST_FLOAT)	      (1.0 / (((double) qtbl->quantval[i] *		       aanscalefactor[row] * aanscalefactor[col] * 8.0)));	    i++;	  }	}      }      break;#endif    default:      ERREXIT(cinfo, JERR_NOT_COMPILED);      break;    }  }}/* * Perform forward DCT on one or more blocks of a component. * * The input samples are taken from the sample_data[] array starting at * position start_row/start_col, and moving to the right for any additional * blocks. The quantized coefficients are returned in coef_blocks[]. */METHODDEF(void)forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,	     JSAMPARRAY sample_data, JBLOCKROW coef_blocks,	     JDIMENSION start_row, JDIMENSION start_col,	     JDIMENSION num_blocks)/* This version is used for integer DCT implementations. */{  /* This routine is heavily used, so it's worth coding it tightly. */  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;  forward_DCT_method_ptr do_dct = fdct->do_dct;  DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];  DCTELEM workspace[DCTSIZE2];	/* work area for FDCT subroutine */  JDIMENSION bi;  sample_data += start_row;	/* fold in the vertical offset once */  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {    /* Load data into workspace, applying unsigned->signed conversion */    { register DCTELEM *workspaceptr;      register JSAMPROW elemptr;      register int elemr;      workspaceptr = workspace;      for (elemr = 0; elemr < DCTSIZE; elemr++) {	elemptr = sample_data[elemr] + start_col;#if DCTSIZE == 8		/* unroll the inner loop */	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	*workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;#else	{ register int elemc;	  for (elemc = DCTSIZE; elemc > 0; elemc--) {	    *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;	  }	}#endif      }    }    /* Perform the DCT */    (*do_dct) (workspace);    /* Quantize/descale the coefficients, and store into coef_blocks[] */    { register DCTELEM temp, qval;      register int i;      register JCOEFPTR output_ptr = coef_blocks[bi];      for (i = 0; i < DCTSIZE2; i++) {	qval = divisors[i];	temp = workspace[i];	/* Divide the coefficient value by qval, ensuring proper rounding.	 * Since C does not specify the direction of rounding for negative	 * quotients, we have to force the dividend positive for portability.	 *	 * In most files, at least half of the output values will be zero	 * (at default quantization settings, more like three-quarters...)	 * so we should ensure that this case is fast.  On many machines,	 * a comparison is enough cheaper than a divide to make a special test	 * a win.  Since both inputs will be nonnegative, we need only test	 * for a < b to discover whether a/b is 0.	 * If your machine's division is fast enough, define FAST_DIVIDE.	 */#ifdef FAST_DIVIDE#define DIVIDE_BY(a,b)	a /= b#else#define DIVIDE_BY(a,b)	if (a >= b) a /= b; else a = 0#endif	if (temp < 0) {	  temp = -temp;	  temp += qval>>1;	/* for rounding */	  DIVIDE_BY(temp, qval);	  temp = -temp;	} else {	  temp += qval>>1;	/* for rounding */	  DIVIDE_BY(temp, qval);	}	output_ptr[i] = (JCOEF) temp;      }    }  }}#ifdef DCT_FLOAT_SUPPORTEDMETHODDEF(void)forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,		   JSAMPARRAY sample_data, JBLOCKROW coef_blocks,		   JDIMENSION start_row, JDIMENSION start_col,		   JDIMENSION num_blocks)/* This version is used for floating-point DCT implementations. */{  /* This routine is heavily used, so it's worth coding it tightly. */  my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;  float_DCT_method_ptr do_dct = fdct->do_float_dct;  FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];  FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */  JDIMENSION bi;  sample_data += start_row;	/* fold in the vertical offset once */  for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {    /* Load data into workspace, applying unsigned->signed conversion */    { register FAST_FLOAT *workspaceptr;      register JSAMPROW elemptr;      register int elemr;      workspaceptr = workspace;      for (elemr = 0; elemr < DCTSIZE; elemr++) {	elemptr = sample_data[elemr] + start_col;#if DCTSIZE == 8		/* unroll the inner loop */	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	*workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);#else	{ register int elemc;	  for (elemc = DCTSIZE; elemc > 0; elemc--) {	    *workspaceptr++ = (FAST_FLOAT)	      (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);	  }	}#endif      }    }    /* Perform the DCT */    (*do_dct) (workspace);    /* Quantize/descale the coefficients, and store into coef_blocks[] */    { register FAST_FLOAT temp;      register int i;      register JCOEFPTR output_ptr = coef_blocks[bi];      for (i = 0; i < DCTSIZE2; i++) {	/* Apply the quantization and scaling factor */	temp = workspace[i] * divisors[i];	/* Round to nearest integer.	 * Since C does not specify the direction of rounding for negative	 * quotients, we have to force the dividend positive for portability.	 * The maximum coefficient size is +-16K (for 12-bit data), so this	 * code should work for either 16-bit or 32-bit ints.	 */	output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);      }    }  }}#endif /* DCT_FLOAT_SUPPORTED *//* * Initialize FDCT manager. */GLOBAL(void)jinit_forward_dct (j_compress_ptr cinfo){  my_fdct_ptr fdct;  int i;  fdct = (my_fdct_ptr)    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,				SIZEOF(my_fdct_controller));  cinfo->fdct = (struct jpeg_forward_dct *) fdct;  fdct->pub.start_pass = start_pass_fdctmgr;  switch (cinfo->dct_method) {#ifdef DCT_ISLOW_SUPPORTED  case JDCT_ISLOW:    fdct->pub.forward_DCT = forward_DCT;    fdct->do_dct = jpeg_fdct_islow;    break;#endif#ifdef DCT_IFAST_SUPPORTED  case JDCT_IFAST:    fdct->pub.forward_DCT = forward_DCT;    fdct->do_dct = jpeg_fdct_ifast;    break;#endif#ifdef DCT_FLOAT_SUPPORTED  case JDCT_FLOAT:    fdct->pub.forward_DCT = forward_DCT_float;    fdct->do_float_dct = jpeg_fdct_float;    break;#endif  default:    ERREXIT(cinfo, JERR_NOT_COMPILED);    break;  }  /* Mark divisor tables unallocated */  for (i = 0; i < NUM_QUANT_TBLS; i++) {    fdct->divisors[i] = NULL;#ifdef DCT_FLOAT_SUPPORTED    fdct->float_divisors[i] = NULL;#endif  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美一区二区视频| 欧美乱妇15p| 色婷婷综合视频在线观看| 欧美三级午夜理伦三级中视频| 欧美日韩高清一区二区三区| 久久丝袜美腿综合| 亚洲精品美国一| 蜜臀av一区二区| 91免费看视频| 亚洲精品一区二区三区福利| 亚洲欧美国产三级| 国内精品第一页| 精品视频在线免费| 国产精品高潮呻吟| 丝袜亚洲另类欧美| 成人av资源在线| 久久这里只有精品首页| 亚洲成av人片在线| 92国产精品观看| 国产精品久久久久影院| 另类小说欧美激情| 欧美久久一二三四区| 亚洲欧洲日韩av| 粉嫩13p一区二区三区| 久久久久久久久久美女| 美女视频一区在线观看| 欧美婷婷六月丁香综合色| 亚洲人精品一区| 丁香婷婷深情五月亚洲| 欧美一区二区三区婷婷月色| 亚洲午夜激情av| 欧美日韩精品欧美日韩精品一 | 色综合天天天天做夜夜夜夜做| 欧美国产成人在线| 国产网站一区二区| 91免费国产在线| 国产在线观看一区二区| 欧美日本韩国一区| 亚洲人成网站影音先锋播放| 国产一区二区三区电影在线观看| 欧美精品电影在线播放| 亚洲综合图片区| 欧美亚洲图片小说| 亚洲国产综合色| 久久久久久麻豆| 91久久精品一区二区三区| 亚瑟在线精品视频| 欧美高清dvd| 成人性生交大片免费看中文 | 国产日产欧产精品推荐色| 日韩一区二区免费视频| 亚洲综合成人在线| 日韩欧美中文字幕精品| 午夜精品福利久久久| 国产精品久久久久影院| 久久久久高清精品| 欧美一区二区在线免费播放 | 99久久久免费精品国产一区二区| 中文字幕一区二区在线播放| 日本久久精品电影| 蜜桃视频第一区免费观看| 国产精品日韩精品欧美在线| 欧美日韩黄色一区二区| 成人性视频网站| 六月丁香综合在线视频| 亚洲精品高清在线观看| 久久综合狠狠综合久久综合88| 欧美在线视频你懂得| 一区二区三区在线视频播放| 亚洲精品一区在线观看| 在线看不卡av| 成人亚洲一区二区一| 韩国一区二区在线观看| 亚洲成人激情社区| 亚洲综合999| 亚洲欧美偷拍卡通变态| 精品国产免费一区二区三区香蕉| 欧美综合天天夜夜久久| 高清不卡一区二区在线| 免费在线观看视频一区| 亚洲在线观看免费视频| 亚洲少妇最新在线视频| 国产精品午夜电影| 国产精品美女视频| 综合中文字幕亚洲| 久久久蜜桃精品| 国产精品全国免费观看高清| 日本一区二区三区四区在线视频| 久久久久97国产精华液好用吗| 日韩欧美精品在线视频| 久久久亚洲国产美女国产盗摄| 精品日产卡一卡二卡麻豆| 久久一日本道色综合| 欧美乱妇23p| 欧美日韩免费一区二区三区| 911精品国产一区二区在线| 欧美乱熟臀69xxxxxx| 欧美精品一区二区三区四区| 精品国产三级a在线观看| 国产精品久久久久久久浪潮网站 | 国产精品一区二区你懂的| 成人一区二区三区在线观看| 99国产精品久久久久久久久久久| 色综合天天做天天爱| 欧美另类久久久品| 日韩亚洲欧美一区二区三区| 中文字幕免费在线观看视频一区| 亚洲天堂av一区| 久久99精品久久久久久| 精品一区二区三区免费观看| 色综合久久综合网97色综合 | 亚洲美女在线国产| 国内精品久久久久影院色| 色婷婷综合视频在线观看| 精品av综合导航| 亚洲综合免费观看高清在线观看| 国内一区二区在线| 欧美乱妇20p| 日韩中文字幕区一区有砖一区 | 亚洲精品少妇30p| 国产成人免费视频一区| 精品少妇一区二区| 美国十次了思思久久精品导航| 欧美日韩国产成人在线91| 亚洲另类春色校园小说| 99久久er热在这里只有精品15| 欧美成人在线直播| 又紧又大又爽精品一区二区| 青草国产精品久久久久久| 欧美精品第1页| 蜜臀精品一区二区三区在线观看| 欧美日韩精品专区| 亚洲午夜免费电影| 欧美伦理电影网| 欧美a级一区二区| 亚洲精品在线网站| 国产精品一级在线| 亚洲图片欧美激情| 欧美日韩久久久一区| 狠狠色狠狠色综合系列| 久久婷婷国产综合国色天香| 福利一区二区在线| 一个色综合av| 91国产丝袜在线播放| 日本不卡一区二区三区| 久久久久久久久蜜桃| 欧美日韩在线播放三区| 国产精品538一区二区在线| 亚洲欧洲国产日本综合| 欧美精品日韩综合在线| 粉嫩蜜臀av国产精品网站| 亚洲电影在线播放| 亚洲国产成人自拍| 欧美日韩精品一区视频| 99久久精品免费精品国产| 奇米影视一区二区三区| 中文字幕在线视频一区| 26uuu精品一区二区| 欧美另类videos死尸| 99精品国产视频| 成人综合婷婷国产精品久久 | 欧美性一二三区| 成人av片在线观看| 国产高清不卡二三区| 午夜久久电影网| 亚洲国产中文字幕| 亚洲免费电影在线| 国产精品另类一区| 国产片一区二区三区| 精品国产亚洲一区二区三区在线观看| 免费高清在线视频一区·| 亚洲视频网在线直播| 亚洲婷婷国产精品电影人久久| 中文幕一区二区三区久久蜜桃| www亚洲一区| 久久久91精品国产一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 欧美一级二级三级蜜桃| 日韩欧美一区二区久久婷婷| 91精品午夜视频| 2023国产精品| 国产精品久久久久影视| 亚洲免费在线电影| 夜夜操天天操亚洲| 天堂av在线一区| 国产91色综合久久免费分享| 成人美女视频在线观看18| 一本高清dvd不卡在线观看| 在线精品国精品国产尤物884a| 欧美裸体一区二区三区| 久久久高清一区二区三区| 亚洲欧美日本韩国| 蜜桃视频在线一区| 97se狠狠狠综合亚洲狠狠| 欧美片在线播放| 国产日韩欧美在线一区| 亚洲男女一区二区三区| 极品少妇xxxx偷拍精品少妇| yourporn久久国产精品| 欧美一二三区在线观看|