diff options
author | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2009-04-03 12:00:51 +0000 |
---|---|---|
committer | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2009-04-03 12:00:51 +0000 |
commit | 4d25e604cf293f3dfa32ac796d58de719631ac50 (patch) | |
tree | b48114c47eb262e5bf58735c93379ece5b7ea4ca /trunk/jmorecfg.h | |
parent | 34cc1862601cf372ebf94c626bf8c2669f0af02e (diff) |
Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@35 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'trunk/jmorecfg.h')
-rw-r--r-- | trunk/jmorecfg.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/trunk/jmorecfg.h b/trunk/jmorecfg.h index 18670ec..0e7fb72 100644 --- a/trunk/jmorecfg.h +++ b/trunk/jmorecfg.h @@ -2,6 +2,7 @@ * jmorecfg.h * * Copyright (C) 1991-1997, Thomas G. Lane. + * Copyright (C) 2009, D. R. Commander. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * @@ -316,6 +317,23 @@ typedef int boolean; #define RGB_BLUE 2 /* Offset of Blue */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ +#define JPEG_NUMCS 12 + +static const int rgb_red[JPEG_NUMCS] = { + -1, -1, RGB_RED, -1, -1, -1, 0, 0, 2, 2, 3, 1 +}; + +static const int rgb_green[JPEG_NUMCS] = { + -1, -1, RGB_GREEN, -1, -1, -1, 1, 1, 1, 1, 2, 2 +}; + +static const int rgb_blue[JPEG_NUMCS] = { + -1, -1, RGB_BLUE, -1, -1, -1, 2, 2, 0, 0, 1, 3 +}; + +static const int rgb_pixelsize[JPEG_NUMCS] = { + -1, -1, RGB_PIXELSIZE, -1, -1, -1, 3, 4, 3, 4, 4, 4 +}; /* Definitions for speed-related optimizations. */ |