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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jdsample.c

?? wince下CxImage
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 * jdsample.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 upsampling routines.
 *
 * Upsampling input data is counted in "row groups".  A row group
 * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size)
 * sample rows of each component.  Upsampling will normally produce
 * max_v_samp_factor pixel rows from each row group (but this could vary
 * if the upsampler is applying a scale factor of its own).
 *
 * 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.
 */

#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"


/* Pointer to routine to upsample a single component */
typedef JMETHOD(void, upsample1_ptr,
		(j_decompress_ptr cinfo, jpeg_component_info * compptr,
		 JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));

/* Private subobject */

typedef struct {
  struct jpeg_upsampler pub;	/* public fields */

  /* Color conversion buffer.  When using separate upsampling and color
   * conversion steps, this buffer holds one upsampled row group until it
   * has been color converted and output.
   * Note: we do not allocate any storage for component(s) which are full-size,
   * ie do not need rescaling.  The corresponding entry of color_buf[] is
   * simply set to point to the input data array, thereby avoiding copying.
   */
  JSAMPARRAY color_buf[MAX_COMPONENTS];

  /* Per-component upsampling method pointers */
  upsample1_ptr methods[MAX_COMPONENTS];

  int next_row_out;		/* counts rows emitted from color_buf */
  JDIMENSION rows_to_go;	/* counts rows remaining in image */

  /* Height of an input row group for each component. */
  int rowgroup_height[MAX_COMPONENTS];

  /* These arrays save pixel expansion factors so that int_expand need not
   * recompute them each time.  They are unused for other upsampling methods.
   */
  UINT8 h_expand[MAX_COMPONENTS];
  UINT8 v_expand[MAX_COMPONENTS];
} my_upsampler;

typedef my_upsampler * my_upsample_ptr;


/*
 * Initialize for an upsampling pass.
 */

METHODDEF(void)
start_pass_upsample (j_decompress_ptr cinfo)
{
  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;

  /* Mark the conversion buffer empty */
  upsample->next_row_out = cinfo->max_v_samp_factor;
  /* Initialize total-height counter for detecting bottom of image */
  upsample->rows_to_go = cinfo->output_height;
}


/*
 * Control routine to do upsampling (and color conversion).
 *
 * In this version we upsample each component independently.
 * We upsample one row group into the conversion buffer, then apply
 * color conversion a row at a time.
 */

METHODDEF(void)
sep_upsample (j_decompress_ptr cinfo,
	      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
	      JDIMENSION in_row_groups_avail,
	      JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
	      JDIMENSION out_rows_avail)
{
  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
  int ci;
  jpeg_component_info * compptr;
  JDIMENSION num_rows;

  /* Fill the conversion buffer, if it's empty */
  if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
    for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
	 ci++, compptr++) {
      /* Invoke per-component upsample method.  Notice we pass a POINTER
       * to color_buf[ci], so that fullsize_upsample can change it.
       */
      (*upsample->methods[ci]) (cinfo, compptr,
	input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]),
	upsample->color_buf + ci);
    }
    upsample->next_row_out = 0;
  }

  /* Color-convert and emit rows */

  /* How many we have in the buffer: */
  num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out);
  /* Not more than the distance to the end of the image.  Need this test
   * in case the image height is not a multiple of max_v_samp_factor:
   */
  if (num_rows > upsample->rows_to_go) 
    num_rows = upsample->rows_to_go;
  /* And not more than what the client can accept: */
  out_rows_avail -= *out_row_ctr;
  if (num_rows > out_rows_avail)
    num_rows = out_rows_avail;

  (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf,
				     (JDIMENSION) upsample->next_row_out,
				     output_buf + *out_row_ctr,
				     (int) num_rows);

  /* Adjust counts */
  *out_row_ctr += num_rows;
  upsample->rows_to_go -= num_rows;
  upsample->next_row_out += num_rows;
  /* When the buffer is emptied, declare this input row group consumed */
  if (upsample->next_row_out >= cinfo->max_v_samp_factor)
    (*in_row_group_ctr)++;
}


/*
 * These are the routines invoked by sep_upsample to upsample pixel values
 * of a single component.  One row group is processed per call.
 */


/*
 * For full-size components, we just make color_buf[ci] point at the
 * input buffer, and thus avoid copying any data.  Note that this is
 * safe only because sep_upsample doesn't declare the input row group
 * "consumed" until we are done color converting and emitting it.
 */

METHODDEF(void)
fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
		   JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  *output_data_ptr = input_data;
}


/*
 * This is a no-op version used for "uninteresting" components.
 * These components will not be referenced by color conversion.
 */

METHODDEF(void)
noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  *output_data_ptr = NULL;	/* safety check */
}


/*
 * This version handles any integral sampling ratios.
 * This is not used for typical JPEG files, so it need not be fast.
 * Nor, for that matter, is it particularly accurate: the algorithm is
 * simple replication of the input pixel onto the corresponding output
 * pixels.  The hi-falutin sampling literature refers to this as a
 * "box filter".  A box filter tends to introduce visible artifacts,
 * so if you are actually going to use 3:1 or 4:1 sampling ratios
 * you would be well advised to improve this code.
 */

METHODDEF(void)
int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register JSAMPLE invalue;
  register int h;
  JSAMPROW outend;
  int h_expand, v_expand;
  int inrow, outrow;

  h_expand = upsample->h_expand[compptr->component_index];
  v_expand = upsample->v_expand[compptr->component_index];

  inrow = outrow = 0;
  while (outrow < cinfo->max_v_samp_factor) {
    /* Generate one output row with proper horizontal expansion */
    inptr = input_data[inrow];
    outptr = output_data[outrow];
    outend = outptr + cinfo->output_width;
    while (outptr < outend) {
      invalue = *inptr++;	/* don't need GETJSAMPLE() here */
      for (h = h_expand; h > 0; h--) {
	*outptr++ = invalue;
      }
    }
    /* Generate any additional output rows by duplicating the first one */
    if (v_expand > 1) {
      jcopy_sample_rows(output_data, outrow, output_data, outrow+1,
			v_expand-1, cinfo->output_width);
    }
    inrow++;
    outrow += v_expand;
  }
}


/*
 * Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
 * It's still a box filter.
 */

METHODDEF(void)
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
  JSAMPARRAY output_data = *output_data_ptr;
  register JSAMPROW inptr, outptr;
  register JSAMPLE invalue;
  JSAMPROW outend;
  int inrow;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜亚洲精品理论片色戒| 久久99最新地址| 国产一区二区三区免费观看| 欧美videofree性高清杂交| 麻豆精品一区二区综合av| 制服.丝袜.亚洲.中文.综合| 国产一区二区精品久久91| 日本欧美一区二区三区乱码| 精品国产成人在线影院 | 色综合天天狠狠| 亚洲r级在线视频| 国产精品理论在线观看| 欧美一区二视频| 色婷婷亚洲婷婷| 在线观看中文字幕不卡| 懂色一区二区三区免费观看| 日本aⅴ精品一区二区三区 | 色综合色综合色综合色综合色综合 | 欧美一区二区免费| 欧美成人精品3d动漫h| 欧美精品一区二区三区蜜桃| 国产亚洲精品超碰| 国产精品理论在线观看| 亚洲综合激情另类小说区| 精品福利一区二区三区| 国产欧美精品一区二区色综合| 91麻豆精品国产91久久久| 日韩欧美激情四射| 在线不卡a资源高清| 色菇凉天天综合网| 成人免费精品视频| 国产精品一区二区三区四区| 午夜伦欧美伦电影理论片| 亚洲色图在线播放| 国产午夜亚洲精品午夜鲁丝片| 国产精品久久久久一区二区三区共| 一区二区三区精品视频在线| 亚洲欧美日韩国产综合在线| 中文字幕在线观看不卡| 亚洲国产岛国毛片在线| 日本一区二区不卡视频| 亚洲成人黄色影院| 国产成人综合在线观看| 东方aⅴ免费观看久久av| 欧美探花视频资源| 91精品国产综合久久香蕉麻豆| 国产日产欧产精品推荐色| 亚洲午夜免费视频| 五月激情综合婷婷| 成人h精品动漫一区二区三区| 丁香婷婷综合网| 91麻豆精品91久久久久同性| 国产精品久线观看视频| 蜜桃一区二区三区在线观看| 色综合天天狠狠| 国产精品人妖ts系列视频| 亚洲欧美偷拍三级| 国产精品一二三| 欧美一区二区三区喷汁尤物| 一区二区三区欧美日韩| 丁香六月久久综合狠狠色| 日韩午夜精品电影| 日本一区二区三区免费乱视频| 首页综合国产亚洲丝袜| 国产一区二区导航在线播放| 欧美精品久久99| 亚洲一区二区三区中文字幕在线| 成人av在线播放网站| 久久一留热品黄| 亚洲久草在线视频| 麻豆国产精品官网| 91麻豆精品国产综合久久久久久 | 一区二区三区日韩欧美精品| 国产成人免费视频精品含羞草妖精| 欧美人狂配大交3d怪物一区 | 国产一区二区三区日韩| 欧美日韩国产经典色站一区二区三区 | 一本到高清视频免费精品| 久久这里只有精品6| 另类调教123区| 欧美电影免费观看高清完整版| 日本欧美一区二区三区乱码| 91麻豆精品国产91久久久使用方法 | 国产精品69毛片高清亚洲| 日韩欧美国产午夜精品| 精品一区二区三区久久久| 日本精品视频一区二区| 一级精品视频在线观看宜春院 | 五月激情丁香一区二区三区| 欧洲另类一二三四区| 一区二区视频在线| 欧美日韩一区二区不卡| 中文幕一区二区三区久久蜜桃| 粉嫩一区二区三区性色av| 中文字幕中文字幕一区二区| 成人18精品视频| 亚洲福利一区二区三区| 欧美欧美午夜aⅴ在线观看| 麻豆一区二区在线| 日本一区二区成人| 欧美日韩视频在线第一区| 久久99热这里只有精品| 国产精品电影一区二区三区| 欧美亚一区二区| 狠狠色狠狠色综合日日91app| 777xxx欧美| 国产91高潮流白浆在线麻豆| 亚洲图片你懂的| 在线不卡欧美精品一区二区三区| 亚洲成年人网站在线观看| 欧美mv日韩mv国产| caoporm超碰国产精品| 久久久亚洲欧洲日产国码αv| 免费不卡在线观看| 国产精品久久网站| 欧美一级专区免费大片| 99久久久国产精品免费蜜臀| 欧美国产一区视频在线观看| 欧美影院午夜播放| 国产a视频精品免费观看| 亚洲国产精品久久不卡毛片| 国产亚洲精品资源在线26u| 在线观看91精品国产入口| 国产精品一线二线三线| 午夜久久久久久电影| 国产精品狼人久久影院观看方式| 日韩一区二区三区电影在线观看| 99精品国产视频| 国产精品一区免费在线观看| 日韩国产欧美三级| 一区二区三区在线播| 欧美经典一区二区三区| 91精品国产综合久久香蕉麻豆| www.一区二区| 国产精品一区二区在线播放 | 国产在线一区观看| 午夜国产精品一区| 亚洲精品中文在线影院| 国产精品视频免费看| 精品日韩在线观看| 日韩一区二区三区三四区视频在线观看| 91麻豆国产在线观看| 天天综合天天综合色| 亚洲精品免费播放| 亚洲丝袜另类动漫二区| 国产色综合一区| 久久久欧美精品sm网站| 精品欧美久久久| 欧美va在线播放| 久久伊99综合婷婷久久伊| 日韩欧美亚洲国产精品字幕久久久| 91成人国产精品| 91行情网站电视在线观看高清版| 97国产一区二区| 91丝袜国产在线播放| 97精品久久久久中文字幕| 91视频xxxx| 欧美色综合天天久久综合精品| 欧美优质美女网站| 欧美日韩在线播放三区四区| 精品视频色一区| 欧美一级免费大片| 日韩免费电影网站| 久久久久亚洲蜜桃| 国产欧美视频一区二区| 中文字幕中文字幕一区二区 | 欧美美女喷水视频| 欧美日韩成人一区| 制服.丝袜.亚洲.中文.综合| 日韩亚洲电影在线| 国产偷v国产偷v亚洲高清| 国产精品激情偷乱一区二区∴| 亚洲欧美一区二区三区久本道91| 亚洲一卡二卡三卡四卡| 日韩不卡一区二区三区| 国模套图日韩精品一区二区| 成人精品视频一区二区三区尤物| 99精品欧美一区二区三区小说| 91精品福利视频| 日韩欧美一区中文| 国产精品系列在线| 日韩在线a电影| 国产成人免费9x9x人网站视频| 91在线免费视频观看| 制服丝袜一区二区三区| 欧美国产在线观看| 三级在线观看一区二区| 国产成人在线免费观看| 在线免费精品视频| 欧美精品一区二| 亚洲精品水蜜桃| 韩国理伦片一区二区三区在线播放| www.亚洲精品| 91精品国产91综合久久蜜臀| 国产精品久久久久影院亚瑟| 午夜电影一区二区三区| av电影在线不卡| www亚洲一区| 亚洲成人久久影院| 91视视频在线观看入口直接观看www|