Merge branch 'master' into dev
diff --git a/ChangeLog.md b/ChangeLog.md
index a941ebb..f9b8bd7 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -77,6 +77,9 @@
when using the YUVImage constructor that creates an instance backed by separate
image planes and allocates memory for the image planes.
+8. Fixed an issue whereby the Java version of TJUnitTest would fail when
+testing BufferedImage encoding/decoding on big endian systems.
+
1.5.2
=====
diff --git a/cmakescripts/BuildPackages.cmake b/cmakescripts/BuildPackages.cmake
index d9bb520..5c03998 100644
--- a/cmakescripts/BuildPackages.cmake
+++ b/cmakescripts/BuildPackages.cmake
@@ -28,6 +28,8 @@
set(DEBARCH ${CPU_TYPE})
elseif(CPU_TYPE STREQUAL "arm")
set(DEBARCH armel)
+elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "ppc64le")
+ set(DEBARCH ppc64el)
else()
set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()
diff --git a/java/TJUnitTest.java b/java/TJUnitTest.java
index 444e798..24be8eb 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 @@
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 @@
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;
}
diff --git a/tjunittest.c b/tjunittest.c
index 6a4022f..7b2054e 100644
--- a/tjunittest.c
+++ b/tjunittest.c
@@ -44,12 +44,12 @@
void usage(char *progName)
{
- printf("\nUSAGE: %s [options]\n", progName);
+ printf("\nUSAGE: %s [options]\n\n", progName);
printf("Options:\n");
printf("-yuv = test YUV encoding/decoding support\n");
printf("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest\n");
printf(" 4-byte boundary\n");
- printf("-alloc = test automatic buffer allocation\n");
+ printf("-alloc = test automatic buffer allocation\n\n");
exit(1);
}