0N/A * reserved comment block 0N/A * DO NOT REMOVE OR ALTER! 0N/A * Copyright (C) 1994-1996, Thomas G. Lane. 0N/A * This file is part of the Independent JPEG Group's software. 0N/A * For conditions of distribution and use, see the accompanying README file. 0N/A * This include file contains common declarations for the forward and 0N/A * inverse DCT modules. These declarations are private to the DCT managers 0N/A * The individual DCT algorithms are kept in separate files to ease 0N/A * machine-dependent tuning (e.g., assembly coding). 0N/A * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; 0N/A * the DCT is to be performed in-place in that buffer. Type DCTELEM is int 0N/A * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT 0N/A * implementations use an array of type FAST_FLOAT, instead.) 0N/A * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). 0N/A * The DCT outputs are returned scaled up by a factor of 8; they therefore 0N/A * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This 0N/A * convention improves accuracy in integer implementations and saves some 0N/A * work in floating-point ones. 0N/A * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer 0N/A * to an output sample array. The routine must dequantize the input data as 0N/A * well as perform the IDCT; for dequantization, it uses the multiplier table 0N/A * pointed to by compptr->dct_table. The output data is to be placed into the 0N/A * sample array starting at a specified column. (Any row offset needed will 0N/A * be applied to the array pointer before it is passed to the IDCT code.) 0N/A * Note that the number of samples emitted by the IDCT routine is 0N/A * DCT_scaled_size * DCT_scaled_size. 0N/A/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ 0N/A * Each IDCT routine has its own ideas about the best dct_table element type. 0N/A * Each IDCT routine is responsible for range-limiting its results and 0N/A * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could 0N/A * be quite far out of range if the input data is corrupt, so a bulletproof 0N/A * range-limiting step is required. We use a mask-and-table-lookup method 0N/A * to do the combined operations quickly. See the comments with 0N/A/* Short forms of external names for systems with brain-damaged linkers. */ 0N/A#
endif /* NEED_SHORT_EXTERNAL_NAMES */ 0N/A/* Extern declarations for the forward and inverse DCT routines. */ 0N/A * Macros for handling fixed-point arithmetic; these are used by many 0N/A * All values are expected to be of type INT32. 0N/A * Fractional constants are scaled left by CONST_BITS bits. 0N/A * CONST_BITS is defined within each module using these macros, 0N/A * and may differ from one module to the next. 0N/A/* Convert a positive real constant to an integer scaled by CONST_SCALE. 0N/A * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, 0N/A * thus causing a lot of useless floating-point operations at run time. 0N/A/* Descale and correctly round an INT32 value that's scaled by N bits. 0N/A * We assume RIGHT_SHIFT rounds towards minus infinity, so adding 0N/A * the fudge factor is correct for either sign of X. 0N/A/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. 0N/A * This macro is used only when the two inputs will actually be no more than 0N/A * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a 0N/A * full 32x32 multiply. This provides a useful speedup on many machines. 0N/A * Unfortunately there is no way to specify a 16x16->32 multiply portably 0N/A * in C, but some C compilers will do the right thing if you provide the 0N/A * correct combination of casts. 0N/A/* Same except both inputs are variables. */