diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2012-03-16 14:30:46 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2012-03-16 14:30:46 +0000 |
commit | 9e24524bacc1ce94b4ee662c2afa471a9358fbf3 (patch) | |
tree | 9da8ff24b425d5c4e0cd80bdb63bb335e8eb5a89 /java | |
parent | 577a6d44126364a3857f195a5a6cf0a24984ff18 (diff) |
Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@810 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'java')
-rw-r--r-- | java/TJUnitTest.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/java/TJUnitTest.java b/java/TJUnitTest.java index 557a85a..b88b28e 100644 --- a/java/TJUnitTest.java +++ b/java/TJUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2011 D. R. Commander. All Rights Reserved. + * Copyright (C)2011-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: @@ -765,6 +765,9 @@ public class TJUnitTest { for(int pf : formats) { for(int i = 0; i < 2; i++) { int flags = 0; + if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 + || subsamp == TJ.SAMP_440) + flags |= TJ.FLAG_FASTUPSAMPLE; if(i == 1) { if(yuv == YUVDECODE) { tjc.close(); tjd.close(); return; @@ -850,20 +853,18 @@ public class TJUnitTest { if(doyuv) yuv = YUVENCODE; doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444, testName); doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444, testName); - if(doyuv) { - doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_422, - testName); - doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_422, - testName); - doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_420, - testName); - doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_420, - testName); - doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_440, - testName); - doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440, - testName); - } + doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_422, + testName); + doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_422, + testName); + doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_420, + testName); + doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_420, + testName); + doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_440, + testName); + doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440, + testName); doTest(35, 39, bi ? onlyGrayBI : onlyGray, TJ.SAMP_GRAY, testName); doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_GRAY, testName); |