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

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

?? jcmaster.c

?? MPEG4解碼程序源代碼(能夠?qū)Ω鞣NMPEG4文件進(jìn)行解碼)
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
////////////////////////////////////////////////////////////////////////
//
//	Note : this file is included as part of the Smaller Animals Software
//	JpegFile package. Though this file has not been modified from it's 
//	original IJG 6a form, it is not the responsibility on the Independent
//	JPEG Group to answer questions regarding this code.
//	
//	Any questions you have about this code should be addressed to :
//
//	CHRISDL@PAGESZ.NET	- the distributor of this package.
//
//	Remember, by including this code in the JpegFile package, Smaller 
//	Animals Software assumes all responsibilities for answering questions
//	about it. If we (SA Software) can't answer your questions ourselves, we 
//	will direct you to people who can.
//
//	Thanks, CDL.
//
////////////////////////////////////////////////////////////////////////

/*
 * jcmaster.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 master control logic for the JPEG compressor.
 * These routines are concerned with parameter validation, initial setup,
 * and inter-pass control (determining the number of passes and the work 
 * to be done in each pass).
 */

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


/* Private state */

typedef enum {
	main_pass,		/* input data, also do first output step */
	huff_opt_pass,		/* Huffman code optimization pass */
	output_pass		/* data output pass */
} c_pass_type;

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

  c_pass_type pass_type;	/* the type of the current pass */

  int pass_number;		/* # of passes completed */
  int total_passes;		/* total # of passes needed */

  int scan_number;		/* current index in scan_info[] */
} my_comp_master;

typedef my_comp_master * my_master_ptr;


/*
 * Support routines that do various essential calculations.
 */

LOCAL(void)
initial_setup (j_compress_ptr cinfo)
/* Do computations that are needed before master selection phase */
{
  int ci;
  jpeg_component_info *compptr;
  long samplesperrow;
  JDIMENSION jd_samplesperrow;

  /* Sanity check on image dimensions */
  if (cinfo->image_height <= 0 || cinfo->image_width <= 0
      || cinfo->num_components <= 0 || cinfo->input_components <= 0)
    ERREXIT(cinfo, JERR_EMPTY_IMAGE);

  /* Make sure image isn't bigger than I can handle */
  if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION ||
      (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION)
    ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);

  /* Width of an input scanline must be representable as JDIMENSION. */
  samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;
  jd_samplesperrow = (JDIMENSION) samplesperrow;
  if ((long) jd_samplesperrow != samplesperrow)
    ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);

  /* For now, precision must match compiled-in value... */
  if (cinfo->data_precision != BITS_IN_JSAMPLE)
    ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);

  /* Check that number of components won't exceed internal array sizes */
  if (cinfo->num_components > MAX_COMPONENTS)
    ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
	     MAX_COMPONENTS);

  /* Compute maximum sampling factors; check factor validity */
  cinfo->max_h_samp_factor = 1;
  cinfo->max_v_samp_factor = 1;
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR ||
	compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR)
      ERREXIT(cinfo, JERR_BAD_SAMPLING);
    cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor,
				   compptr->h_samp_factor);
    cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor,
				   compptr->v_samp_factor);
  }

  /* Compute dimensions of components */
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    /* Fill in the correct component_index value; don't rely on application */
    compptr->component_index = ci;
    /* For compression, we never do DCT scaling. */
    compptr->DCT_scaled_size = DCTSIZE;
    /* Size in DCT blocks */
    compptr->width_in_blocks = (JDIMENSION)
      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
		    (long) (cinfo->max_h_samp_factor * DCTSIZE));
    compptr->height_in_blocks = (JDIMENSION)
      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
		    (long) (cinfo->max_v_samp_factor * DCTSIZE));
    /* Size in samples */
    compptr->downsampled_width = (JDIMENSION)
      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
		    (long) cinfo->max_h_samp_factor);
    compptr->downsampled_height = (JDIMENSION)
      jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor,
		    (long) cinfo->max_v_samp_factor);
    /* Mark component needed (this flag isn't actually used for compression) */
    compptr->component_needed = TRUE;
  }

  /* Compute number of fully interleaved MCU rows (number of times that
   * main controller will call coefficient controller).
   */
  cinfo->total_iMCU_rows = (JDIMENSION)
    jdiv_round_up((long) cinfo->image_height,
		  (long) (cinfo->max_v_samp_factor*DCTSIZE));
}


#ifdef C_MULTISCAN_FILES_SUPPORTED

LOCAL(void)
validate_script (j_compress_ptr cinfo)
/* Verify that the scan script in cinfo->scan_info[] is valid; also
 * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.
 */
{
  const jpeg_scan_info * scanptr;
  int scanno, ncomps, ci, coefi, thisi;
  int Ss, Se, Ah, Al;
  boolean component_sent[MAX_COMPONENTS];
#ifdef C_PROGRESSIVE_SUPPORTED
  int * last_bitpos_ptr;
  int last_bitpos[MAX_COMPONENTS][DCTSIZE2];
  /* -1 until that coefficient has been seen; then last Al for it */
#endif

  if (cinfo->num_scans <= 0)
    ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0);

  /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1;
   * for progressive JPEG, no scan can have this.
   */
  scanptr = cinfo->scan_info;
  if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) {
#ifdef C_PROGRESSIVE_SUPPORTED
    cinfo->progressive_mode = TRUE;
    last_bitpos_ptr = & last_bitpos[0][0];
    for (ci = 0; ci < cinfo->num_components; ci++) 
      for (coefi = 0; coefi < DCTSIZE2; coefi++)
	*last_bitpos_ptr++ = -1;
#else
    ERREXIT(cinfo, JERR_NOT_COMPILED);
#endif
  } else {
    cinfo->progressive_mode = FALSE;
    for (ci = 0; ci < cinfo->num_components; ci++) 
      component_sent[ci] = FALSE;
  }

  for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) {
    /* Validate component indexes */
    ncomps = scanptr->comps_in_scan;
    if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN)
      ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN);
    for (ci = 0; ci < ncomps; ci++) {
      thisi = scanptr->component_index[ci];
      if (thisi < 0 || thisi >= cinfo->num_components)
	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
      /* Components must appear in SOF order within each scan */
      if (ci > 0 && thisi <= scanptr->component_index[ci-1])
	ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
    }
    /* Validate progression parameters */
    Ss = scanptr->Ss;
    Se = scanptr->Se;
    Ah = scanptr->Ah;
    Al = scanptr->Al;
    if (cinfo->progressive_mode) {
#ifdef C_PROGRESSIVE_SUPPORTED
      if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 ||
	  Ah < 0 || Ah > 13 || Al < 0 || Al > 13)
	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
      if (Ss == 0) {
	if (Se != 0)		/* DC and AC together not OK */
	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
      } else {
	if (ncomps != 1)	/* AC scans must be for only one component */
	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
      }
      for (ci = 0; ci < ncomps; ci++) {
	last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0];
	if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */
	  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
	for (coefi = Ss; coefi <= Se; coefi++) {
	  if (last_bitpos_ptr[coefi] < 0) {
	    /* first scan of this coefficient */
	    if (Ah != 0)
	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
	  } else {
	    /* not first scan */
	    if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1)
	      ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
	  }
	  last_bitpos_ptr[coefi] = Al;
	}
      }
#endif
    } else {
      /* For sequential JPEG, all progression parameters must be these: */
      if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
	ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);
      /* Make sure components are not sent twice */
      for (ci = 0; ci < ncomps; ci++) {
	thisi = scanptr->component_index[ci];
	if (component_sent[thisi])
	  ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno);
	component_sent[thisi] = TRUE;
      }
    }
  }

  /* Now verify that everything got sent. */
  if (cinfo->progressive_mode) {
#ifdef C_PROGRESSIVE_SUPPORTED
    /* For progressive mode, we only check that at least some DC data
     * got sent for each component; the spec does not require that all bits
     * of all coefficients be transmitted.  Would it be wiser to enforce
     * transmission of all coefficient bits??
     */
    for (ci = 0; ci < cinfo->num_components; ci++) {
      if (last_bitpos[ci][0] < 0)
	ERREXIT(cinfo, JERR_MISSING_DATA);
    }
#endif
  } else {
    for (ci = 0; ci < cinfo->num_components; ci++) {
      if (! component_sent[ci])
	ERREXIT(cinfo, JERR_MISSING_DATA);
    }
  }
}

#endif /* C_MULTISCAN_FILES_SUPPORTED */


LOCAL(void)
select_scan_parameters (j_compress_ptr cinfo)
/* Set up the scan parameters for the current scan */
{
  int ci;

#ifdef C_MULTISCAN_FILES_SUPPORTED
  if (cinfo->scan_info != NULL) {
    /* Prepare for current scan --- the script is already validated */
    my_master_ptr master = (my_master_ptr) cinfo->master;
    const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number;

    cinfo->comps_in_scan = scanptr->comps_in_scan;
    for (ci = 0; ci < scanptr->comps_in_scan; ci++) {
      cinfo->cur_comp_info[ci] =
	&cinfo->comp_info[scanptr->component_index[ci]];
    }
    cinfo->Ss = scanptr->Ss;
    cinfo->Se = scanptr->Se;
    cinfo->Ah = scanptr->Ah;
    cinfo->Al = scanptr->Al;
  }
  else
#endif
  {
    /* Prepare for single sequential-JPEG scan containing all components */
    if (cinfo->num_components > MAX_COMPS_IN_SCAN)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
岛国一区二区在线观看| 精品欧美乱码久久久久久| 精品久久久久一区| 婷婷国产v国产偷v亚洲高清| 国产69精品一区二区亚洲孕妇| 欧美一级在线视频| 日韩av一区二区在线影视| 91成人看片片| 亚洲精品国产第一综合99久久| 亚洲一二三专区| 色偷偷成人一区二区三区91 | 日韩一区二区影院| 日韩成人av影视| 91精品中文字幕一区二区三区| 亚洲国产成人精品视频| 欧美色综合久久| 性欧美大战久久久久久久久| 欧美日韩精品一区二区三区| 综合久久综合久久| 亚洲人成在线观看一区二区| 国产一区 二区 三区一级| 成人免费精品视频| 亚洲私人影院在线观看| 欧美少妇性性性| 懂色av中文一区二区三区| 99久久精品国产导航| 中文字幕一区日韩精品欧美| 精品久久久久久久人人人人传媒| 国产一区视频导航| 一区二区三区.www| 6080午夜不卡| 国产成人aaa| 亚洲一区二区欧美| 日韩精品一区二区三区在线播放 | 亚洲国产精品嫩草影院| 久久精品国产精品青草| 日本在线不卡视频一二三区| 精品国产一区二区精华| 日韩专区欧美专区| 2023国产一二三区日本精品2022| 久久天天做天天爱综合色| 欧美人狂配大交3d怪物一区| 亚洲在线成人精品| 91免费在线视频观看| 亚洲福中文字幕伊人影院| 欧美高清hd18日本| 久久99热99| 国产午夜久久久久| 国产精品亚洲专一区二区三区 | 日韩一级成人av| 国产成人午夜视频| 首页欧美精品中文字幕| 久久久久久亚洲综合| 欧美精品自拍偷拍| 国产麻豆成人精品| 专区另类欧美日韩| 欧美在线你懂的| 裸体歌舞表演一区二区| 欧美日韩国产综合一区二区三区| 欧美激情一区二区三区四区| 欧美性欧美巨大黑白大战| 麻豆精品精品国产自在97香蕉 | 欧美三级中文字幕| 国产老妇另类xxxxx| 一区二区三区不卡视频在线观看| 久久亚洲综合色| 欧美日韩精品一区二区天天拍小说| 精品一区二区日韩| 亚洲激情一二三区| 亚洲欧美怡红院| 欧美极品aⅴ影院| 欧美精彩视频一区二区三区| 欧美va日韩va| 精品国产乱码久久久久久久 | 91捆绑美女网站| 国产最新精品免费| 椎名由奈av一区二区三区| 日本道色综合久久| 成人美女视频在线看| 激情综合亚洲精品| av不卡在线播放| 日韩中文字幕麻豆| 国产乱码精品一区二区三| 99视频有精品| 欧美一级夜夜爽| 国产精品久久久久影院亚瑟| 亚洲成av人**亚洲成av**| 狠狠色丁香久久婷婷综合丁香| 99久久精品国产毛片| 69堂亚洲精品首页| 亚洲欧洲一区二区在线播放| 婷婷综合久久一区二区三区| 国产传媒一区在线| 欧美美女一区二区| 国产精品每日更新| 美女视频黄免费的久久 | 亚洲一区二区在线观看视频 | 亚洲电影在线免费观看| 国产精品一区二区黑丝| 欧美日本一道本| 成人欧美一区二区三区在线播放| 免费在线观看精品| 在线观看不卡视频| 亚洲国产精品v| 美女视频黄久久| 欧美三级韩国三级日本三斤| 国产精品三级av| 国产专区欧美精品| 91精品午夜视频| 国产自产v一区二区三区c| 欧美在线观看视频在线| 中文字幕欧美日韩一区| 麻豆精品在线观看| 欧美二区三区的天堂| 亚洲卡通欧美制服中文| 成人开心网精品视频| 精品国产人成亚洲区| 日本中文字幕一区| 欧美色区777第一页| 亚洲色图制服诱惑| 成人免费视频免费观看| 国产色91在线| 国内一区二区视频| 日韩欧美黄色影院| 蜜桃av一区二区三区电影| 欧美日韩国产首页| 久久99精品网久久| 91在线视频在线| 欧美一区二区三区在线观看| 亚洲最新视频在线观看| 99久久久久久99| 国产欧美日产一区| 亚洲一区视频在线观看视频| 最新国产精品久久精品| 国产精品美女久久久久aⅴ| 日本一区二区三区国色天香| 欧美三级三级三级爽爽爽| 另类小说图片综合网| 亚洲综合丝袜美腿| 亚洲欧美色一区| 国产日韩欧美一区二区三区乱码| 国产精品自产自拍| 久久久午夜精品理论片中文字幕| 国产69精品久久99不卡| 日韩中文字幕区一区有砖一区| 91福利视频网站| 亚洲视频在线观看三级| 在线91免费看| 在线视频观看一区| 美脚の诱脚舐め脚责91| 国产成人精品aa毛片| 欧美性生活影院| 欧美成人aa大片| 4438x成人网最大色成网站| 99久久国产综合色|国产精品| 日本欧美一区二区三区乱码| 国产精品久久久久久久久快鸭| 日韩午夜电影av| 在线电影院国产精品| 91在线视频官网| 久久久久久黄色| 久久成人免费网站| 国产精品一级在线| 欧美精品 日韩| 激情五月婷婷综合| 国产精品久久久久永久免费观看| 91美女片黄在线观看| 婷婷六月综合亚洲| 久久亚区不卡日本| 91在线免费看| 日韩精品一级中文字幕精品视频免费观看 | 亚洲123区在线观看| 国产精品免费看片| 中文字幕av不卡| 中文字幕一区在线| 亚洲乱码国产乱码精品精的特点 | 亚洲一区二区三区中文字幕 | 色婷婷综合久久久久中文| 国产激情91久久精品导航| 精品一区二区在线视频| 韩国午夜理伦三级不卡影院| 粉嫩13p一区二区三区| 国产成人高清在线| 在线免费精品视频| 国产a区久久久| 高清av一区二区| 国产91精品一区二区麻豆亚洲| 蜜臀a∨国产成人精品| 麻豆精品视频在线观看| 欧美猛男gaygay网站| 久久99国产精品久久99果冻传媒| 欧美久久久久久久久久| 国产欧美日韩不卡免费| 色偷偷久久一区二区三区| 精品中文字幕一区二区| 亚洲最大成人网4388xx| 久久精品欧美一区二区三区不卡| 欧美日韩一二三| 不卡一二三区首页| 久久91精品国产91久久小草|