From bd7903e2a5584fe8d4c1103da25dff429e77c304 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Wed, 28 Feb 2018 14:05:04 -0500 Subject: Update libjpeg-turbo to 1.5.3 Bug: 70203010 Test: Existing tests Use commit at tag 1.5.3 (bf6c774305c9feb30cff7b99e1a475df61bfa008). This includes a fix for decompressing grayscale JPEG images that were compressed with a sampling factor other than 1 (b/70203010). The bug manifested as black stripes appearing when using the region decoder. ChangeLog.md contains more detailed changes. Add -Wno-sign-compare to Android.bp to silence a warning in jmemnobs.c. Change-Id: Ifefc70073fdff9c68e9b2cbcddf114c8bcb7d366 --- java/TJUnitTest.java | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'java/TJUnitTest.java') diff --git a/java/TJUnitTest.java b/java/TJUnitTest.java index 444e798..47ff7bb 100644 --- a/java/TJUnitTest.java +++ b/java/TJUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C)2011-2016 D. R. Commander. All Rights Reserved. + * Copyright (C)2011-2017 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: @@ -44,10 +44,10 @@ public class TJUnitTest { private static void usage() { System.out.println("\nUSAGE: java " + classname + " [options]\n"); - System.out.println("Options:\n"); - System.out.println("-yuv = test YUV encoding/decoding support\n"); - System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n"); - System.out.println(" 4-byte boundary\n"); + System.out.println("Options:"); + System.out.println("-yuv = test YUV encoding/decoding support"); + System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest"); + System.out.println(" 4-byte boundary"); System.out.println("-bi = test BufferedImage support\n"); System.exit(1); } @@ -109,21 +109,12 @@ public class TJUnitTest { case BufferedImage.TYPE_BYTE_GRAY: return TJ.PF_GRAY; case BufferedImage.TYPE_INT_BGR: - if (byteOrder == ByteOrder.BIG_ENDIAN) - return TJ.PF_XBGR; - else - return TJ.PF_RGBX; + return TJ.PF_RGBX; case BufferedImage.TYPE_INT_RGB: - if (byteOrder == ByteOrder.BIG_ENDIAN) - return TJ.PF_XRGB; - else - return TJ.PF_BGRX; + return TJ.PF_BGRX; case BufferedImage.TYPE_INT_ARGB: case BufferedImage.TYPE_INT_ARGB_PRE: - if (byteOrder == ByteOrder.BIG_ENDIAN) - return TJ.PF_ARGB; - else - return TJ.PF_BGRA; + return TJ.PF_BGRA; } return 0; } @@ -911,15 +902,13 @@ public class TJUnitTest { for (int i = 0; i < argv.length; i++) { if (argv[i].equalsIgnoreCase("-yuv")) doYUV = true; - if (argv[i].equalsIgnoreCase("-noyuvpad")) + else if (argv[i].equalsIgnoreCase("-noyuvpad")) pad = 1; - if (argv[i].substring(0, 1).equalsIgnoreCase("-h") || - argv[i].equalsIgnoreCase("-?")) - usage(); - if (argv[i].equalsIgnoreCase("-bi")) { + else if (argv[i].equalsIgnoreCase("-bi")) { bi = true; testName = "javabitest"; - } + } else + usage(); } if (doYUV) _4byteFormats[4] = -1; -- cgit v1.2.3