summaryrefslogtreecommitdiff
path: root/branches
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-19 17:31:24 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-19 17:31:24 +0000
commit09e3b56b24f24e7d28b10e6ee90aa220996fc3fd (patch)
treef988a31115d0afd3c5137b5d0d70e895f37093bb /branches
parent940674aa5d5869fa115a0431b54fe26cc83c41fb (diff)
RGBA=RGBX, BGRA=BGRX, ABGR=XBGR, ARGB=XRGB
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@412 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'branches')
-rw-r--r--branches/1.1.x/bmp.h3
-rw-r--r--branches/1.1.x/jpegut.c8
-rw-r--r--branches/1.1.x/jpgtest.c14
3 files changed, 13 insertions, 12 deletions
diff --git a/branches/1.1.x/bmp.h b/branches/1.1.x/bmp.h
index 437d327..055b1ee 100644
--- a/branches/1.1.x/bmp.h
+++ b/branches/1.1.x/bmp.h
@@ -1,5 +1,6 @@
/* Copyright (C)2004 Landmark Graphics Corporation
* Copyright (C)2005 Sun Microsystems, Inc.
+ * Copyright (C)2011 D. R. Commander
*
* This library is free software and may be redistributed and/or modified under
* the terms of the wxWindows Library License, Version 3.1 or (at your option)
@@ -19,7 +20,7 @@
#define __BMP_H__
#define BMPPIXELFORMATS 6
-enum BMPPIXELFORMAT {BMP_RGB=0, BMP_RGBA, BMP_BGR, BMP_BGRA, BMP_ABGR, BMP_ARGB};
+enum BMPPIXELFORMAT {BMP_RGB=0, BMP_RGBX, BMP_BGR, BMP_BGRX, BMP_XBGR, BMP_XRGB};
#ifdef __cplusplus
extern "C" {
diff --git a/branches/1.1.x/jpegut.c b/branches/1.1.x/jpegut.c
index ef66f27..a14f179 100644
--- a/branches/1.1.x/jpegut.c
+++ b/branches/1.1.x/jpegut.c
@@ -354,12 +354,12 @@ void gentestjpeg(tjhandle hnd, unsigned char *jpegbuf, unsigned long *size,
if(flags&TJ_BGR)
{
if(ps==3) pixformat="BGR";
- else {if(flags&TJ_ALPHAFIRST) pixformat="ABGR"; else pixformat="BGRA";}
+ else {if(flags&TJ_ALPHAFIRST) pixformat="XBGR"; else pixformat="BGRX";}
}
else
{
if(ps==3) pixformat="RGB";
- else {if(flags&TJ_ALPHAFIRST) pixformat="ARGB"; else pixformat="RGBA";}
+ else {if(flags&TJ_ALPHAFIRST) pixformat="XRGB"; else pixformat="RGBX";}
}
if(ps==1) pixformat="Grayscale";
if(yuv==YUVENCODE)
@@ -416,12 +416,12 @@ void gentestbmp(tjhandle hnd, unsigned char *jpegbuf, unsigned long jpegsize,
if(flags&TJ_BGR)
{
if(ps==3) pixformat="BGR";
- else {if(flags&TJ_ALPHAFIRST) pixformat="ABGR"; else pixformat="BGRA";}
+ else {if(flags&TJ_ALPHAFIRST) pixformat="XBGR"; else pixformat="BGRX";}
}
else
{
if(ps==3) pixformat="RGB";
- else {if(flags&TJ_ALPHAFIRST) pixformat="ARGB"; else pixformat="RGBA";}
+ else {if(flags&TJ_ALPHAFIRST) pixformat="XRGB"; else pixformat="RGBX";}
}
if(ps==1) pixformat="Grayscale";
if(yuv==YUVDECODE)
diff --git a/branches/1.1.x/jpgtest.c b/branches/1.1.x/jpgtest.c
index 3ca6a20..8451642 100644
--- a/branches/1.1.x/jpgtest.c
+++ b/branches/1.1.x/jpgtest.c
@@ -40,7 +40,7 @@ const int _flags[BMPPIXELFORMATS]={0, 0, TJ_BGR, TJ_BGR,
const int _rindex[BMPPIXELFORMATS]={0, 0, 2, 2, 3, 1};
const int _gindex[BMPPIXELFORMATS]={1, 1, 1, 1, 2, 2};
const int _bindex[BMPPIXELFORMATS]={2, 2, 0, 0, 1, 3};
-const char *_pfname[]={"RGB", "RGBA", "BGR", "BGRA", "ABGR", "ARGB"};
+const char *_pfname[]={"RGB", "RGBX", "BGR", "BGRX", "XBGR", "XRGB"};
const char *_subnamel[NUMSUBOPT]={"4:4:4", "4:2:2", "4:2:0", "GRAY"};
const char *_subnames[NUMSUBOPT]={"444", "422", "420", "GRAY"};
const int _hsf[NUMSUBOPT]={1, 2, 2, 1};
@@ -430,8 +430,8 @@ void usage(char *progname)
printf(" Test performance of the codec when the image is encoded\n");
printf(" as separate tiles of varying sizes.\n\n");
printf(" [-forcemmx] [-forcesse] [-forcesse2] [-forcesse3]\n");
- printf(" Force MMX, SSE, or SSE2 code paths in TurboJPEG codec\n\n");
- printf(" [-rgb | -bgr | -rgba | -bgra | -abgr | -argb]\n");
+ printf(" Force MMX, SSE, SSE2, or SSE3 code paths in the underlying codec\n\n");
+ printf(" [-rgb | -bgr | -rgbx | -bgrx | -xbgr | -xrgb]\n");
printf(" Test the specified color conversion path in the codec (default: BGR)\n\n");
printf(" [-fastupsample]\n");
printf(" Use fast, inaccurate upsampling code to perform 4:2:2 and 4:2:0\n");
@@ -527,11 +527,11 @@ int main(int argc, char *argv[])
fastupsample=1;
}
if(!stricmp(argv[i], "-rgb")) pf=BMP_RGB;
- if(!stricmp(argv[i], "-rgba")) pf=BMP_RGBA;
+ if(!stricmp(argv[i], "-rgbx")) pf=BMP_RGBX;
if(!stricmp(argv[i], "-bgr")) pf=BMP_BGR;
- if(!stricmp(argv[i], "-bgra")) pf=BMP_BGRA;
- if(!stricmp(argv[i], "-abgr")) pf=BMP_ABGR;
- if(!stricmp(argv[i], "-argb")) pf=BMP_ARGB;
+ if(!stricmp(argv[i], "-bgrx")) pf=BMP_BGRX;
+ if(!stricmp(argv[i], "-xbgr")) pf=BMP_XBGR;
+ if(!stricmp(argv[i], "-xrgb")) pf=BMP_XRGB;
if(!stricmp(argv[i], "-bottomup")) bu=1;
if(!stricmp(argv[i], "-quiet")) quiet=1;
if(!stricmp(argv[i], "-qq")) quiet=2;