jdct.h

Go to the documentation of this file.
00001 /*
00002  * jdct.h
00003  *
00004  * Copyright (C) 1994-1996, Thomas G. Lane.
00005  * This file is part of the Independent JPEG Group's software.
00006  * For conditions of distribution and use, see the accompanying README file.
00007  *
00008  * This include file contains common declarations for the forward and
00009  * inverse DCT modules.  These declarations are private to the DCT managers
00010  * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
00011  * The individual DCT algorithms are kept in separate files to ease 
00012  * machine-dependent tuning (e.g., assembly coding).
00013  */
00014 
00015 
00016 /*
00017  * A forward DCT routine is given a pointer to an input sample array and
00018  * a pointer to a work area of type DCTELEM[]; the DCT is to be performed
00019  * in-place in that buffer.  Type DCTELEM is int for 8-bit samples, INT32
00020  * for 12-bit samples.  (NOTE: Floating-point DCT implementations use an
00021  * array of type FAST_FLOAT, instead.)
00022  * The input data is to be fetched from the sample array starting at a
00023  * specified column.  (Any row offset needed will be applied to the array
00024  * pointer before it is passed to the FDCT code.)
00025  * Note that the number of samples fetched by the FDCT routine is
00026  * DCT_h_scaled_size * DCT_v_scaled_size.
00027  * The DCT outputs are returned scaled up by a factor of 8; they therefore
00028  * have a range of +-8K for 8-bit data, +-128K for 12-bit data.  This
00029  * convention improves accuracy in integer implementations and saves some
00030  * work in floating-point ones.
00031  * Quantization of the output coefficients is done by jcdctmgr.c.
00032  */
00033 
00034 #if BITS_IN_JSAMPLE == 8
00035 typedef int DCTELEM;            /* 16 or 32 bits is fine */
00036 #else
00037 typedef INT32 DCTELEM;          /* must have 32 bits */
00038 #endif
00039 
00040 typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data,
00041                                                JSAMPARRAY sample_data,
00042                                                JDIMENSION start_col));
00043 typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data,
00044                                              JSAMPARRAY sample_data,
00045                                              JDIMENSION start_col));
00046 
00047 
00048 /*
00049  * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer
00050  * to an output sample array.  The routine must dequantize the input data as
00051  * well as perform the IDCT; for dequantization, it uses the multiplier table
00052  * pointed to by compptr->dct_table.  The output data is to be placed into the
00053  * sample array starting at a specified column.  (Any row offset needed will
00054  * be applied to the array pointer before it is passed to the IDCT code.)
00055  * Note that the number of samples emitted by the IDCT routine is
00056  * DCT_h_scaled_size * DCT_v_scaled_size.
00057  */
00058 
00059 /* typedef inverse_DCT_method_ptr is declared in jpegint.h */
00060 
00061 /*
00062  * Each IDCT routine has its own ideas about the best dct_table element type.
00063  */
00064 
00065 typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
00066 #if BITS_IN_JSAMPLE == 8
00067 typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
00068 #define IFAST_SCALE_BITS  2     /* fractional bits in scale factors */
00069 #else
00070 typedef INT32 IFAST_MULT_TYPE;  /* need 32 bits for scaled quantizers */
00071 #define IFAST_SCALE_BITS  13    /* fractional bits in scale factors */
00072 #endif
00073 typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
00074 
00075 
00076 /*
00077  * Each IDCT routine is responsible for range-limiting its results and
00078  * converting them to unsigned form (0..MAXJSAMPLE).  The raw outputs could
00079  * be quite far out of range if the input data is corrupt, so a bulletproof
00080  * range-limiting step is required.  We use a mask-and-table-lookup method
00081  * to do the combined operations quickly.  See the comments with
00082  * prepare_range_limit_table (in jdmaster.c) for more info.
00083  */
00084 
00085 #define IDCT_range_limit(cinfo)  ((cinfo)->sample_range_limit + CENTERJSAMPLE)
00086 
00087 #define RANGE_MASK  (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */
00088 
00089 
00090 /* Short forms of external names for systems with brain-damaged linkers. */
00091 
00092 #ifdef NEED_SHORT_EXTERNAL_NAMES
00093 #define jpeg_fdct_islow         jFDislow
00094 #define jpeg_fdct_ifast         jFDifast
00095 #define jpeg_fdct_float         jFDfloat
00096 #define jpeg_fdct_7x7           jFD7x7
00097 #define jpeg_fdct_6x6           jFD6x6
00098 #define jpeg_fdct_5x5           jFD5x5
00099 #define jpeg_fdct_4x4           jFD4x4
00100 #define jpeg_fdct_3x3           jFD3x3
00101 #define jpeg_fdct_2x2           jFD2x2
00102 #define jpeg_fdct_1x1           jFD1x1
00103 #define jpeg_fdct_9x9           jFD9x9
00104 #define jpeg_fdct_10x10         jFD10x10
00105 #define jpeg_fdct_11x11         jFD11x11
00106 #define jpeg_fdct_12x12         jFD12x12
00107 #define jpeg_fdct_13x13         jFD13x13
00108 #define jpeg_fdct_14x14         jFD14x14
00109 #define jpeg_fdct_15x15         jFD15x15
00110 #define jpeg_fdct_16x16         jFD16x16
00111 #define jpeg_fdct_16x8          jFD16x8
00112 #define jpeg_fdct_14x7          jFD14x7
00113 #define jpeg_fdct_12x6          jFD12x6
00114 #define jpeg_fdct_10x5          jFD10x5
00115 #define jpeg_fdct_8x4           jFD8x4
00116 #define jpeg_fdct_6x3           jFD6x3
00117 #define jpeg_fdct_4x2           jFD4x2
00118 #define jpeg_fdct_2x1           jFD2x1
00119 #define jpeg_fdct_8x16          jFD8x16
00120 #define jpeg_fdct_7x14          jFD7x14
00121 #define jpeg_fdct_6x12          jFD6x12
00122 #define jpeg_fdct_5x10          jFD5x10
00123 #define jpeg_fdct_4x8           jFD4x8
00124 #define jpeg_fdct_3x6           jFD3x6
00125 #define jpeg_fdct_2x4           jFD2x4
00126 #define jpeg_fdct_1x2           jFD1x2
00127 #define jpeg_idct_islow         jRDislow
00128 #define jpeg_idct_ifast         jRDifast
00129 #define jpeg_idct_float         jRDfloat
00130 #define jpeg_idct_7x7           jRD7x7
00131 #define jpeg_idct_6x6           jRD6x6
00132 #define jpeg_idct_5x5           jRD5x5
00133 #define jpeg_idct_4x4           jRD4x4
00134 #define jpeg_idct_3x3           jRD3x3
00135 #define jpeg_idct_2x2           jRD2x2
00136 #define jpeg_idct_1x1           jRD1x1
00137 #define jpeg_idct_9x9           jRD9x9
00138 #define jpeg_idct_10x10         jRD10x10
00139 #define jpeg_idct_11x11         jRD11x11
00140 #define jpeg_idct_12x12         jRD12x12
00141 #define jpeg_idct_13x13         jRD13x13
00142 #define jpeg_idct_14x14         jRD14x14
00143 #define jpeg_idct_15x15         jRD15x15
00144 #define jpeg_idct_16x16         jRD16x16
00145 #define jpeg_idct_16x8          jRD16x8
00146 #define jpeg_idct_14x7          jRD14x7
00147 #define jpeg_idct_12x6          jRD12x6
00148 #define jpeg_idct_10x5          jRD10x5
00149 #define jpeg_idct_8x4           jRD8x4
00150 #define jpeg_idct_6x3           jRD6x3
00151 #define jpeg_idct_4x2           jRD4x2
00152 #define jpeg_idct_2x1           jRD2x1
00153 #define jpeg_idct_8x16          jRD8x16
00154 #define jpeg_idct_7x14          jRD7x14
00155 #define jpeg_idct_6x12          jRD6x12
00156 #define jpeg_idct_5x10          jRD5x10
00157 #define jpeg_idct_4x8           jRD4x8
00158 #define jpeg_idct_3x6           jRD3x8
00159 #define jpeg_idct_2x4           jRD2x4
00160 #define jpeg_idct_1x2           jRD1x2
00161 #endif /* NEED_SHORT_EXTERNAL_NAMES */
00162 
00163 /* Extern declarations for the forward and inverse DCT routines. */
00164 
00165 EXTERN(void) jpeg_fdct_islow
00166     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00167 EXTERN(void) jpeg_fdct_ifast
00168     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00169 EXTERN(void) jpeg_fdct_float
00170     JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00171 EXTERN(void) jpeg_fdct_7x7
00172     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00173 EXTERN(void) jpeg_fdct_6x6
00174     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00175 EXTERN(void) jpeg_fdct_5x5
00176     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00177 EXTERN(void) jpeg_fdct_4x4
00178     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00179 EXTERN(void) jpeg_fdct_3x3
00180     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00181 EXTERN(void) jpeg_fdct_2x2
00182     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00183 EXTERN(void) jpeg_fdct_1x1
00184     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00185 EXTERN(void) jpeg_fdct_9x9
00186     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00187 EXTERN(void) jpeg_fdct_10x10
00188     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00189 EXTERN(void) jpeg_fdct_11x11
00190     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00191 EXTERN(void) jpeg_fdct_12x12
00192     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00193 EXTERN(void) jpeg_fdct_13x13
00194     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00195 EXTERN(void) jpeg_fdct_14x14
00196     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00197 EXTERN(void) jpeg_fdct_15x15
00198     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00199 EXTERN(void) jpeg_fdct_16x16
00200     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00201 EXTERN(void) jpeg_fdct_16x8
00202     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00203 EXTERN(void) jpeg_fdct_14x7
00204     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00205 EXTERN(void) jpeg_fdct_12x6
00206     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00207 EXTERN(void) jpeg_fdct_10x5
00208     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00209 EXTERN(void) jpeg_fdct_8x4
00210     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00211 EXTERN(void) jpeg_fdct_6x3
00212     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00213 EXTERN(void) jpeg_fdct_4x2
00214     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00215 EXTERN(void) jpeg_fdct_2x1
00216     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00217 EXTERN(void) jpeg_fdct_8x16
00218     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00219 EXTERN(void) jpeg_fdct_7x14
00220     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00221 EXTERN(void) jpeg_fdct_6x12
00222     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00223 EXTERN(void) jpeg_fdct_5x10
00224     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00225 EXTERN(void) jpeg_fdct_4x8
00226     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00227 EXTERN(void) jpeg_fdct_3x6
00228     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00229 EXTERN(void) jpeg_fdct_2x4
00230     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00231 EXTERN(void) jpeg_fdct_1x2
00232     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
00233 
00234 EXTERN(void) jpeg_idct_islow
00235     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00236          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00237 EXTERN(void) jpeg_idct_ifast
00238     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00239          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00240 EXTERN(void) jpeg_idct_float
00241     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00242          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00243 EXTERN(void) jpeg_idct_7x7
00244     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00245          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00246 EXTERN(void) jpeg_idct_6x6
00247     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00248          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00249 EXTERN(void) jpeg_idct_5x5
00250     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00251          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00252 EXTERN(void) jpeg_idct_4x4
00253     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00254          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00255 EXTERN(void) jpeg_idct_3x3
00256     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00257          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00258 EXTERN(void) jpeg_idct_2x2
00259     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00260          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00261 EXTERN(void) jpeg_idct_1x1
00262     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00263          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00264 EXTERN(void) jpeg_idct_9x9
00265     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00266          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00267 EXTERN(void) jpeg_idct_10x10
00268     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00269          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00270 EXTERN(void) jpeg_idct_11x11
00271     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00272          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00273 EXTERN(void) jpeg_idct_12x12
00274     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00275          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00276 EXTERN(void) jpeg_idct_13x13
00277     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00278          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00279 EXTERN(void) jpeg_idct_14x14
00280     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00281          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00282 EXTERN(void) jpeg_idct_15x15
00283     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00284          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00285 EXTERN(void) jpeg_idct_16x16
00286     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00287          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00288 EXTERN(void) jpeg_idct_16x8
00289     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00290          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00291 EXTERN(void) jpeg_idct_14x7
00292     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00293          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00294 EXTERN(void) jpeg_idct_12x6
00295     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00296          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00297 EXTERN(void) jpeg_idct_10x5
00298     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00299          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00300 EXTERN(void) jpeg_idct_8x4
00301     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00302          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00303 EXTERN(void) jpeg_idct_6x3
00304     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00305          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00306 EXTERN(void) jpeg_idct_4x2
00307     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00308          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00309 EXTERN(void) jpeg_idct_2x1
00310     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00311          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00312 EXTERN(void) jpeg_idct_8x16
00313     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00314          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00315 EXTERN(void) jpeg_idct_7x14
00316     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00317          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00318 EXTERN(void) jpeg_idct_6x12
00319     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00320          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00321 EXTERN(void) jpeg_idct_5x10
00322     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00323          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00324 EXTERN(void) jpeg_idct_4x8
00325     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00326          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00327 EXTERN(void) jpeg_idct_3x6
00328     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00329          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00330 EXTERN(void) jpeg_idct_2x4
00331     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00332          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00333 EXTERN(void) jpeg_idct_1x2
00334     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
00335          JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
00336 
00337 
00338 /*
00339  * Macros for handling fixed-point arithmetic; these are used by many
00340  * but not all of the DCT/IDCT modules.
00341  *
00342  * All values are expected to be of type INT32.
00343  * Fractional constants are scaled left by CONST_BITS bits.
00344  * CONST_BITS is defined within each module using these macros,
00345  * and may differ from one module to the next.
00346  */
00347 
00348 #define ONE     ((INT32) 1)
00349 #define CONST_SCALE (ONE << CONST_BITS)
00350 
00351 /* Convert a positive real constant to an integer scaled by CONST_SCALE.
00352  * Caution: some C compilers fail to reduce "FIX(constant)" at compile time,
00353  * thus causing a lot of useless floating-point operations at run time.
00354  */
00355 
00356 #define FIX(x)  ((INT32) ((x) * CONST_SCALE + 0.5))
00357 
00358 /* Descale and correctly round an INT32 value that's scaled by N bits.
00359  * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
00360  * the fudge factor is correct for either sign of X.
00361  */
00362 
00363 #define DESCALE(x,n)  RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
00364 
00365 /* Multiply an INT32 variable by an INT32 constant to yield an INT32 result.
00366  * This macro is used only when the two inputs will actually be no more than
00367  * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
00368  * full 32x32 multiply.  This provides a useful speedup on many machines.
00369  * Unfortunately there is no way to specify a 16x16->32 multiply portably
00370  * in C, but some C compilers will do the right thing if you provide the
00371  * correct combination of casts.
00372  */
00373 
00374 #ifdef SHORTxSHORT_32           /* may work if 'int' is 32 bits */
00375 #define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT16) (const)))
00376 #endif
00377 #ifdef SHORTxLCONST_32          /* known to work with Microsoft C 6.0 */
00378 #define MULTIPLY16C16(var,const)  (((INT16) (var)) * ((INT32) (const)))
00379 #endif
00380 
00381 #ifndef MULTIPLY16C16           /* default definition */
00382 #define MULTIPLY16C16(var,const)  ((var) * (const))
00383 #endif
00384 
00385 /* Same except both inputs are variables. */
00386 
00387 #ifdef SHORTxSHORT_32           /* may work if 'int' is 32 bits */
00388 #define MULTIPLY16V16(var1,var2)  (((INT16) (var1)) * ((INT16) (var2)))
00389 #endif
00390 
00391 #ifndef MULTIPLY16V16           /* default definition */
00392 #define MULTIPLY16V16(var1,var2)  ((var1) * (var2))
00393 #endif

Generated on Tue Jul 5 14:13:28 2011 for ROOT_528-00b_version by  doxygen 1.5.1