Changeset 846 for trunk/src/3rdparty/libjpeg/jpeglib.h
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/libjpeg/jpeglib.h
r2 r846 3 3 * 4 4 * Copyright (C) 1991-1998, Thomas G. Lane. 5 * Modified 2002-2009 by Guido Vollbeding. 5 6 * This file is part of the Independent JPEG Group's software. 6 7 * For conditions of distribution and use, see the accompanying README file. … … 27 28 28 29 30 #ifdef __cplusplus 31 #ifndef DONT_USE_EXTERN_C 32 extern "C" { 33 #endif 34 #endif 35 29 36 /* 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 */ 34 41 35 42 … … 139 146 JDIMENSION width_in_blocks; 140 147 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 different145 * 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; 148 155 /* The downsampled dimensions are the component's actual, unpadded number 149 * of samples at the main buffer (preprocessing/compression interface) , thus150 * downsampled_width = ceil(image_width * Hi/Hmax)151 * and similarly for height. For decompression, IDCT scaling is included, so152 * 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. 153 160 */ 154 161 JDIMENSION downsampled_width; /* actual width in samples */ … … 165 172 int MCU_height; /* number of blocks per MCU, vertically */ 166 173 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 */ 168 175 int last_col_width; /* # of non-dummy blocks across in last MCU */ 169 176 int last_row_height; /* # of non-dummy blocks down in last MCU */ … … 292 299 */ 293 300 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 294 312 int data_precision; /* bits of precision in image data */ 295 313 … … 299 317 jpeg_component_info * comp_info; 300 318 /* comp_info[i] describes component that appears i'th in SOF */ 301 319 302 320 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 305 326 JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; 306 327 JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; 307 328 /* ptrs to Huffman coding tables, or NULL if not defined */ 308 329 309 330 UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ 310 331 UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ … … 322 343 boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ 323 344 boolean CCIR601_sampling; /* TRUE=first samples are cosited */ 345 boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ 324 346 int smoothing_factor; /* 1..100, or 0 for no input smoothing */ 325 347 J_DCT_METHOD dct_method; /* DCT algorithm selector */ … … 365 387 int max_v_samp_factor; /* largest v_samp_factor */ 366 388 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 367 392 JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ 368 393 /* The coefficient controller receives data in units of MCU rows as defined … … 389 414 390 415 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 ) */ 391 420 392 421 /* … … 536 565 /* comp_info[i] describes component that appears i'th in SOF */ 537 566 567 boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ 538 568 boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ 539 569 boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ … … 576 606 int max_v_samp_factor; /* largest v_samp_factor */ 577 607 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 */ 579 610 580 611 JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ … … 584 615 * interleaved or not. We define an iMCU row as v_samp_factor DCT block 585 616 * 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. 587 618 */ 588 619 … … 607 638 608 639 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 */ 609 646 610 647 /* This field is shared between entropy decoder and marker parser. … … 837 874 #define jpeg_stdio_dest jStdDest 838 875 #define jpeg_stdio_src jStdSrc 876 #define jpeg_mem_dest jMemDest 877 #define jpeg_mem_src jMemSrc 839 878 #define jpeg_set_defaults jSetDefaults 840 879 #define jpeg_set_colorspace jSetColorspace … … 842 881 #define jpeg_set_quality jSetQuality 843 882 #define jpeg_set_linear_quality jSetLQuality 883 #define jpeg_default_qtables jDefQTables 844 884 #define jpeg_add_quant_table jAddQuantTable 845 885 #define jpeg_quality_scaling jQualityScaling … … 851 891 #define jpeg_write_scanlines jWrtScanlines 852 892 #define jpeg_finish_compress jFinCompress 893 #define jpeg_calc_jpeg_dimensions jCjpegDimensions 853 894 #define jpeg_write_raw_data jWrtRawData 854 895 #define jpeg_write_marker jWrtMarker … … 867 908 #define jpeg_new_colormap jNewCMap 868 909 #define jpeg_consume_input jConsumeInput 910 #define jpeg_core_output_dimensions jCoreDimensions 869 911 #define jpeg_calc_output_dimensions jCalcDimensions 870 912 #define jpeg_save_markers jSaveMarkers … … 911 953 EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); 912 954 955 /* Data source and destination managers: memory buffers. */ 956 EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, 957 unsigned char ** outbuffer, 958 unsigned long * outsize)); 959 EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, 960 unsigned char * inbuffer, 961 unsigned long insize)); 962 913 963 /* Default parameter setup for compression */ 914 964 EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); … … 922 972 int scale_factor, 923 973 boolean force_baseline)); 974 EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, 975 boolean force_baseline)); 924 976 EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, 925 977 const unsigned int *basic_table, … … 941 993 EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); 942 994 995 /* Precalculate JPEG dimensions for current compression parameters. */ 996 EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); 997 943 998 /* Replaces jpeg_write_scanlines when writing raw downsampled data. */ 944 999 EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, … … 946 1001 JDIMENSION num_lines)); 947 1002 948 /* Write a special marker. See libjpeg. docconcerning safe usage. */1003 /* Write a special marker. See libjpeg.txt concerning safe usage. */ 949 1004 EXTERN(void) jpeg_write_marker 950 1005 JPP((j_compress_ptr cinfo, int marker, … … 1000 1055 1001 1056 /* Precalculate output dimensions for current decompression parameters. */ 1057 EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); 1002 1058 EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); 1003 1059 … … 1094 1150 #endif 1095 1151 1152 #ifdef __cplusplus 1153 #ifndef DONT_USE_EXTERN_C 1154 } 1155 #endif 1156 #endif 1157 1096 1158 #endif /* JPEGLIB_H */
Note:
See TracChangeset
for help on using the changeset viewer.