Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/libjpeg/jpeglib.h

    r2 r846  
    33 *
    44 * Copyright (C) 1991-1998, Thomas G. Lane.
     5 * Modified 2002-2009 by Guido Vollbeding.
    56 * This file is part of the Independent JPEG Group's software.
    67 * For conditions of distribution and use, see the accompanying README file.
     
    2728
    2829
     30#ifdef __cplusplus
     31#ifndef DONT_USE_EXTERN_C
     32extern "C" {
     33#endif
     34#endif
     35
    2936/* Version ID for the JPEG library.
    30  * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
    31  */
    32 
    33 #define JPEG_LIB_VERSION  62    /* Version 6b */
     37 * Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
     38 */
     39
     40#define JPEG_LIB_VERSION  80    /* Version 8.0 */
    3441
    3542
     
    139146  JDIMENSION width_in_blocks;
    140147  JDIMENSION height_in_blocks;
    141   /* Size of a DCT block in samples.  Always DCTSIZE for compression.
    142    * For decompression this is the size of the output from one DCT block,
    143    * reflecting any scaling we choose to apply during the IDCT step.
    144    * Values of 1,2,4,8 are likely to be supported.  Note that different
    145    * components may receive different IDCT scalings.
    146    */
    147   int DCT_scaled_size;
     148  /* Size of a DCT block in samples,
     149   * reflecting any scaling we choose to apply during the DCT step.
     150   * Values from 1 to 16 are supported.
     151   * Note that different components may receive different DCT scalings.
     152   */
     153  int DCT_h_scaled_size;
     154  int DCT_v_scaled_size;
    148155  /* The downsampled dimensions are the component's actual, unpadded number
    149    * of samples at the main buffer (preprocessing/compression interface), thus
    150    * downsampled_width = ceil(image_width * Hi/Hmax)
    151    * and similarly for height.  For decompression, IDCT scaling is included, so
    152    * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE)
     156   * of samples at the main buffer (preprocessing/compression interface);
     157   * DCT scaling is included, so
     158   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_h_scaled_size/DCTSIZE)
     159   * and similarly for height.
    153160   */
    154161  JDIMENSION downsampled_width;  /* actual width in samples */
     
    165172  int MCU_height;               /* number of blocks per MCU, vertically */
    166173  int MCU_blocks;               /* MCU_width * MCU_height */
    167   int MCU_sample_width;         /* MCU width in samples, MCU_width*DCT_scaled_size */
     174  int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */
    168175  int last_col_width;           /* # of non-dummy blocks across in last MCU */
    169176  int last_row_height;          /* # of non-dummy blocks down in last MCU */
     
    292299   */
    293300
     301  unsigned int scale_num, scale_denom; /* fraction by which to scale image */
     302
     303  JDIMENSION jpeg_width;        /* scaled JPEG image width */
     304  JDIMENSION jpeg_height;       /* scaled JPEG image height */
     305  /* Dimensions of actual JPEG image that will be written to file,
     306   * derived from input dimensions by scaling factors above.
     307   * These fields are computed by jpeg_start_compress().
     308   * You can also use jpeg_calc_jpeg_dimensions() to determine these values
     309   * in advance of calling jpeg_start_compress().
     310   */
     311
    294312  int data_precision;           /* bits of precision in image data */
    295313
     
    299317  jpeg_component_info * comp_info;
    300318  /* comp_info[i] describes component that appears i'th in SOF */
    301  
     319
    302320  JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS];
    303   /* ptrs to coefficient quantization tables, or NULL if not defined */
    304  
     321  int q_scale_factor[NUM_QUANT_TBLS];
     322  /* ptrs to coefficient quantization tables, or NULL if not defined,
     323   * and corresponding scale factors (percentage, initialized 100).
     324   */
     325
    305326  JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS];
    306327  JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS];
    307328  /* ptrs to Huffman coding tables, or NULL if not defined */
    308  
     329
    309330  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
    310331  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
     
    322343  boolean optimize_coding;      /* TRUE=optimize entropy encoding parms */
    323344  boolean CCIR601_sampling;     /* TRUE=first samples are cosited */
     345  boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */
    324346  int smoothing_factor;         /* 1..100, or 0 for no input smoothing */
    325347  J_DCT_METHOD dct_method;      /* DCT algorithm selector */
     
    365387  int max_v_samp_factor;        /* largest v_samp_factor */
    366388
     389  int min_DCT_h_scaled_size;    /* smallest DCT_h_scaled_size of any component */
     390  int min_DCT_v_scaled_size;    /* smallest DCT_v_scaled_size of any component */
     391
    367392  JDIMENSION total_iMCU_rows;   /* # of iMCU rows to be input to coef ctlr */
    368393  /* The coefficient controller receives data in units of MCU rows as defined
     
    389414
    390415  int Ss, Se, Ah, Al;           /* progressive JPEG parameters for scan */
     416
     417  int block_size;               /* the basic DCT block size: 1..16 */
     418  const int * natural_order;    /* natural-order position array */
     419  int lim_Se;                   /* min( Se, DCTSIZE2-1 ) */
    391420
    392421  /*
     
    536565  /* comp_info[i] describes component that appears i'th in SOF */
    537566
     567  boolean is_baseline;          /* TRUE if Baseline SOF0 encountered */
    538568  boolean progressive_mode;     /* TRUE if SOFn specifies progressive mode */
    539569  boolean arith_code;           /* TRUE=arithmetic coding, FALSE=Huffman */
     
    576606  int max_v_samp_factor;        /* largest v_samp_factor */
    577607
    578   int min_DCT_scaled_size;      /* smallest DCT_scaled_size of any component */
     608  int min_DCT_h_scaled_size;    /* smallest DCT_h_scaled_size of any component */
     609  int min_DCT_v_scaled_size;    /* smallest DCT_v_scaled_size of any component */
    579610
    580611  JDIMENSION total_iMCU_rows;   /* # of iMCU rows in image */
     
    584615   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
    585616   * rows of each component.  Therefore, the IDCT output contains
    586    * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
     617   * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
    587618   */
    588619
     
    607638
    608639  int Ss, Se, Ah, Al;           /* progressive JPEG parameters for scan */
     640
     641  /* These fields are derived from Se of first SOS marker.
     642   */
     643  int block_size;               /* the basic DCT block size: 1..16 */
     644  const int * natural_order; /* natural-order position array for entropy decode */
     645  int lim_Se;                   /* min( Se, DCTSIZE2-1 ) for entropy decode */
    609646
    610647  /* This field is shared between entropy decoder and marker parser.
     
    837874#define jpeg_stdio_dest         jStdDest
    838875#define jpeg_stdio_src          jStdSrc
     876#define jpeg_mem_dest           jMemDest
     877#define jpeg_mem_src            jMemSrc
    839878#define jpeg_set_defaults       jSetDefaults
    840879#define jpeg_set_colorspace     jSetColorspace
     
    842881#define jpeg_set_quality        jSetQuality
    843882#define jpeg_set_linear_quality jSetLQuality
     883#define jpeg_default_qtables    jDefQTables
    844884#define jpeg_add_quant_table    jAddQuantTable
    845885#define jpeg_quality_scaling    jQualityScaling
     
    851891#define jpeg_write_scanlines    jWrtScanlines
    852892#define jpeg_finish_compress    jFinCompress
     893#define jpeg_calc_jpeg_dimensions       jCjpegDimensions
    853894#define jpeg_write_raw_data     jWrtRawData
    854895#define jpeg_write_marker       jWrtMarker
     
    867908#define jpeg_new_colormap       jNewCMap
    868909#define jpeg_consume_input      jConsumeInput
     910#define jpeg_core_output_dimensions     jCoreDimensions
    869911#define jpeg_calc_output_dimensions     jCalcDimensions
    870912#define jpeg_save_markers       jSaveMarkers
     
    911953EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
    912954
     955/* Data source and destination managers: memory buffers. */
     956EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
     957                               unsigned char ** outbuffer,
     958                               unsigned long * outsize));
     959EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
     960                              unsigned char * inbuffer,
     961                              unsigned long insize));
     962
    913963/* Default parameter setup for compression */
    914964EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
     
    922972                                          int scale_factor,
    923973                                          boolean force_baseline));
     974EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
     975                                       boolean force_baseline));
    924976EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
    925977                                       const unsigned int *basic_table,
     
    941993EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
    942994
     995/* Precalculate JPEG dimensions for current compression parameters. */
     996EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
     997
    943998/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
    944999EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
     
    9461001                                            JDIMENSION num_lines));
    9471002
    948 /* Write a special marker.  See libjpeg.doc concerning safe usage. */
     1003/* Write a special marker.  See libjpeg.txt concerning safe usage. */
    9491004EXTERN(void) jpeg_write_marker
    9501005        JPP((j_compress_ptr cinfo, int marker,
     
    10001055
    10011056/* Precalculate output dimensions for current decompression parameters. */
     1057EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
    10021058EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
    10031059
     
    10941150#endif
    10951151
     1152#ifdef __cplusplus
     1153#ifndef DONT_USE_EXTERN_C
     1154}
     1155#endif
     1156#endif
     1157
    10961158#endif /* JPEGLIB_H */
Note: See TracChangeset for help on using the changeset viewer.