亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国v精品久久久网| 99精品偷自拍| 一二三四社区欧美黄| 欧美一卡二卡三卡四卡| 成人免费va视频| 精品一区二区综合| 亚洲国产美国国产综合一区二区| 精品美女被调教视频大全网站| 91在线视频播放地址| 激情五月婷婷综合| 婷婷成人综合网| 亚洲精品成人精品456| 久久久精品蜜桃| 日韩欧美久久久| 欧美日韩极品在线观看一区| 色综合色狠狠天天综合色| 国产a级毛片一区| 国产在线看一区| 日韩精品一二区| 午夜欧美电影在线观看| 一区二区三区在线播放| 中文字幕亚洲一区二区va在线| www激情久久| 欧美一区二区不卡视频| 欧美疯狂性受xxxxx喷水图片| 91麻豆国产福利在线观看| 国产成人精品免费在线| 国产九色sp调教91| 国内成人精品2018免费看| 美女在线一区二区| 美女被吸乳得到大胸91| 日韩电影免费在线观看网站| 亚洲一区在线看| 伊人开心综合网| 亚洲欧美日韩一区| 亚洲柠檬福利资源导航| 亚洲欧美另类综合偷拍| 亚洲欧洲av一区二区三区久久| 国产三级一区二区| 中文字幕国产一区| 国产欧美日韩三级| 国产精品三级视频| 国产欧美日产一区| 国产精品色婷婷| 亚洲视频精选在线| 日韩av一二三| 男男视频亚洲欧美| 国产尤物一区二区在线| 国产精品自在欧美一区| 粉嫩一区二区三区在线看| 成人亚洲一区二区一| 成人av在线播放网址| 国产不卡视频在线播放| 不卡视频一二三| 一本久久综合亚洲鲁鲁五月天| 在线视频观看一区| 欧美一区二区三区四区久久| 欧美一级理论片| 国产视频亚洲色图| 亚洲精品视频在线看| 亚洲v中文字幕| 久久精品999| 成人福利电影精品一区二区在线观看| 成人aaaa免费全部观看| 一本一道久久a久久精品 | 香蕉影视欧美成人| 免费欧美日韩国产三级电影| 国产精品一区二区三区乱码 | jvid福利写真一区二区三区| 91网站在线观看视频| 欧美日韩一区二区三区在线看 | 99精品偷自拍| 欧美乱妇23p| 久久精品一区四区| 亚洲精品乱码久久久久久久久| 日韩国产欧美在线视频| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日韩一区二区免费高清| 欧美国产视频在线| 爽爽淫人综合网网站| 国产成人在线视频网址| 色成人在线视频| 久久久综合网站| 亚洲免费电影在线| 国产精品综合一区二区三区| 欧美高清dvd| 国产欧美日韩卡一| 日本91福利区| 色综合视频一区二区三区高清| 日韩欧美一级片| 一区二区三区四区av| 国产精品一区二区免费不卡| 欧美性高清videossexo| 国产午夜久久久久| 奇米777欧美一区二区| 99re这里都是精品| 2021国产精品久久精品| 一区二区国产视频| www.综合网.com| 精品久久人人做人人爽| 午夜精品免费在线观看| 大胆亚洲人体视频| 精品美女在线观看| 天堂蜜桃一区二区三区 | k8久久久一区二区三区| 日韩欧美三级在线| 性久久久久久久久| 色婷婷狠狠综合| 欧美韩国日本一区| 国产一区二区三区美女| 日韩一二三四区| 天天av天天翘天天综合网| 91年精品国产| 中文字幕一区二| 国产91露脸合集magnet| www国产精品av| 紧缚奴在线一区二区三区| 欧美人妖巨大在线| 一区二区三区四区亚洲| 99re这里只有精品首页| 国产精品亲子乱子伦xxxx裸| 国产一区二区在线看| 日韩欧美国产午夜精品| 日韩国产精品久久| 欧美精品第一页| 午夜电影网一区| 欧美三级电影一区| 亚洲va在线va天堂| 欧美日韩免费电影| 性久久久久久久久| 51精品久久久久久久蜜臀| 午夜精品福利一区二区三区av | wwwwww.欧美系列| 久久电影网电视剧免费观看| 91精品国产色综合久久ai换脸| 五月天激情综合| 91精品视频网| 美日韩黄色大片| 久久综合九色综合97婷婷女人 | 蜜臀久久99精品久久久久宅男| 欧美年轻男男videosbes| 亚洲高清一区二区三区| 7777女厕盗摄久久久| 亚洲va天堂va国产va久| 欧美一级片免费看| 久久99国产精品尤物| 久久精品日韩一区二区三区| 国产精品1024| 中文字幕一区二区不卡| 91国模大尺度私拍在线视频| 亚洲一区二区三区自拍| 在线综合视频播放| 九九九久久久精品| 欧美国产一区二区| 日本韩国一区二区| 日韩高清欧美激情| 久久精品视频一区二区| 91视视频在线直接观看在线看网页在线看| 亚洲人成在线播放网站岛国| 欧美少妇性性性| 蜜桃av一区二区三区电影| 国产欧美日韩精品一区| 色综合天天综合给合国产| 亚洲mv大片欧洲mv大片精品| 欧美不卡一区二区三区四区| 国产成人精品一区二| 亚洲一区在线播放| 亚洲精品一区二区在线观看| 99久久免费视频.com| 亚洲成人久久影院| 久久久久久久久久久久久久久99| www.爱久久.com| 琪琪久久久久日韩精品| 国产精品无遮挡| 欧美精品丝袜久久久中文字幕| 精品一区二区av| 亚洲欧洲av在线| 欧美xxxxx牲另类人与| 91在线播放网址| 久久99热这里只有精品| 国产精品久久久久久户外露出| 欧美日韩精品一区二区三区四区 | 亚洲精选在线视频| 91精品国产一区二区三区蜜臀| 国产大陆亚洲精品国产| 亚洲高清不卡在线| 国产精品女主播av| 91麻豆精品国产自产在线观看一区 | 污片在线观看一区二区| 亚洲色欲色欲www在线观看| 欧美一区二区在线免费观看| 国产综合久久久久影院| 亚洲第一在线综合网站| www久久精品| 欧美撒尿777hd撒尿| 成av人片一区二区| 蜜桃视频一区二区| 一区二区三区四区乱视频| 国产亚洲一区二区三区四区 | 777午夜精品视频在线播放|