Final 350 project
Dependencies: uzair Camera_LS_Y201 F7_Ethernet LCD_DISCO_F746NG NetworkAPI SDFileSystem mbed
includes/jdct.h@0:791a779d6220, 2017-07-31 (annotated)
- Committer:
- shoaib_ahmed
- Date:
- Mon Jul 31 09:16:35 2017 +0000
- Revision:
- 0:791a779d6220
final project;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shoaib_ahmed | 0:791a779d6220 | 1 | /* |
shoaib_ahmed | 0:791a779d6220 | 2 | * jdct.h |
shoaib_ahmed | 0:791a779d6220 | 3 | * |
shoaib_ahmed | 0:791a779d6220 | 4 | * Copyright (C) 1994-1996, Thomas G. Lane. |
shoaib_ahmed | 0:791a779d6220 | 5 | * Modified 2002-2015 by Guido Vollbeding. |
shoaib_ahmed | 0:791a779d6220 | 6 | * This file is part of the Independent JPEG Group's software. |
shoaib_ahmed | 0:791a779d6220 | 7 | * For conditions of distribution and use, see the accompanying README file. |
shoaib_ahmed | 0:791a779d6220 | 8 | * |
shoaib_ahmed | 0:791a779d6220 | 9 | * This include file contains common declarations for the forward and |
shoaib_ahmed | 0:791a779d6220 | 10 | * inverse DCT modules. These declarations are private to the DCT managers |
shoaib_ahmed | 0:791a779d6220 | 11 | * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. |
shoaib_ahmed | 0:791a779d6220 | 12 | * The individual DCT algorithms are kept in separate files to ease |
shoaib_ahmed | 0:791a779d6220 | 13 | * machine-dependent tuning (e.g., assembly coding). |
shoaib_ahmed | 0:791a779d6220 | 14 | */ |
shoaib_ahmed | 0:791a779d6220 | 15 | |
shoaib_ahmed | 0:791a779d6220 | 16 | |
shoaib_ahmed | 0:791a779d6220 | 17 | /* |
shoaib_ahmed | 0:791a779d6220 | 18 | * A forward DCT routine is given a pointer to an input sample array and |
shoaib_ahmed | 0:791a779d6220 | 19 | * a pointer to a work area of type DCTELEM[]; the DCT is to be performed |
shoaib_ahmed | 0:791a779d6220 | 20 | * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 |
shoaib_ahmed | 0:791a779d6220 | 21 | * for 12-bit samples. (NOTE: Floating-point DCT implementations use an |
shoaib_ahmed | 0:791a779d6220 | 22 | * array of type FAST_FLOAT, instead.) |
shoaib_ahmed | 0:791a779d6220 | 23 | * The input data is to be fetched from the sample array starting at a |
shoaib_ahmed | 0:791a779d6220 | 24 | * specified column. (Any row offset needed will be applied to the array |
shoaib_ahmed | 0:791a779d6220 | 25 | * pointer before it is passed to the FDCT code.) |
shoaib_ahmed | 0:791a779d6220 | 26 | * Note that the number of samples fetched by the FDCT routine is |
shoaib_ahmed | 0:791a779d6220 | 27 | * DCT_h_scaled_size * DCT_v_scaled_size. |
shoaib_ahmed | 0:791a779d6220 | 28 | * The DCT outputs are returned scaled up by a factor of 8; they therefore |
shoaib_ahmed | 0:791a779d6220 | 29 | * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This |
shoaib_ahmed | 0:791a779d6220 | 30 | * convention improves accuracy in integer implementations and saves some |
shoaib_ahmed | 0:791a779d6220 | 31 | * work in floating-point ones. |
shoaib_ahmed | 0:791a779d6220 | 32 | * Quantization of the output coefficients is done by jcdctmgr.c. |
shoaib_ahmed | 0:791a779d6220 | 33 | */ |
shoaib_ahmed | 0:791a779d6220 | 34 | |
shoaib_ahmed | 0:791a779d6220 | 35 | #if BITS_IN_JSAMPLE == 8 |
shoaib_ahmed | 0:791a779d6220 | 36 | typedef int DCTELEM; /* 16 or 32 bits is fine */ |
shoaib_ahmed | 0:791a779d6220 | 37 | #else |
shoaib_ahmed | 0:791a779d6220 | 38 | typedef INT32 DCTELEM; /* must have 32 bits */ |
shoaib_ahmed | 0:791a779d6220 | 39 | #endif |
shoaib_ahmed | 0:791a779d6220 | 40 | |
shoaib_ahmed | 0:791a779d6220 | 41 | typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, |
shoaib_ahmed | 0:791a779d6220 | 42 | JSAMPARRAY sample_data, |
shoaib_ahmed | 0:791a779d6220 | 43 | JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 44 | typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, |
shoaib_ahmed | 0:791a779d6220 | 45 | JSAMPARRAY sample_data, |
shoaib_ahmed | 0:791a779d6220 | 46 | JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 47 | |
shoaib_ahmed | 0:791a779d6220 | 48 | |
shoaib_ahmed | 0:791a779d6220 | 49 | /* |
shoaib_ahmed | 0:791a779d6220 | 50 | * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer |
shoaib_ahmed | 0:791a779d6220 | 51 | * to an output sample array. The routine must dequantize the input data as |
shoaib_ahmed | 0:791a779d6220 | 52 | * well as perform the IDCT; for dequantization, it uses the multiplier table |
shoaib_ahmed | 0:791a779d6220 | 53 | * pointed to by compptr->dct_table. The output data is to be placed into the |
shoaib_ahmed | 0:791a779d6220 | 54 | * sample array starting at a specified column. (Any row offset needed will |
shoaib_ahmed | 0:791a779d6220 | 55 | * be applied to the array pointer before it is passed to the IDCT code.) |
shoaib_ahmed | 0:791a779d6220 | 56 | * Note that the number of samples emitted by the IDCT routine is |
shoaib_ahmed | 0:791a779d6220 | 57 | * DCT_h_scaled_size * DCT_v_scaled_size. |
shoaib_ahmed | 0:791a779d6220 | 58 | */ |
shoaib_ahmed | 0:791a779d6220 | 59 | |
shoaib_ahmed | 0:791a779d6220 | 60 | /* typedef inverse_DCT_method_ptr is declared in jpegint.h */ |
shoaib_ahmed | 0:791a779d6220 | 61 | |
shoaib_ahmed | 0:791a779d6220 | 62 | /* |
shoaib_ahmed | 0:791a779d6220 | 63 | * Each IDCT routine has its own ideas about the best dct_table element type. |
shoaib_ahmed | 0:791a779d6220 | 64 | */ |
shoaib_ahmed | 0:791a779d6220 | 65 | |
shoaib_ahmed | 0:791a779d6220 | 66 | typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ |
shoaib_ahmed | 0:791a779d6220 | 67 | #if BITS_IN_JSAMPLE == 8 |
shoaib_ahmed | 0:791a779d6220 | 68 | typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ |
shoaib_ahmed | 0:791a779d6220 | 69 | #define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ |
shoaib_ahmed | 0:791a779d6220 | 70 | #else |
shoaib_ahmed | 0:791a779d6220 | 71 | typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ |
shoaib_ahmed | 0:791a779d6220 | 72 | #define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ |
shoaib_ahmed | 0:791a779d6220 | 73 | #endif |
shoaib_ahmed | 0:791a779d6220 | 74 | typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ |
shoaib_ahmed | 0:791a779d6220 | 75 | |
shoaib_ahmed | 0:791a779d6220 | 76 | |
shoaib_ahmed | 0:791a779d6220 | 77 | /* |
shoaib_ahmed | 0:791a779d6220 | 78 | * Each IDCT routine is responsible for range-limiting its results and |
shoaib_ahmed | 0:791a779d6220 | 79 | * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could |
shoaib_ahmed | 0:791a779d6220 | 80 | * be quite far out of range if the input data is corrupt, so a bulletproof |
shoaib_ahmed | 0:791a779d6220 | 81 | * range-limiting step is required. We use a mask-and-table-lookup method |
shoaib_ahmed | 0:791a779d6220 | 82 | * to do the combined operations quickly, assuming that MAXJSAMPLE+1 |
shoaib_ahmed | 0:791a779d6220 | 83 | * is a power of 2. See the comments with prepare_range_limit_table |
shoaib_ahmed | 0:791a779d6220 | 84 | * (in jdmaster.c) for more info. |
shoaib_ahmed | 0:791a779d6220 | 85 | */ |
shoaib_ahmed | 0:791a779d6220 | 86 | |
shoaib_ahmed | 0:791a779d6220 | 87 | #define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ |
shoaib_ahmed | 0:791a779d6220 | 88 | #define RANGE_CENTER (MAXJSAMPLE * 2 + 2) |
shoaib_ahmed | 0:791a779d6220 | 89 | #define RANGE_SUBSET (RANGE_CENTER - CENTERJSAMPLE) |
shoaib_ahmed | 0:791a779d6220 | 90 | |
shoaib_ahmed | 0:791a779d6220 | 91 | #define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit - RANGE_SUBSET) |
shoaib_ahmed | 0:791a779d6220 | 92 | |
shoaib_ahmed | 0:791a779d6220 | 93 | |
shoaib_ahmed | 0:791a779d6220 | 94 | /* Short forms of external names for systems with brain-damaged linkers. */ |
shoaib_ahmed | 0:791a779d6220 | 95 | |
shoaib_ahmed | 0:791a779d6220 | 96 | #ifdef NEED_SHORT_EXTERNAL_NAMES |
shoaib_ahmed | 0:791a779d6220 | 97 | #define jpeg_fdct_islow jFDislow |
shoaib_ahmed | 0:791a779d6220 | 98 | #define jpeg_fdct_ifast jFDifast |
shoaib_ahmed | 0:791a779d6220 | 99 | #define jpeg_fdct_float jFDfloat |
shoaib_ahmed | 0:791a779d6220 | 100 | #define jpeg_fdct_7x7 jFD7x7 |
shoaib_ahmed | 0:791a779d6220 | 101 | #define jpeg_fdct_6x6 jFD6x6 |
shoaib_ahmed | 0:791a779d6220 | 102 | #define jpeg_fdct_5x5 jFD5x5 |
shoaib_ahmed | 0:791a779d6220 | 103 | #define jpeg_fdct_4x4 jFD4x4 |
shoaib_ahmed | 0:791a779d6220 | 104 | #define jpeg_fdct_3x3 jFD3x3 |
shoaib_ahmed | 0:791a779d6220 | 105 | #define jpeg_fdct_2x2 jFD2x2 |
shoaib_ahmed | 0:791a779d6220 | 106 | #define jpeg_fdct_1x1 jFD1x1 |
shoaib_ahmed | 0:791a779d6220 | 107 | #define jpeg_fdct_9x9 jFD9x9 |
shoaib_ahmed | 0:791a779d6220 | 108 | #define jpeg_fdct_10x10 jFD10x10 |
shoaib_ahmed | 0:791a779d6220 | 109 | #define jpeg_fdct_11x11 jFD11x11 |
shoaib_ahmed | 0:791a779d6220 | 110 | #define jpeg_fdct_12x12 jFD12x12 |
shoaib_ahmed | 0:791a779d6220 | 111 | #define jpeg_fdct_13x13 jFD13x13 |
shoaib_ahmed | 0:791a779d6220 | 112 | #define jpeg_fdct_14x14 jFD14x14 |
shoaib_ahmed | 0:791a779d6220 | 113 | #define jpeg_fdct_15x15 jFD15x15 |
shoaib_ahmed | 0:791a779d6220 | 114 | #define jpeg_fdct_16x16 jFD16x16 |
shoaib_ahmed | 0:791a779d6220 | 115 | #define jpeg_fdct_16x8 jFD16x8 |
shoaib_ahmed | 0:791a779d6220 | 116 | #define jpeg_fdct_14x7 jFD14x7 |
shoaib_ahmed | 0:791a779d6220 | 117 | #define jpeg_fdct_12x6 jFD12x6 |
shoaib_ahmed | 0:791a779d6220 | 118 | #define jpeg_fdct_10x5 jFD10x5 |
shoaib_ahmed | 0:791a779d6220 | 119 | #define jpeg_fdct_8x4 jFD8x4 |
shoaib_ahmed | 0:791a779d6220 | 120 | #define jpeg_fdct_6x3 jFD6x3 |
shoaib_ahmed | 0:791a779d6220 | 121 | #define jpeg_fdct_4x2 jFD4x2 |
shoaib_ahmed | 0:791a779d6220 | 122 | #define jpeg_fdct_2x1 jFD2x1 |
shoaib_ahmed | 0:791a779d6220 | 123 | #define jpeg_fdct_8x16 jFD8x16 |
shoaib_ahmed | 0:791a779d6220 | 124 | #define jpeg_fdct_7x14 jFD7x14 |
shoaib_ahmed | 0:791a779d6220 | 125 | #define jpeg_fdct_6x12 jFD6x12 |
shoaib_ahmed | 0:791a779d6220 | 126 | #define jpeg_fdct_5x10 jFD5x10 |
shoaib_ahmed | 0:791a779d6220 | 127 | #define jpeg_fdct_4x8 jFD4x8 |
shoaib_ahmed | 0:791a779d6220 | 128 | #define jpeg_fdct_3x6 jFD3x6 |
shoaib_ahmed | 0:791a779d6220 | 129 | #define jpeg_fdct_2x4 jFD2x4 |
shoaib_ahmed | 0:791a779d6220 | 130 | #define jpeg_fdct_1x2 jFD1x2 |
shoaib_ahmed | 0:791a779d6220 | 131 | #define jpeg_idct_islow jRDislow |
shoaib_ahmed | 0:791a779d6220 | 132 | #define jpeg_idct_ifast jRDifast |
shoaib_ahmed | 0:791a779d6220 | 133 | #define jpeg_idct_float jRDfloat |
shoaib_ahmed | 0:791a779d6220 | 134 | #define jpeg_idct_7x7 jRD7x7 |
shoaib_ahmed | 0:791a779d6220 | 135 | #define jpeg_idct_6x6 jRD6x6 |
shoaib_ahmed | 0:791a779d6220 | 136 | #define jpeg_idct_5x5 jRD5x5 |
shoaib_ahmed | 0:791a779d6220 | 137 | #define jpeg_idct_4x4 jRD4x4 |
shoaib_ahmed | 0:791a779d6220 | 138 | #define jpeg_idct_3x3 jRD3x3 |
shoaib_ahmed | 0:791a779d6220 | 139 | #define jpeg_idct_2x2 jRD2x2 |
shoaib_ahmed | 0:791a779d6220 | 140 | #define jpeg_idct_1x1 jRD1x1 |
shoaib_ahmed | 0:791a779d6220 | 141 | #define jpeg_idct_9x9 jRD9x9 |
shoaib_ahmed | 0:791a779d6220 | 142 | #define jpeg_idct_10x10 jRD10x10 |
shoaib_ahmed | 0:791a779d6220 | 143 | #define jpeg_idct_11x11 jRD11x11 |
shoaib_ahmed | 0:791a779d6220 | 144 | #define jpeg_idct_12x12 jRD12x12 |
shoaib_ahmed | 0:791a779d6220 | 145 | #define jpeg_idct_13x13 jRD13x13 |
shoaib_ahmed | 0:791a779d6220 | 146 | #define jpeg_idct_14x14 jRD14x14 |
shoaib_ahmed | 0:791a779d6220 | 147 | #define jpeg_idct_15x15 jRD15x15 |
shoaib_ahmed | 0:791a779d6220 | 148 | #define jpeg_idct_16x16 jRD16x16 |
shoaib_ahmed | 0:791a779d6220 | 149 | #define jpeg_idct_16x8 jRD16x8 |
shoaib_ahmed | 0:791a779d6220 | 150 | #define jpeg_idct_14x7 jRD14x7 |
shoaib_ahmed | 0:791a779d6220 | 151 | #define jpeg_idct_12x6 jRD12x6 |
shoaib_ahmed | 0:791a779d6220 | 152 | #define jpeg_idct_10x5 jRD10x5 |
shoaib_ahmed | 0:791a779d6220 | 153 | #define jpeg_idct_8x4 jRD8x4 |
shoaib_ahmed | 0:791a779d6220 | 154 | #define jpeg_idct_6x3 jRD6x3 |
shoaib_ahmed | 0:791a779d6220 | 155 | #define jpeg_idct_4x2 jRD4x2 |
shoaib_ahmed | 0:791a779d6220 | 156 | #define jpeg_idct_2x1 jRD2x1 |
shoaib_ahmed | 0:791a779d6220 | 157 | #define jpeg_idct_8x16 jRD8x16 |
shoaib_ahmed | 0:791a779d6220 | 158 | #define jpeg_idct_7x14 jRD7x14 |
shoaib_ahmed | 0:791a779d6220 | 159 | #define jpeg_idct_6x12 jRD6x12 |
shoaib_ahmed | 0:791a779d6220 | 160 | #define jpeg_idct_5x10 jRD5x10 |
shoaib_ahmed | 0:791a779d6220 | 161 | #define jpeg_idct_4x8 jRD4x8 |
shoaib_ahmed | 0:791a779d6220 | 162 | #define jpeg_idct_3x6 jRD3x8 |
shoaib_ahmed | 0:791a779d6220 | 163 | #define jpeg_idct_2x4 jRD2x4 |
shoaib_ahmed | 0:791a779d6220 | 164 | #define jpeg_idct_1x2 jRD1x2 |
shoaib_ahmed | 0:791a779d6220 | 165 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ |
shoaib_ahmed | 0:791a779d6220 | 166 | |
shoaib_ahmed | 0:791a779d6220 | 167 | /* Extern declarations for the forward and inverse DCT routines. */ |
shoaib_ahmed | 0:791a779d6220 | 168 | |
shoaib_ahmed | 0:791a779d6220 | 169 | EXTERN(void) jpeg_fdct_islow |
shoaib_ahmed | 0:791a779d6220 | 170 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 171 | EXTERN(void) jpeg_fdct_ifast |
shoaib_ahmed | 0:791a779d6220 | 172 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 173 | EXTERN(void) jpeg_fdct_float |
shoaib_ahmed | 0:791a779d6220 | 174 | JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 175 | EXTERN(void) jpeg_fdct_7x7 |
shoaib_ahmed | 0:791a779d6220 | 176 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 177 | EXTERN(void) jpeg_fdct_6x6 |
shoaib_ahmed | 0:791a779d6220 | 178 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 179 | EXTERN(void) jpeg_fdct_5x5 |
shoaib_ahmed | 0:791a779d6220 | 180 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 181 | EXTERN(void) jpeg_fdct_4x4 |
shoaib_ahmed | 0:791a779d6220 | 182 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 183 | EXTERN(void) jpeg_fdct_3x3 |
shoaib_ahmed | 0:791a779d6220 | 184 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 185 | EXTERN(void) jpeg_fdct_2x2 |
shoaib_ahmed | 0:791a779d6220 | 186 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 187 | EXTERN(void) jpeg_fdct_1x1 |
shoaib_ahmed | 0:791a779d6220 | 188 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 189 | EXTERN(void) jpeg_fdct_9x9 |
shoaib_ahmed | 0:791a779d6220 | 190 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 191 | EXTERN(void) jpeg_fdct_10x10 |
shoaib_ahmed | 0:791a779d6220 | 192 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 193 | EXTERN(void) jpeg_fdct_11x11 |
shoaib_ahmed | 0:791a779d6220 | 194 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 195 | EXTERN(void) jpeg_fdct_12x12 |
shoaib_ahmed | 0:791a779d6220 | 196 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 197 | EXTERN(void) jpeg_fdct_13x13 |
shoaib_ahmed | 0:791a779d6220 | 198 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 199 | EXTERN(void) jpeg_fdct_14x14 |
shoaib_ahmed | 0:791a779d6220 | 200 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 201 | EXTERN(void) jpeg_fdct_15x15 |
shoaib_ahmed | 0:791a779d6220 | 202 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 203 | EXTERN(void) jpeg_fdct_16x16 |
shoaib_ahmed | 0:791a779d6220 | 204 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 205 | EXTERN(void) jpeg_fdct_16x8 |
shoaib_ahmed | 0:791a779d6220 | 206 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 207 | EXTERN(void) jpeg_fdct_14x7 |
shoaib_ahmed | 0:791a779d6220 | 208 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 209 | EXTERN(void) jpeg_fdct_12x6 |
shoaib_ahmed | 0:791a779d6220 | 210 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 211 | EXTERN(void) jpeg_fdct_10x5 |
shoaib_ahmed | 0:791a779d6220 | 212 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 213 | EXTERN(void) jpeg_fdct_8x4 |
shoaib_ahmed | 0:791a779d6220 | 214 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 215 | EXTERN(void) jpeg_fdct_6x3 |
shoaib_ahmed | 0:791a779d6220 | 216 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 217 | EXTERN(void) jpeg_fdct_4x2 |
shoaib_ahmed | 0:791a779d6220 | 218 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 219 | EXTERN(void) jpeg_fdct_2x1 |
shoaib_ahmed | 0:791a779d6220 | 220 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 221 | EXTERN(void) jpeg_fdct_8x16 |
shoaib_ahmed | 0:791a779d6220 | 222 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 223 | EXTERN(void) jpeg_fdct_7x14 |
shoaib_ahmed | 0:791a779d6220 | 224 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 225 | EXTERN(void) jpeg_fdct_6x12 |
shoaib_ahmed | 0:791a779d6220 | 226 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 227 | EXTERN(void) jpeg_fdct_5x10 |
shoaib_ahmed | 0:791a779d6220 | 228 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 229 | EXTERN(void) jpeg_fdct_4x8 |
shoaib_ahmed | 0:791a779d6220 | 230 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 231 | EXTERN(void) jpeg_fdct_3x6 |
shoaib_ahmed | 0:791a779d6220 | 232 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 233 | EXTERN(void) jpeg_fdct_2x4 |
shoaib_ahmed | 0:791a779d6220 | 234 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 235 | EXTERN(void) jpeg_fdct_1x2 |
shoaib_ahmed | 0:791a779d6220 | 236 | JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); |
shoaib_ahmed | 0:791a779d6220 | 237 | |
shoaib_ahmed | 0:791a779d6220 | 238 | EXTERN(void) jpeg_idct_islow |
shoaib_ahmed | 0:791a779d6220 | 239 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 240 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 241 | EXTERN(void) jpeg_idct_ifast |
shoaib_ahmed | 0:791a779d6220 | 242 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 243 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 244 | EXTERN(void) jpeg_idct_float |
shoaib_ahmed | 0:791a779d6220 | 245 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 246 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 247 | EXTERN(void) jpeg_idct_7x7 |
shoaib_ahmed | 0:791a779d6220 | 248 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 249 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 250 | EXTERN(void) jpeg_idct_6x6 |
shoaib_ahmed | 0:791a779d6220 | 251 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 252 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 253 | EXTERN(void) jpeg_idct_5x5 |
shoaib_ahmed | 0:791a779d6220 | 254 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 255 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 256 | EXTERN(void) jpeg_idct_4x4 |
shoaib_ahmed | 0:791a779d6220 | 257 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 258 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 259 | EXTERN(void) jpeg_idct_3x3 |
shoaib_ahmed | 0:791a779d6220 | 260 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 261 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 262 | EXTERN(void) jpeg_idct_2x2 |
shoaib_ahmed | 0:791a779d6220 | 263 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 264 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 265 | EXTERN(void) jpeg_idct_1x1 |
shoaib_ahmed | 0:791a779d6220 | 266 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 267 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 268 | EXTERN(void) jpeg_idct_9x9 |
shoaib_ahmed | 0:791a779d6220 | 269 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 270 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 271 | EXTERN(void) jpeg_idct_10x10 |
shoaib_ahmed | 0:791a779d6220 | 272 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 273 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 274 | EXTERN(void) jpeg_idct_11x11 |
shoaib_ahmed | 0:791a779d6220 | 275 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 276 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 277 | EXTERN(void) jpeg_idct_12x12 |
shoaib_ahmed | 0:791a779d6220 | 278 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 279 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 280 | EXTERN(void) jpeg_idct_13x13 |
shoaib_ahmed | 0:791a779d6220 | 281 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 282 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 283 | EXTERN(void) jpeg_idct_14x14 |
shoaib_ahmed | 0:791a779d6220 | 284 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 285 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 286 | EXTERN(void) jpeg_idct_15x15 |
shoaib_ahmed | 0:791a779d6220 | 287 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 288 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 289 | EXTERN(void) jpeg_idct_16x16 |
shoaib_ahmed | 0:791a779d6220 | 290 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 291 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 292 | EXTERN(void) jpeg_idct_16x8 |
shoaib_ahmed | 0:791a779d6220 | 293 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 294 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 295 | EXTERN(void) jpeg_idct_14x7 |
shoaib_ahmed | 0:791a779d6220 | 296 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 297 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 298 | EXTERN(void) jpeg_idct_12x6 |
shoaib_ahmed | 0:791a779d6220 | 299 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 300 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 301 | EXTERN(void) jpeg_idct_10x5 |
shoaib_ahmed | 0:791a779d6220 | 302 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 303 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 304 | EXTERN(void) jpeg_idct_8x4 |
shoaib_ahmed | 0:791a779d6220 | 305 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 306 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 307 | EXTERN(void) jpeg_idct_6x3 |
shoaib_ahmed | 0:791a779d6220 | 308 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 309 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 310 | EXTERN(void) jpeg_idct_4x2 |
shoaib_ahmed | 0:791a779d6220 | 311 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 312 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 313 | EXTERN(void) jpeg_idct_2x1 |
shoaib_ahmed | 0:791a779d6220 | 314 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 315 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 316 | EXTERN(void) jpeg_idct_8x16 |
shoaib_ahmed | 0:791a779d6220 | 317 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 318 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 319 | EXTERN(void) jpeg_idct_7x14 |
shoaib_ahmed | 0:791a779d6220 | 320 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 321 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 322 | EXTERN(void) jpeg_idct_6x12 |
shoaib_ahmed | 0:791a779d6220 | 323 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 324 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 325 | EXTERN(void) jpeg_idct_5x10 |
shoaib_ahmed | 0:791a779d6220 | 326 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 327 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 328 | EXTERN(void) jpeg_idct_4x8 |
shoaib_ahmed | 0:791a779d6220 | 329 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 330 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 331 | EXTERN(void) jpeg_idct_3x6 |
shoaib_ahmed | 0:791a779d6220 | 332 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 333 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 334 | EXTERN(void) jpeg_idct_2x4 |
shoaib_ahmed | 0:791a779d6220 | 335 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 336 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 337 | EXTERN(void) jpeg_idct_1x2 |
shoaib_ahmed | 0:791a779d6220 | 338 | JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, |
shoaib_ahmed | 0:791a779d6220 | 339 | JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); |
shoaib_ahmed | 0:791a779d6220 | 340 | |
shoaib_ahmed | 0:791a779d6220 | 341 | |
shoaib_ahmed | 0:791a779d6220 | 342 | /* |
shoaib_ahmed | 0:791a779d6220 | 343 | * Macros for handling fixed-point arithmetic; these are used by many |
shoaib_ahmed | 0:791a779d6220 | 344 | * but not all of the DCT/IDCT modules. |
shoaib_ahmed | 0:791a779d6220 | 345 | * |
shoaib_ahmed | 0:791a779d6220 | 346 | * All values are expected to be of type INT32. |
shoaib_ahmed | 0:791a779d6220 | 347 | * Fractional constants are scaled left by CONST_BITS bits. |
shoaib_ahmed | 0:791a779d6220 | 348 | * CONST_BITS is defined within each module using these macros, |
shoaib_ahmed | 0:791a779d6220 | 349 | * and may differ from one module to the next. |
shoaib_ahmed | 0:791a779d6220 | 350 | */ |
shoaib_ahmed | 0:791a779d6220 | 351 | |
shoaib_ahmed | 0:791a779d6220 | 352 | #define ONE ((INT32) 1) |
shoaib_ahmed | 0:791a779d6220 | 353 | #define CONST_SCALE (ONE << CONST_BITS) |
shoaib_ahmed | 0:791a779d6220 | 354 | |
shoaib_ahmed | 0:791a779d6220 | 355 | /* Convert a positive real constant to an integer scaled by CONST_SCALE. |
shoaib_ahmed | 0:791a779d6220 | 356 | * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, |
shoaib_ahmed | 0:791a779d6220 | 357 | * thus causing a lot of useless floating-point operations at run time. |
shoaib_ahmed | 0:791a779d6220 | 358 | */ |
shoaib_ahmed | 0:791a779d6220 | 359 | |
shoaib_ahmed | 0:791a779d6220 | 360 | #define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) |
shoaib_ahmed | 0:791a779d6220 | 361 | |
shoaib_ahmed | 0:791a779d6220 | 362 | /* Descale and correctly round an INT32 value that's scaled by N bits. |
shoaib_ahmed | 0:791a779d6220 | 363 | * We assume RIGHT_SHIFT rounds towards minus infinity, so adding |
shoaib_ahmed | 0:791a779d6220 | 364 | * the fudge factor is correct for either sign of X. |
shoaib_ahmed | 0:791a779d6220 | 365 | */ |
shoaib_ahmed | 0:791a779d6220 | 366 | |
shoaib_ahmed | 0:791a779d6220 | 367 | #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) |
shoaib_ahmed | 0:791a779d6220 | 368 | |
shoaib_ahmed | 0:791a779d6220 | 369 | /* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. |
shoaib_ahmed | 0:791a779d6220 | 370 | * This macro is used only when the two inputs will actually be no more than |
shoaib_ahmed | 0:791a779d6220 | 371 | * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a |
shoaib_ahmed | 0:791a779d6220 | 372 | * full 32x32 multiply. This provides a useful speedup on many machines. |
shoaib_ahmed | 0:791a779d6220 | 373 | * Unfortunately there is no way to specify a 16x16->32 multiply portably |
shoaib_ahmed | 0:791a779d6220 | 374 | * in C, but some C compilers will do the right thing if you provide the |
shoaib_ahmed | 0:791a779d6220 | 375 | * correct combination of casts. |
shoaib_ahmed | 0:791a779d6220 | 376 | */ |
shoaib_ahmed | 0:791a779d6220 | 377 | |
shoaib_ahmed | 0:791a779d6220 | 378 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ |
shoaib_ahmed | 0:791a779d6220 | 379 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) |
shoaib_ahmed | 0:791a779d6220 | 380 | #endif |
shoaib_ahmed | 0:791a779d6220 | 381 | #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ |
shoaib_ahmed | 0:791a779d6220 | 382 | #define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) |
shoaib_ahmed | 0:791a779d6220 | 383 | #endif |
shoaib_ahmed | 0:791a779d6220 | 384 | |
shoaib_ahmed | 0:791a779d6220 | 385 | #ifndef MULTIPLY16C16 /* default definition */ |
shoaib_ahmed | 0:791a779d6220 | 386 | #define MULTIPLY16C16(var,const) ((var) * (const)) |
shoaib_ahmed | 0:791a779d6220 | 387 | #endif |
shoaib_ahmed | 0:791a779d6220 | 388 | |
shoaib_ahmed | 0:791a779d6220 | 389 | /* Same except both inputs are variables. */ |
shoaib_ahmed | 0:791a779d6220 | 390 | |
shoaib_ahmed | 0:791a779d6220 | 391 | #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ |
shoaib_ahmed | 0:791a779d6220 | 392 | #define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) |
shoaib_ahmed | 0:791a779d6220 | 393 | #endif |
shoaib_ahmed | 0:791a779d6220 | 394 | |
shoaib_ahmed | 0:791a779d6220 | 395 | #ifndef MULTIPLY16V16 /* default definition */ |
shoaib_ahmed | 0:791a779d6220 | 396 | #define MULTIPLY16V16(var1,var2) ((var1) * (var2)) |
shoaib_ahmed | 0:791a779d6220 | 397 | #endif |
shoaib_ahmed | 0:791a779d6220 | 398 | |
shoaib_ahmed | 0:791a779d6220 | 399 | /* Like RIGHT_SHIFT, but applies to a DCTELEM. |
shoaib_ahmed | 0:791a779d6220 | 400 | * We assume that int right shift is unsigned if INT32 right shift is. |
shoaib_ahmed | 0:791a779d6220 | 401 | */ |
shoaib_ahmed | 0:791a779d6220 | 402 | |
shoaib_ahmed | 0:791a779d6220 | 403 | #ifdef RIGHT_SHIFT_IS_UNSIGNED |
shoaib_ahmed | 0:791a779d6220 | 404 | #define ISHIFT_TEMPS DCTELEM ishift_temp; |
shoaib_ahmed | 0:791a779d6220 | 405 | #if BITS_IN_JSAMPLE == 8 |
shoaib_ahmed | 0:791a779d6220 | 406 | #define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ |
shoaib_ahmed | 0:791a779d6220 | 407 | #else |
shoaib_ahmed | 0:791a779d6220 | 408 | #define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ |
shoaib_ahmed | 0:791a779d6220 | 409 | #endif |
shoaib_ahmed | 0:791a779d6220 | 410 | #define IRIGHT_SHIFT(x,shft) \ |
shoaib_ahmed | 0:791a779d6220 | 411 | ((ishift_temp = (x)) < 0 ? \ |
shoaib_ahmed | 0:791a779d6220 | 412 | (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ |
shoaib_ahmed | 0:791a779d6220 | 413 | (ishift_temp >> (shft))) |
shoaib_ahmed | 0:791a779d6220 | 414 | #else |
shoaib_ahmed | 0:791a779d6220 | 415 | #define ISHIFT_TEMPS |
shoaib_ahmed | 0:791a779d6220 | 416 | #define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) |
shoaib_ahmed | 0:791a779d6220 | 417 | #endif |