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

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

?? transupp.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
 * transupp.c
 *
 * Copyright (C) 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 image transformation routines and other utility code
 * used by the jpegtran sample application.  These are NOT part of the core
 * JPEG library.  But we keep these routines separate from jpegtran.c to
 * ease the task of maintaining jpegtran-like programs that have other user
 * interfaces.
 */

/* Although this file really shouldn't have access to the library internals,
 * it's helpful to let it call jround_up() and jcopy_block_row().
 */
#define JPEG_INTERNALS

#include "jinclude.h"
#include "jpeglib.h"
#include "transupp.h"		/* My own external interface */


#if TRANSFORMS_SUPPORTED

/*
 * Lossless image transformation routines.  These routines work on DCT
 * coefficient arrays and thus do not require any lossy decompression
 * or recompression of the image.
 * Thanks to Guido Vollbeding for the initial design and code of this feature.
 *
 * Horizontal flipping is done in-place, using a single top-to-bottom
 * pass through the virtual source array.  It will thus be much the
 * fastest option for images larger than main memory.
 *
 * The other routines require a set of destination virtual arrays, so they
 * need twice as much memory as jpegtran normally does.  The destination
 * arrays are always written in normal scan order (top to bottom) because
 * the virtual array manager expects this.  The source arrays will be scanned
 * in the corresponding order, which means multiple passes through the source
 * arrays for most of the transforms.  That could result in much thrashing
 * if the image is larger than main memory.
 *
 * Some notes about the operating environment of the individual transform
 * routines:
 * 1. Both the source and destination virtual arrays are allocated from the
 *    source JPEG object, and therefore should be manipulated by calling the
 *    source's memory manager.
 * 2. The destination's component count should be used.  It may be smaller
 *    than the source's when forcing to grayscale.
 * 3. Likewise the destination's sampling factors should be used.  When
 *    forcing to grayscale the destination's sampling factors will be all 1,
 *    and we may as well take that as the effective iMCU size.
 * 4. When "trim" is in effect, the destination's dimensions will be the
 *    trimmed values but the source's will be untrimmed.
 * 5. All the routines assume that the source and destination buffers are
 *    padded out to a full iMCU boundary.  This is true, although for the
 *    source buffer it is an undocumented property of jdcoefct.c.
 * Notes 2,3,4 boil down to this: generally we should use the destination's
 * dimensions and ignore the source's.
 */


LOCAL(void)
do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
	   jvirt_barray_ptr *src_coef_arrays)
/* Horizontal flip; done in-place, so no separate dest array is required */
{
  JDIMENSION MCU_cols, comp_width, blk_x, blk_y;
  int ci, k, offset_y;
  JBLOCKARRAY buffer;
  JCOEFPTR ptr1, ptr2;
  JCOEF temp1, temp2;
  jpeg_component_info *compptr;

  /* Horizontal mirroring of DCT blocks is accomplished by swapping
   * pairs of blocks in-place.  Within a DCT block, we perform horizontal
   * mirroring by changing the signs of odd-numbered columns.
   * Partial iMCUs at the right edge are left untouched.
   */
  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);

  for (ci = 0; ci < dstinfo->num_components; ci++) {
    compptr = dstinfo->comp_info + ci;
    comp_width = MCU_cols * compptr->h_samp_factor;
    for (blk_y = 0; blk_y < compptr->height_in_blocks;
	 blk_y += compptr->v_samp_factor) {
      buffer = (*srcinfo->mem->access_virt_barray)
	((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y,
	 (JDIMENSION) compptr->v_samp_factor, TRUE);
      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
	for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) {
	  ptr1 = buffer[offset_y][blk_x];
	  ptr2 = buffer[offset_y][comp_width - blk_x - 1];
	  /* this unrolled loop doesn't need to know which row it's on... */
	  for (k = 0; k < DCTSIZE2; k += 2) {
	    temp1 = *ptr1;	/* swap even column */
	    temp2 = *ptr2;
	    *ptr1++ = temp2;
	    *ptr2++ = temp1;
	    temp1 = *ptr1;	/* swap odd column with sign change */
	    temp2 = *ptr2;
	    *ptr1++ = -temp2;
	    *ptr2++ = -temp1;
	  }
	}
      }
    }
  }
}


LOCAL(void)
do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
	   jvirt_barray_ptr *src_coef_arrays,
	   jvirt_barray_ptr *dst_coef_arrays)
/* Vertical flip */
{
  JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
  int ci, i, j, offset_y;
  JBLOCKARRAY src_buffer, dst_buffer;
  JBLOCKROW src_row_ptr, dst_row_ptr;
  JCOEFPTR src_ptr, dst_ptr;
  jpeg_component_info *compptr;

  /* We output into a separate array because we can't touch different
   * rows of the source virtual array simultaneously.  Otherwise, this
   * is a pretty straightforward analog of horizontal flip.
   * Within a DCT block, vertical mirroring is done by changing the signs
   * of odd-numbered rows.
   * Partial iMCUs at the bottom edge are copied verbatim.
   */
  MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);

  for (ci = 0; ci < dstinfo->num_components; ci++) {
    compptr = dstinfo->comp_info + ci;
    comp_height = MCU_rows * compptr->v_samp_factor;
    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
	 dst_blk_y += compptr->v_samp_factor) {
      dst_buffer = (*srcinfo->mem->access_virt_barray)
	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
	 (JDIMENSION) compptr->v_samp_factor, TRUE);
      if (dst_blk_y < comp_height) {
	/* Row is within the mirrorable area. */
	src_buffer = (*srcinfo->mem->access_virt_barray)
	  ((j_common_ptr) srcinfo, src_coef_arrays[ci],
	   comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
	   (JDIMENSION) compptr->v_samp_factor, FALSE);
      } else {
	/* Bottom-edge blocks will be copied verbatim. */
	src_buffer = (*srcinfo->mem->access_virt_barray)
	  ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
	   (JDIMENSION) compptr->v_samp_factor, FALSE);
      }
      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
	if (dst_blk_y < comp_height) {
	  /* Row is within the mirrorable area. */
	  dst_row_ptr = dst_buffer[offset_y];
	  src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
	  for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
	       dst_blk_x++) {
	    dst_ptr = dst_row_ptr[dst_blk_x];
	    src_ptr = src_row_ptr[dst_blk_x];
	    for (i = 0; i < DCTSIZE; i += 2) {
	      /* copy even row */
	      for (j = 0; j < DCTSIZE; j++)
		*dst_ptr++ = *src_ptr++;
	      /* copy odd row with sign change */
	      for (j = 0; j < DCTSIZE; j++)
		*dst_ptr++ = - *src_ptr++;
	    }
	  }
	} else {
	  /* Just copy row verbatim. */
	  jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y],
			  compptr->width_in_blocks);
	}
      }
    }
  }
}


LOCAL(void)
do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
	      jvirt_barray_ptr *src_coef_arrays,
	      jvirt_barray_ptr *dst_coef_arrays)
/* Transpose source into destination */
{
  JDIMENSION dst_blk_x, dst_blk_y;
  int ci, i, j, offset_x, offset_y;
  JBLOCKARRAY src_buffer, dst_buffer;
  JCOEFPTR src_ptr, dst_ptr;
  jpeg_component_info *compptr;

  /* Transposing pixels within a block just requires transposing the
   * DCT coefficients.
   * Partial iMCUs at the edges require no special treatment; we simply
   * process all the available DCT blocks for every component.
   */
  for (ci = 0; ci < dstinfo->num_components; ci++) {
    compptr = dstinfo->comp_info + ci;
    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
	 dst_blk_y += compptr->v_samp_factor) {
      dst_buffer = (*srcinfo->mem->access_virt_barray)
	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
	 (JDIMENSION) compptr->v_samp_factor, TRUE);
      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
	     dst_blk_x += compptr->h_samp_factor) {
	  src_buffer = (*srcinfo->mem->access_virt_barray)
	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
	     (JDIMENSION) compptr->h_samp_factor, FALSE);
	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
	    dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
	    for (i = 0; i < DCTSIZE; i++)
	      for (j = 0; j < DCTSIZE; j++)
		dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
	  }
	}
      }
    }
  }
}


LOCAL(void)
do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
	   jvirt_barray_ptr *src_coef_arrays,
	   jvirt_barray_ptr *dst_coef_arrays)
/* 90 degree rotation is equivalent to
 *   1. Transposing the image;
 *   2. Horizontal mirroring.
 * These two steps are merged into a single processing routine.
 */
{
  JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y;
  int ci, i, j, offset_x, offset_y;
  JBLOCKARRAY src_buffer, dst_buffer;
  JCOEFPTR src_ptr, dst_ptr;
  jpeg_component_info *compptr;

  /* Because of the horizontal mirror step, we can't process partial iMCUs
   * at the (output) right edge properly.  They just get transposed and
   * not mirrored.
   */
  MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);

  for (ci = 0; ci < dstinfo->num_components; ci++) {
    compptr = dstinfo->comp_info + ci;
    comp_width = MCU_cols * compptr->h_samp_factor;
    for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
	 dst_blk_y += compptr->v_samp_factor) {
      dst_buffer = (*srcinfo->mem->access_virt_barray)
	((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
	 (JDIMENSION) compptr->v_samp_factor, TRUE);
      for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
	for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
	     dst_blk_x += compptr->h_samp_factor) {
	  src_buffer = (*srcinfo->mem->access_virt_barray)
	    ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
	     (JDIMENSION) compptr->h_samp_factor, FALSE);
	  for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
	    src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
	    if (dst_blk_x < comp_width) {
	      /* Block is within the mirrorable area. */
	      dst_ptr = dst_buffer[offset_y]
		[comp_width - dst_blk_x - offset_x - 1];
	      for (i = 0; i < DCTSIZE; i++) {
		for (j = 0; j < DCTSIZE; j++)
		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
		i++;
		for (j = 0; j < DCTSIZE; j++)
		  dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
	      }
	    } else {
	      /* Edge blocks are transposed but not mirrored. */
	      dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
	      for (i = 0; i < DCTSIZE; i++)
		for (j = 0; j < DCTSIZE; j++)
		  dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
	    }
	  }
	}
      }
    }
  }
}


LOCAL(void)
do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
	    jvirt_barray_ptr *src_coef_arrays,
	    jvirt_barray_ptr *dst_coef_arrays)
/* 270 degree rotation is equivalent to
 *   1. Horizontal mirroring;
 *   2. Transposing the image.
 * These two steps are merged into a single processing routine.
 */
{
  JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
  int ci, i, j, offset_x, offset_y;
  JBLOCKARRAY src_buffer, dst_buffer;
  JCOEFPTR src_ptr, dst_ptr;
  jpeg_component_info *compptr;

  /* Because of the horizontal mirror step, we can't process partial iMCUs
   * at the (output) bottom edge properly.  They just get transposed and

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区香蕉蜜桃 | 国产成人精品免费一区二区| 亚洲风情在线资源站| 国产精品免费视频网站| 99在线精品免费| 99re8在线精品视频免费播放| 成人免费高清视频在线观看| 成人动漫中文字幕| 欧美一级一区二区| 精品亚洲成a人| 丁香婷婷综合五月| 日本福利一区二区| 久久激五月天综合精品| 国产成人午夜高潮毛片| 97精品国产露脸对白| 欧美日韩国产经典色站一区二区三区| 91精品国产一区二区三区| 国产欧美一区视频| 日本视频一区二区三区| 欧美电影精品一区二区| 国产超碰在线一区| 国产精品美日韩| 成人精品国产一区二区4080| 久久精品人人做| 亚洲国产欧美在线| 中文字幕在线免费不卡| 久久综合久色欧美综合狠狠| 91在线精品一区二区三区| 国产精品三级视频| 日韩欧美一区二区视频| 欧美日韩你懂得| 日韩精品在线一区二区| av不卡在线播放| 久久久99精品久久| 69久久99精品久久久久婷婷| 国产精品狼人久久影院观看方式| 日韩中文字幕一区二区三区| 在线观看日韩av先锋影音电影院| 精品国产乱码久久久久久牛牛 | 91久久精品一区二区二区| 日韩精品一区二区三区视频在线观看 | 欧美在线观看18| 欧美一区二区福利在线| 亚洲国产另类av| 欧美一级免费观看| 日本色综合中文字幕| 日韩一区二区电影网| 亚洲在线一区二区三区| 欧美亚男人的天堂| 婷婷综合五月天| 欧美日韩精品欧美日韩精品一综合| 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲精品一区二区三区在线观看| 久草在线在线精品观看| 国产日韩精品一区二区三区在线| 日韩电影在线观看电影| 欧美精三区欧美精三区| 黄页网站大全一区二区| 一区二区三区中文在线| 51精品国自产在线| 丁香天五香天堂综合| 亚洲国产视频在线| 国产精品色在线观看| av电影在线观看不卡| 轻轻草成人在线| 蜜桃av一区二区三区| 欧美日韩在线播放一区| 精品一区二区三区在线播放视频| 久久久久久免费网| 欧美午夜宅男影院| 成人av影院在线| 国内精品伊人久久久久av一坑| 一区二区三区国产精华| 欧美激情一区不卡| 久久人人爽爽爽人久久久| 国产一本一道久久香蕉| 午夜亚洲福利老司机| 日本精品视频一区二区三区| 国产揄拍国内精品对白| 男男成人高潮片免费网站| 国产精品久久久一本精品| 久久久www免费人成精品| 在线电影一区二区三区| 欧美精选一区二区| 欧美高清一级片在线| 99re8在线精品视频免费播放| 成人av动漫网站| 91麻豆精东视频| 欧美视频一区二区三区| 成人av资源下载| 精品成人一区二区三区| 91在线视频官网| 99在线精品视频| 国产成人在线视频网站| 精一区二区三区| 国产成人亚洲综合a∨猫咪| 免费成人在线网站| 五月天丁香久久| 亚洲6080在线| 精品一二三四区| 色综合中文综合网| 久久99在线观看| 粉嫩高潮美女一区二区三区| 亚洲一区二区三区自拍| 亚洲一区视频在线| 亚洲国产美女搞黄色| 日本va欧美va欧美va精品| 九色综合国产一区二区三区| 日本特黄久久久高潮| 欧美色综合影院| 国产精品中文字幕日韩精品| 蜜桃av一区二区三区| 国产精品一级在线| 欧美三片在线视频观看| 国产综合久久久久影院| 国产乱子伦视频一区二区三区 | 成人午夜免费电影| 欧美影视一区在线| 日韩一级精品视频在线观看| 亚洲欧美日本韩国| 2023国产精华国产精品| 亚洲欧美激情插 | 国产盗摄女厕一区二区三区| 青青青爽久久午夜综合久久午夜| 五月婷婷久久综合| 99久久免费精品| 久久久91精品国产一区二区三区| 日本三级亚洲精品| 国产精品18久久久久久vr| 色香色香欲天天天影视综合网| 久久毛片高清国产| 91丨porny丨中文| 日韩写真欧美这视频| 亚洲一区二区综合| 欧美亚洲国产bt| 午夜日韩在线观看| 日韩美女一区二区三区| 麻豆精品一区二区av白丝在线| 欧美三级视频在线| 亚洲福利一区二区| 69精品人人人人| 一级日本不卡的影视| 日韩欧美在线一区二区三区| 免费人成精品欧美精品 | 国产福利不卡视频| 国产精品色呦呦| 91极品视觉盛宴| 日韩精品高清不卡| 国产女主播在线一区二区| av电影天堂一区二区在线| 欧美中文字幕一区二区三区亚洲| 丝袜脚交一区二区| 色综合久久久久综合体| 欧美aaaaaa午夜精品| 中文字幕一区二区三区视频| 欧美群妇大交群的观看方式| 日韩在线a电影| 中文字幕永久在线不卡| 精品免费99久久| 色又黄又爽网站www久久| 亚洲va中文字幕| 久久久www成人免费无遮挡大片| 欧美在线影院一区二区| av欧美精品.com| 欧美性猛片xxxx免费看久爱| 国产色婷婷亚洲99精品小说| 亚洲精品自拍动漫在线| 亚洲国产精品久久久男人的天堂| 国产激情视频一区二区三区欧美| 国产一区二区中文字幕| 亚洲精品在线免费播放| 国产在线不卡视频| 在线影院国内精品| 欧美一区二区三区四区五区 | 久久激情五月激情| 午夜久久久影院| 日韩视频一区二区三区在线播放| 国产高清精品久久久久| 91麻豆精品国产综合久久久久久| 日韩中文字幕一区二区三区| 久久女同性恋中文字幕| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 樱花影视一区二区| 樱桃国产成人精品视频| 1000精品久久久久久久久| 久久色视频免费观看| 欧美大片日本大片免费观看| 欧美不卡视频一区| 精品国产99国产精品| 欧美国产日本韩| 亚洲综合另类小说| 肉色丝袜一区二区| 国产成人精品免费一区二区| 成人教育av在线| 日本丶国产丶欧美色综合| 欧美va在线播放| 亚洲精品伦理在线| 九色综合狠狠综合久久| 99re成人精品视频| 久久亚洲精精品中文字幕早川悠里|