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

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

?? jcsample.c

?? Trolltech公司發布的基于C++圖形開發環境
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * jcsample.c * * Copyright (C) 1991-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 downsampling routines. * * Downsampling input data is counted in "row groups".  A row group * is defined to be max_v_samp_factor pixel rows of each component, * from which the downsampler produces v_samp_factor sample rows. * A single row group is processed in each call to the downsampler module. * * The downsampler is responsible for edge-expansion of its output data * to fill an integral number of DCT blocks horizontally.  The source buffer * may be modified if it is helpful for this purpose (the source buffer is * allocated wide enough to correspond to the desired output width). * The caller (the prep controller) is responsible for vertical padding. * * The downsampler may request "context rows" by setting need_context_rows * during startup.  In this case, the input arrays will contain at least * one row group's worth of pixels above and below the passed-in data; * the caller will create dummy rows at image top and bottom by replicating * the first or last real pixel row. * * An excellent reference for image resampling is *   Digital Image Warping, George Wolberg, 1990. *   Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. * * The downsampling algorithm used here is a simple average of the source * pixels covered by the output pixel.  The hi-falutin sampling literature * refers to this as a "box filter".  In general the characteristics of a box * filter are not very good, but for the specific cases we normally use (1:1 * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not * nearly so bad.  If you intend to use other sampling ratios, you'd be well * advised to improve this code. * * A simple input-smoothing capability is provided.  This is mainly intended * for cleaning up color-dithered GIF input files (if you find it inadequate, * we suggest using an external filtering program such as pnmconvol).  When * enabled, each input pixel P is replaced by a weighted sum of itself and its * eight neighbors.  P's weight is 1-8*SF and each neighbor's weight is SF, * where SF = (smoothing_factor / 1024). * Currently, smoothing is only supported for 2h2v sampling factors. */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"/* Pointer to routine to downsample a single component */typedef JMETHOD(void, downsample1_ptr,		(j_compress_ptr cinfo, jpeg_component_info * compptr,		 JSAMPARRAY input_data, JSAMPARRAY output_data));/* Private subobject */typedef struct {  struct jpeg_downsampler pub;	/* public fields */  /* Downsampling method pointers, one per component */  downsample1_ptr methods[MAX_COMPONENTS];} my_downsampler;typedef my_downsampler * my_downsample_ptr;/* * Initialize for a downsampling pass. */METHODDEF(void)start_pass_downsample (j_compress_ptr cinfo){  /* no work for now */}/* * Expand a component horizontally from width input_cols to width output_cols, * by duplicating the rightmost samples. */LOCAL(void)expand_right_edge (JSAMPARRAY image_data, int num_rows,		   JDIMENSION input_cols, JDIMENSION output_cols){  register JSAMPROW ptr;  register JSAMPLE pixval;  register int count;  int row;  int numcols = (int) (output_cols - input_cols);  if (numcols > 0) {    for (row = 0; row < num_rows; row++) {      ptr = image_data[row] + input_cols;      pixval = ptr[-1];		/* don't need GETJSAMPLE() here */      for (count = numcols; count > 0; count--)	*ptr++ = pixval;    }  }}/* * Do downsampling for a whole row group (all components). * * In this version we simply downsample each component independently. */METHODDEF(void)sep_downsample (j_compress_ptr cinfo,		JSAMPIMAGE input_buf, JDIMENSION in_row_index,		JSAMPIMAGE output_buf, JDIMENSION out_row_group_index){  my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample;  int ci;  jpeg_component_info * compptr;  JSAMPARRAY in_ptr, out_ptr;  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;       ci++, compptr++) {    in_ptr = input_buf[ci] + in_row_index;    out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor);    (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr);  }}/* * Downsample pixel values of a single component. * One row group is processed per call. * This version handles arbitrary integral sampling ratios, without smoothing. * Note that this version is not actually used for customary sampling ratios. */METHODDEF(void)int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,		JSAMPARRAY input_data, JSAMPARRAY output_data){  int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v;  JDIMENSION outcol, outcol_h;	/* outcol_h == outcol*h_expand */  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;  JSAMPROW inptr, outptr;  INT32 outvalue;  h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor;  v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor;  numpix = h_expand * v_expand;  numpix2 = numpix/2;  /* Expand input data enough to let all the output samples be generated   * by the standard loop.  Special-casing padded output would be more   * efficient.   */  expand_right_edge(input_data, cinfo->max_v_samp_factor,		    cinfo->image_width, output_cols * h_expand);  inrow = 0;  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {    outptr = output_data[outrow];    for (outcol = 0, outcol_h = 0; outcol < output_cols;	 outcol++, outcol_h += h_expand) {      outvalue = 0;      for (v = 0; v < v_expand; v++) {	inptr = input_data[inrow+v] + outcol_h;	for (h = 0; h < h_expand; h++) {	  outvalue += (INT32) GETJSAMPLE(*inptr++);	}      }      *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix);    }    inrow += v_expand;  }}/* * Downsample pixel values of a single component. * This version handles the special case of a full-size component, * without smoothing. */METHODDEF(void)fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,		     JSAMPARRAY input_data, JSAMPARRAY output_data){  /* Copy the data */  jcopy_sample_rows(input_data, 0, output_data, 0,		    cinfo->max_v_samp_factor, cinfo->image_width);  /* Edge-expand */  expand_right_edge(output_data, cinfo->max_v_samp_factor,		    cinfo->image_width, compptr->width_in_blocks * DCTSIZE);}/* * Downsample pixel values of a single component. * This version handles the common case of 2:1 horizontal and 1:1 vertical, * without smoothing. * * A note about the "bias" calculations: when rounding fractional values to * integer, we do not want to always round 0.5 up to the next integer. * If we did that, we'd introduce a noticeable bias towards larger values. * Instead, this code is arranged so that 0.5 will be rounded up or down at * alternate pixel locations (a simple ordered dither pattern). */METHODDEF(void)h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,		 JSAMPARRAY input_data, JSAMPARRAY output_data){  int outrow;  JDIMENSION outcol;  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;  register JSAMPROW inptr, outptr;  register int bias;  /* Expand input data enough to let all the output samples be generated   * by the standard loop.  Special-casing padded output would be more   * efficient.   */  expand_right_edge(input_data, cinfo->max_v_samp_factor,		    cinfo->image_width, output_cols * 2);  for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) {    outptr = output_data[outrow];    inptr = input_data[outrow];    bias = 0;			/* bias = 0,1,0,1,... for successive samples */    for (outcol = 0; outcol < output_cols; outcol++) {      *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1])			      + bias) >> 1);      bias ^= 1;		/* 0=>1, 1=>0 */      inptr += 2;    }  }}/* * Downsample pixel values of a single component. * This version handles the standard case of 2:1 horizontal and 2:1 vertical, * without smoothing. */METHODDEF(void)h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,		 JSAMPARRAY input_data, JSAMPARRAY output_data){  int inrow, outrow;  JDIMENSION outcol;  JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE;  register JSAMPROW inptr0, inptr1, outptr;  register int bias;  /* Expand input data enough to let all the output samples be generated   * by the standard loop.  Special-casing padded output would be more   * efficient.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲第一| 狠狠色丁香久久婷婷综合_中 | 91精品国产综合久久久久久久| 不卡av在线免费观看| 成人黄色在线视频| 暴力调教一区二区三区| 国产91丝袜在线18| 国产69精品久久99不卡| eeuss影院一区二区三区| caoporm超碰国产精品| 99久久伊人网影院| 色诱亚洲精品久久久久久| 色综合久久中文字幕| 欧美自拍丝袜亚洲| 欧美精品高清视频| 欧美精品18+| 亚洲精品一区二区三区香蕉| 日本一区二区免费在线观看视频 | 1024国产精品| 亚洲人成亚洲人成在线观看图片| 日韩一区二区精品葵司在线| 丁香桃色午夜亚洲一区二区三区| 久久久久久麻豆| 国产亚洲短视频| 亚洲男人电影天堂| 午夜电影一区二区| 久久精品久久99精品久久| 国产一区二区三区最好精华液| av一区二区三区在线| 欧美中文字幕亚洲一区二区va在线| 欧美主播一区二区三区| 精品成人私密视频| 综合av第一页| 精品在线免费观看| 一本色道久久加勒比精品 | 亚洲成av人片观看| 国内久久精品视频| 91蜜桃免费观看视频| 欧美一二三在线| 国产精品国产精品国产专区不蜜 | 韩国欧美国产1区| 成人av网站在线观看免费| 欧美日韩日本视频| 中文欧美字幕免费| 日韩av网站免费在线| 懂色av中文字幕一区二区三区| 欧美疯狂性受xxxxx喷水图片| 国产精品免费观看视频| 男人操女人的视频在线观看欧美| aaa欧美色吧激情视频| 日韩欧美成人一区| 亚洲福利一二三区| 成人伦理片在线| 国产偷国产偷精品高清尤物| 亚洲国产精品影院| aaa亚洲精品一二三区| 欧美成人三级电影在线| 亚洲综合激情另类小说区| 99视频在线精品| 国产午夜久久久久| 激情丁香综合五月| 欧美一区二区美女| 午夜精品123| 欧美亚洲另类激情小说| 亚洲欧洲日产国码二区| 国产成人鲁色资源国产91色综| 欧美一二三四在线| 日韩高清在线不卡| 欧美日韩国产一级| 亚洲va欧美va国产va天堂影院| 91在线视频18| 亚洲欧美国产77777| 成人免费看的视频| 国产精品天美传媒| 丰满白嫩尤物一区二区| 国产日韩欧美一区二区三区乱码| 国产乱子伦视频一区二区三区 | www国产精品av| 久久99国产精品久久99果冻传媒 | 国产精品91xxx| 久久久久一区二区三区四区| 国产伦精品一区二区三区视频青涩 | 国产乱人伦精品一区二区在线观看| 日韩欧美一区中文| 美女网站色91| 精品国产三级a在线观看| 精品亚洲欧美一区| 日本一区二区视频在线观看| 成人午夜碰碰视频| 亚洲另类春色国产| 7777精品伊人久久久大香线蕉超级流畅| 亚洲国产裸拍裸体视频在线观看乱了| 欧美日本在线观看| 老鸭窝一区二区久久精品| 26uuu色噜噜精品一区二区| 国产电影一区在线| 亚洲欧美乱综合| 777午夜精品免费视频| 久久激情五月婷婷| 国产精品看片你懂得| 在线观看av一区二区| 日本不卡视频在线| 久久精品一二三| 欧美性色综合网| 精品一区二区精品| 亚洲精品综合在线| 日韩欧美国产三级| 99视频一区二区三区| 日日摸夜夜添夜夜添国产精品 | 专区另类欧美日韩| 在线播放中文一区| 精品一区二区精品| 一区二区三区日韩精品| 欧美一区二区三区免费在线看| 国产经典欧美精品| 天天av天天翘天天综合网| 国产偷v国产偷v亚洲高清| 欧美日韩卡一卡二| 成人app软件下载大全免费| 无码av中文一区二区三区桃花岛| 久久久久9999亚洲精品| 欧美精品丝袜久久久中文字幕| 国产mv日韩mv欧美| 美女尤物国产一区| 亚洲国产综合在线| 国产精品乱码一区二三区小蝌蚪| 欧美电影影音先锋| 91一区二区三区在线观看| 狠狠狠色丁香婷婷综合激情 | 欧洲精品一区二区三区在线观看| 久久国产精品99精品国产| 亚洲高清免费视频| 中文字幕亚洲不卡| 久久精品水蜜桃av综合天堂| 欧美性三三影院| www.99精品| 国产精品性做久久久久久| 日韩黄色小视频| 图片区小说区区亚洲影院| 亚洲视频一区二区在线| 国产精品久久一级| 精品剧情在线观看| 91精品国产综合久久小美女| 色www精品视频在线观看| 成人性生交大片免费看中文 | 欧美一区二区三区的| 91黄色在线观看| 在线中文字幕一区| 色综合久久久久综合体 | 亚洲欧洲精品天堂一级 | 三级影片在线观看欧美日韩一区二区 | 午夜精品久久久久久久蜜桃app| 国产精品护士白丝一区av| 国产欧美日韩另类一区| 2021久久国产精品不只是精品| 欧美一区二区女人| 精品少妇一区二区三区| 欧美成人精品1314www| 欧美成人性战久久| 26uuu国产在线精品一区二区| wwwwxxxxx欧美| 国产精品免费av| 亚洲人成伊人成综合网小说| 亚洲一二三级电影| 水蜜桃久久夜色精品一区的特点| 亚洲国产精品综合小说图片区| 视频在线在亚洲| 精品一区二区三区在线观看国产 | 欧美精品一区男女天堂| 亚洲国产精品传媒在线观看| 亚洲欧美综合在线精品| 尤物视频一区二区| 亚洲国产wwwccc36天堂| 蜜臀av一区二区在线免费观看 | 国产精品一卡二卡在线观看| 国产69精品久久99不卡| 色综合久久久久综合| 欧美精品久久久久久久多人混战| 欧美成人艳星乳罩| 国产精品白丝在线| 亚洲午夜精品在线| 精品一二三四区| 99re这里都是精品| 5858s免费视频成人| 国产人成亚洲第一网站在线播放 | 欧美剧情电影在线观看完整版免费励志电影| 欧美人与禽zozo性伦| 久久网站热最新地址| 一区二区三区在线看| 蜜桃一区二区三区四区| 国产成人av网站| 欧美日韩在线一区二区| 久久精品亚洲乱码伦伦中文| 亚洲制服丝袜一区| 国产成人在线视频播放| 欧美美女激情18p| 国产精品久久久久影院老司| 日韩二区三区在线观看| 99久久伊人网影院| 久久综合999|