OLD | NEW |
1 /* | 1 /* |
2 * jmorecfg.h | 2 * jmorecfg.h |
3 * | 3 * |
4 * Copyright (C) 1991-1997, Thomas G. Lane. | 4 * Copyright (C) 1991-1997, Thomas G. Lane. |
5 * Copyright (C) 2009, D. R. Commander. | 5 * Copyright (C) 2009, D. R. Commander. |
6 * This file is part of the Independent JPEG Group's software. | 6 * This file is part of the Independent JPEG Group's software. |
7 * For conditions of distribution and use, see the accompanying README file. | 7 * For conditions of distribution and use, see the accompanying README file. |
8 * | 8 * |
9 * This file contains additional configuration options that customize the | 9 * This file contains additional configuration options that customize the |
10 * JPEG software for special applications or support machine-dependent | 10 * JPEG software for special applications or support machine-dependent |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 * can't use color quantization if you change that value. | 314 * can't use color quantization if you change that value. |
315 */ | 315 */ |
316 | 316 |
317 #define RGB_RED 0 /* Offset of Red in an RGB scanline element */ | 317 #define RGB_RED 0 /* Offset of Red in an RGB scanline element */ |
318 #define RGB_GREEN 1 /* Offset of Green */ | 318 #define RGB_GREEN 1 /* Offset of Green */ |
319 #define RGB_BLUE 2 /* Offset of Blue */ | 319 #define RGB_BLUE 2 /* Offset of Blue */ |
320 #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ | 320 #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ |
321 | 321 |
322 #define JPEG_NUMCS 12 | 322 #define JPEG_NUMCS 12 |
323 | 323 |
| 324 #define EXT_RGB_RED 0 |
| 325 #define EXT_RGB_GREEN 1 |
| 326 #define EXT_RGB_BLUE 2 |
| 327 #define EXT_RGB_PIXELSIZE 3 |
| 328 |
| 329 #define EXT_RGBX_RED 0 |
| 330 #define EXT_RGBX_GREEN 1 |
| 331 #define EXT_RGBX_BLUE 2 |
| 332 #define EXT_RGBX_PIXELSIZE 4 |
| 333 |
| 334 #define EXT_BGR_RED 2 |
| 335 #define EXT_BGR_GREEN 1 |
| 336 #define EXT_BGR_BLUE 0 |
| 337 #define EXT_BGR_PIXELSIZE 3 |
| 338 |
| 339 #define EXT_BGRX_RED 2 |
| 340 #define EXT_BGRX_GREEN 1 |
| 341 #define EXT_BGRX_BLUE 0 |
| 342 #define EXT_BGRX_PIXELSIZE 4 |
| 343 |
| 344 #define EXT_XBGR_RED 3 |
| 345 #define EXT_XBGR_GREEN 2 |
| 346 #define EXT_XBGR_BLUE 1 |
| 347 #define EXT_XBGR_PIXELSIZE 4 |
| 348 |
| 349 #define EXT_XRGB_RED 1 |
| 350 #define EXT_XRGB_GREEN 2 |
| 351 #define EXT_XRGB_BLUE 3 |
| 352 #define EXT_XRGB_PIXELSIZE 4 |
| 353 |
324 static const int rgb_red[JPEG_NUMCS] = { | 354 static const int rgb_red[JPEG_NUMCS] = { |
325 » -1, -1, RGB_RED, -1, -1, -1, 0, 0, 2, 2, 3, 1 | 355 -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, |
| 356 EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED |
326 }; | 357 }; |
327 | 358 |
328 static const int rgb_green[JPEG_NUMCS] = { | 359 static const int rgb_green[JPEG_NUMCS] = { |
329 » -1, -1, RGB_GREEN, -1, -1, -1, 1, 1, 1, 1, 2, 2 | 360 -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN, |
| 361 EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN |
330 }; | 362 }; |
331 | 363 |
332 static const int rgb_blue[JPEG_NUMCS] = { | 364 static const int rgb_blue[JPEG_NUMCS] = { |
333 » -1, -1, RGB_BLUE, -1, -1, -1, 2, 2, 0, 0, 1, 3 | 365 -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE, |
| 366 EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE |
334 }; | 367 }; |
335 | 368 |
336 static const int rgb_pixelsize[JPEG_NUMCS] = { | 369 static const int rgb_pixelsize[JPEG_NUMCS] = { |
337 » -1, -1, RGB_PIXELSIZE, -1, -1, -1, 3, 4, 3, 4, 4, 4 | 370 -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, |
| 371 EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE |
338 }; | 372 }; |
339 | 373 |
340 /* Definitions for speed-related optimizations. */ | 374 /* Definitions for speed-related optimizations. */ |
341 | 375 |
342 /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying | 376 /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying |
343 * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER | 377 * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER |
344 * as short on such a machine. MULTIPLIER must be at least 16 bits wide. | 378 * as short on such a machine. MULTIPLIER must be at least 16 bits wide. |
345 */ | 379 */ |
346 | 380 |
347 #ifndef MULTIPLIER | 381 #ifndef MULTIPLIER |
(...skipping 15 matching lines...) Expand all Loading... |
363 | 397 |
364 #ifndef FAST_FLOAT | 398 #ifndef FAST_FLOAT |
365 #ifdef HAVE_PROTOTYPES | 399 #ifdef HAVE_PROTOTYPES |
366 #define FAST_FLOAT float | 400 #define FAST_FLOAT float |
367 #else | 401 #else |
368 #define FAST_FLOAT double | 402 #define FAST_FLOAT double |
369 #endif | 403 #endif |
370 #endif | 404 #endif |
371 | 405 |
372 #endif /* JPEG_INTERNAL_OPTIONS */ | 406 #endif /* JPEG_INTERNAL_OPTIONS */ |
OLD | NEW |