Ignore:
Timestamp:
Jan 4, 2010, 8:20:18 PM (12 years ago)
Author:
rbri
Message:

JPEG plugin: libjpeg updated to version 7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libjpeg/jpeglib.h

    r15 r283  
    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 >= 70".
     38 */
     39
     40#define JPEG_LIB_VERSION  70    /* Version 7.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 */
     
    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
     
    576601  int max_v_samp_factor;        /* largest v_samp_factor */
    577602
    578   int min_DCT_scaled_size;      /* smallest DCT_scaled_size of any component */
     603  int min_DCT_h_scaled_size;    /* smallest DCT_h_scaled_size of any component */
     604  int min_DCT_v_scaled_size;    /* smallest DCT_v_scaled_size of any component */
    579605
    580606  JDIMENSION total_iMCU_rows;   /* # of iMCU rows in image */
     
    584610   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block
    585611   * rows of each component.  Therefore, the IDCT output contains
    586    * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row.
     612   * v_samp_factor*DCT_v_scaled_size sample rows of a component per iMCU row.
    587613   */
    588614
     
    842868#define jpeg_set_quality        jSetQuality
    843869#define jpeg_set_linear_quality jSetLQuality
     870#define jpeg_default_qtables    jDefQTables
    844871#define jpeg_add_quant_table    jAddQuantTable
    845872#define jpeg_quality_scaling    jQualityScaling
     
    851878#define jpeg_write_scanlines    jWrtScanlines
    852879#define jpeg_finish_compress    jFinCompress
     880#define jpeg_calc_jpeg_dimensions       jCjpegDimensions
    853881#define jpeg_write_raw_data     jWrtRawData
    854882#define jpeg_write_marker       jWrtMarker
     
    880908#endif /* NEED_SHORT_EXTERNAL_NAMES */
    881909
    882 #ifdef __cplusplus
    883 extern "C" {
    884 #endif
    885910
    886911/* Default error-management setup */
     
    925950                                          int scale_factor,
    926951                                          boolean force_baseline));
     952EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
     953                                       boolean force_baseline));
    927954EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
    928955                                       const unsigned int *basic_table,
     
    944971EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
    945972
     973/* Precalculate JPEG dimensions for current compression parameters. */
     974EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
     975
    946976/* Replaces jpeg_write_scanlines when writing raw downsampled data. */
    947977EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
     
    949979                                            JDIMENSION num_lines));
    950980
    951 /* Write a special marker.  See libjpeg.doc concerning safe usage. */
     981/* Write a special marker.  See libjpeg.txt concerning safe usage. */
    952982EXTERN(void) jpeg_write_marker
    953983        JPP((j_compress_ptr cinfo, int marker,
     
    10411071                                            int desired));
    10421072
    1043 #ifdef __cplusplus
    1044 }
    1045 #endif
    10461073
    10471074/* These marker codes are exported since applications and data source modules
     
    11001127#endif
    11011128
     1129#ifdef __cplusplus
     1130#ifndef DONT_USE_EXTERN_C
     1131}
     1132#endif
     1133#endif
     1134
    11021135#endif /* JPEGLIB_H */
Note: See TracChangeset for help on using the changeset viewer.