diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-04-03 12:00:51 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-04-03 12:00:51 +0000 |
commit | 1a9967cd2bec4abc039aac111bfa61ef37266fe1 (patch) | |
tree | 4cf0d62b0ee4a8f5656fdb7ded0e985da403f764 /jmorecfg.h | |
parent | 803e3a287a29ba05e60a74b77f8cb41017164bd1 (diff) |
Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@35 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jmorecfg.h')
-rw-r--r-- | jmorecfg.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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. */ |