Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Unified Diff: tjunittest.c

Issue 9232002: Update libjpeg-turbo to 1.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libjpeg_turbo/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « simd/jsimdext.inc ('k') | turbojpeg.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tjunittest.c
===================================================================
--- tjunittest.c (revision 111873)
+++ tjunittest.c (working copy)
@@ -65,10 +65,11 @@
const char *pixFormatStr[TJ_NUMPF]=
{
- "RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "Grayscale"
+ "RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "Grayscale",
+ "RGBA", "BGRA", "ABGR", "ARGB"
};
-const int alphaOffset[TJ_NUMPF] = {-1, -1, 3, 3, 0, 0, -1};
+const int alphaOffset[TJ_NUMPF] = {-1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0};
const int _3byteFormats[]={TJPF_RGB, TJPF_BGR};
const int _4byteFormats[]={TJPF_RGBX, TJPF_BGRX, TJPF_XBGR, TJPF_XRGB};
@@ -76,7 +77,7 @@
const int _onlyRGB[]={TJPF_RGB};
enum {YUVENCODE=1, YUVDECODE};
-int yuv=0, alloc=0;
+int yuv=0, alloc=0, alpha=0;
int exitStatus=0;
#define bailout() {exitStatus=-1; goto bailout;}
@@ -511,6 +512,9 @@
flags);
decompTest(dhandle, dstBuf, size, w, h, pf, basename, subsamp,
flags);
+ if(pf>=TJPF_RGBX && pf<=TJPF_XRGB)
+ decompTest(dhandle, dstBuf, size, w, h, pf+(TJPF_RGBA-TJPF_RGBX),
+ basename, subsamp, flags);
}
}
« no previous file with comments | « simd/jsimdext.inc ('k') | turbojpeg.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698