summaryrefslogtreecommitdiff
path: root/tjunittest.c
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c>2012-05-11 07:46:03 +0000
committerhbono@chromium.org <hbono@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c>2012-05-11 07:46:03 +0000
commitdf5ffdd8b73415b78055177148995bdbdf38b12e (patch)
tree576b26685c24f24fd6aa83dda76529fde0c30ca1 /tjunittest.c
parentd1fe352415daa951ba28e4ef81bfa6a727104f5e (diff)
Update libjpeg-turbo.
This change updates our copy of libjpeg-turbo to r829. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10386084 git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libjpeg_turbo@136524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Diffstat (limited to 'tjunittest.c')
-rw-r--r--tjunittest.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/tjunittest.c b/tjunittest.c
index d14ec52..89a6d1d 100644
--- a/tjunittest.c
+++ b/tjunittest.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2009-2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -77,7 +77,7 @@ const int _onlyGray[]={TJPF_GRAY};
const int _onlyRGB[]={TJPF_RGB};
enum {YUVENCODE=1, YUVDECODE};
-int yuv=0, alloc=0, alpha=0;
+int yuv=0, alloc=0;
int exitStatus=0;
#define bailout() {exitStatus=-1; goto bailout;}
@@ -502,6 +502,8 @@ void doTest(int w, int h, const int *formats, int nformats, int subsamp,
for(i=0; i<2; i++)
{
int flags=0;
+ if(subsamp==TJSAMP_422 || subsamp==TJSAMP_420 || subsamp==TJSAMP_440)
+ flags|=TJFLAG_FASTUPSAMPLE;
if(i==1)
{
if(yuv==YUVDECODE) goto bailout;
@@ -617,15 +619,12 @@ int main(int argc, char *argv[])
if(doyuv) {yuv=YUVENCODE; alloc=0;}
doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test");
doTest(39, 41, _4byteFormats, 4, TJSAMP_444, "test");
- if(doyuv)
- {
- doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
- doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test");
- doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test");
- doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test");
- doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test");
- doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test");
- }
+ doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test");
+ doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test");
+ doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test");
+ doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test");
+ doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test");
+ doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test");
doTest(35, 39, _onlyGray, 1, TJSAMP_GRAY, "test");
doTest(39, 41, _3byteFormats, 2, TJSAMP_GRAY, "test");
doTest(41, 35, _4byteFormats, 4, TJSAMP_GRAY, "test");