about summary refs log tree commit diff
path: root/converter/other/jpeg2000/libjasper/include
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/jpeg2000/libjasper/include')
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_debug.h32
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_fix.h206
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_getopt.h44
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_image.h326
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_init.h26
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_malloc.h34
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_math.h54
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_seq.h182
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_stream.h222
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_string.h30
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_tvp.h50
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_types.h4
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jas_version.h64
-rw-r--r--converter/other/jpeg2000/libjasper/include/jasper/jasper.h26
14 files changed, 650 insertions, 650 deletions
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_debug.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_debug.h
index 6c597c59..77b65967 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_debug.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_debug.h
@@ -4,14 +4,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -19,22 +19,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -54,17 +54,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -104,7 +104,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -136,10 +136,10 @@ extern "C" {
 /* Output debugging information to standard error provided that the debug
   level is set sufficiently high. */
 #if defined(DEBUG)
-#define	JAS_DBGLOG(n, x) \
-	((jas_getdbglevel() >= (n)) ? (jas_eprintf x) : 0)
+#define JAS_DBGLOG(n, x) \
+        ((jas_getdbglevel() >= (n)) ? (jas_eprintf x) : 0)
 #else
-#define	JAS_DBGLOG(n, x)
+#define JAS_DBGLOG(n, x)
 #endif
 
 /* Get the library debug level. */
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_fix.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_fix.h
index 9599eb1c..7816b13e 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_fix.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_fix.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -138,16 +138,16 @@ extern "C" {
 \******************************************************************************/
 
 /* The representation of the value zero. */
-#define	JAS_FIX_ZERO(fix_t, fracbits) \
-	JAS_CAST(fix_t, 0)
+#define JAS_FIX_ZERO(fix_t, fracbits) \
+        JAS_CAST(fix_t, 0)
 
 /* The representation of the value one. */
-#define	JAS_FIX_ONE(fix_t, fracbits) \
-	(JAS_CAST(fix_t, 1) << (fracbits))
+#define JAS_FIX_ONE(fix_t, fracbits) \
+        (JAS_CAST(fix_t, 1) << (fracbits))
 
 /* The representation of the value one half. */
-#define	JAS_FIX_HALF(fix_t, fracbits) \
-	(JAS_CAST(fix_t, 1) << ((fracbits) - 1))
+#define JAS_FIX_HALF(fix_t, fracbits) \
+        (JAS_CAST(fix_t, 1) << ((fracbits) - 1))
 
 /******************************************************************************\
 * Conversion operations.
@@ -155,19 +155,19 @@ extern "C" {
 
 /* Convert an int to a fixed-point number. */
 #define JAS_INTTOFIX(fix_t, fracbits, x) \
-	JAS_CAST(fix_t, (x) << (fracbits))
+        JAS_CAST(fix_t, (x) << (fracbits))
 
 /* Convert a fixed-point number to an int. */
 #define JAS_FIXTOINT(fix_t, fracbits, x) \
-	JAS_CAST(int, (x) >> (fracbits))
+        JAS_CAST(int, (x) >> (fracbits))
 
 /* Convert a fixed-point number to a double. */
 #define JAS_FIXTODBL(fix_t, fracbits, x) \
-	(JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits)))
+        (JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits)))
 
 /* Convert a double to a fixed-point number. */
 #define JAS_DBLTOFIX(fix_t, fracbits, x) \
-	JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits))))
+        JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits))))
 
 /******************************************************************************\
 * Basic arithmetic operations.
@@ -181,128 +181,128 @@ extern "C" {
 
 /* Calculate the sum of two fixed-point numbers. */
 #if !defined(DEBUG_OVERFLOW)
-#define JAS_FIX_ADD			JAS_FIX_ADD_FAST
+#define JAS_FIX_ADD                     JAS_FIX_ADD_FAST
 #else
-#define JAS_FIX_ADD			JAS_FIX_ADD_OFLOW
+#define JAS_FIX_ADD                     JAS_FIX_ADD_OFLOW
 #endif
 
 /* Calculate the sum of two fixed-point numbers without overflow checking. */
-#define	JAS_FIX_ADD_FAST(fix_t, fracbits, x, y)	((x) + (y))
+#define JAS_FIX_ADD_FAST(fix_t, fracbits, x, y) ((x) + (y))
 
 /* Calculate the sum of two fixed-point numbers with overflow checking. */
-#define	JAS_FIX_ADD_OFLOW(fix_t, fracbits, x, y) \
-	((x) >= 0) ? \
-	  (((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \
-	  ((x) + (y))) : \
-	  (((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \
-	  (x) + (y)))
+#define JAS_FIX_ADD_OFLOW(fix_t, fracbits, x, y) \
+        ((x) >= 0) ? \
+          (((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \
+          ((x) + (y))) : \
+          (((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \
+          (x) + (y)))
 
 /* Calculate the product of two fixed-point numbers. */
 #if !defined(DEBUG_OVERFLOW)
-#define JAS_FIX_MUL			JAS_FIX_MUL_FAST
+#define JAS_FIX_MUL                     JAS_FIX_MUL_FAST
 #else
-#define JAS_FIX_MUL			JAS_FIX_MUL_OFLOW
+#define JAS_FIX_MUL                     JAS_FIX_MUL_OFLOW
 #endif
 
 /* Calculate the product of two fixed-point numbers without overflow
   checking. */
-#define	JAS_FIX_MUL_FAST(fix_t, fracbits, bigfix_t, x, y) \
-	JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \
-	  (fracbits))
+#define JAS_FIX_MUL_FAST(fix_t, fracbits, bigfix_t, x, y) \
+        JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \
+          (fracbits))
 
 /* Calculate the product of two fixed-point numbers with overflow
   checking. */
 #define JAS_FIX_MUL_OFLOW(fix_t, fracbits, bigfix_t, x, y) \
-	((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \
-	  JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
-	  (fracbits))) ? \
-	  JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
-	  (fracbits))) : JAS_FIX_OFLOW())
+        ((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \
+          JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
+          (fracbits))) ? \
+          JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
+          (fracbits))) : JAS_FIX_OFLOW())
 
 /* Calculate the product of a fixed-point number and an int. */
 #if !defined(DEBUG_OVERFLOW)
-#define	JAS_FIX_MULBYINT	JAS_FIX_MULBYINT_FAST
+#define JAS_FIX_MULBYINT        JAS_FIX_MULBYINT_FAST
 #else
-#define	JAS_FIX_MULBYINT	JAS_FIX_MULBYINT_OFLOW
+#define JAS_FIX_MULBYINT        JAS_FIX_MULBYINT_OFLOW
 #endif
 
 /* Calculate the product of a fixed-point number and an int without overflow
   checking. */
-#define	JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) \
-	JAS_CAST(fix_t, ((x) * (y)))
+#define JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) \
+        JAS_CAST(fix_t, ((x) * (y)))
 
 /* Calculate the product of a fixed-point number and an int with overflow
   checking. */
-#define	JAS_FIX_MULBYINT_OFLOW(fix_t, fracbits, x, y) \
-	JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y)
+#define JAS_FIX_MULBYINT_OFLOW(fix_t, fracbits, x, y) \
+        JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y)
 
 /* Calculate the quotient of two fixed-point numbers. */
 #if !defined(DEBUG_OVERFLOW)
-#define JAS_FIX_DIV			JAS_FIX_DIV_FAST
+#define JAS_FIX_DIV                     JAS_FIX_DIV_FAST
 #else
-#define JAS_FIX_DIV			JAS_FIX_DIV_UFLOW
+#define JAS_FIX_DIV                     JAS_FIX_DIV_UFLOW
 #endif
 
 /* Calculate the quotient of two fixed-point numbers without underflow
   checking. */
-#define	JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) \
-	JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y))
+#define JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) \
+        JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y))
 
 /* Calculate the quotient of two fixed-point numbers with underflow
   checking. */
 #define JAS_FIX_DIV_UFLOW(fix_t, fracbits, bigfix_t, x, y) \
-	JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y)
+        JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y)
 
 /* Negate a fixed-point number. */
 #if !defined(DEBUG_OVERFLOW)
-#define	JAS_FIX_NEG			JAS_FIX_NEG_FAST
+#define JAS_FIX_NEG                     JAS_FIX_NEG_FAST
 #else
-#define	JAS_FIX_NEG			JAS_FIX_NEG_OFLOW
+#define JAS_FIX_NEG                     JAS_FIX_NEG_OFLOW
 #endif
 
 /* Negate a fixed-point number without overflow checking. */
-#define	JAS_FIX_NEG_FAST(fix_t, fracbits, x) \
-	(-(x))
+#define JAS_FIX_NEG_FAST(fix_t, fracbits, x) \
+        (-(x))
 
 /* Negate a fixed-point number with overflow checking. */
 /* Yes, overflow is actually possible for two's complement representations,
   although highly unlikely to occur. */
-#define	JAS_FIX_NEG_OFLOW(fix_t, fracbits, x) \
-	(((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x)))
+#define JAS_FIX_NEG_OFLOW(fix_t, fracbits, x) \
+        (((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x)))
 
 /* Perform an arithmetic shift left of a fixed-point number. */
 #if !defined(DEBUG_OVERFLOW)
-#define	JAS_FIX_ASL			JAS_FIX_ASL_FAST
+#define JAS_FIX_ASL                     JAS_FIX_ASL_FAST
 #else
-#define	JAS_FIX_ASL			JAS_FIX_ASL_OFLOW
+#define JAS_FIX_ASL                     JAS_FIX_ASL_OFLOW
 #endif
 
 /* Perform an arithmetic shift left of a fixed-point number without overflow
   checking. */
-#define	JAS_FIX_ASL_FAST(fix_t, fracbits, x, n) \
-	((x) << (n))
+#define JAS_FIX_ASL_FAST(fix_t, fracbits, x, n) \
+        ((x) << (n))
 
 /* Perform an arithmetic shift left of a fixed-point number with overflow
   checking. */
-#define	JAS_FIX_ASL_OFLOW(fix_t, fracbits, x, n) \
-	((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n))
+#define JAS_FIX_ASL_OFLOW(fix_t, fracbits, x, n) \
+        ((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n))
 
 /* Perform an arithmetic shift right of a fixed-point number. */
 #if !defined(DEBUG_OVERFLOW)
-#define	JAS_FIX_ASR			JAS_FIX_ASR_FAST
+#define JAS_FIX_ASR                     JAS_FIX_ASR_FAST
 #else
-#define	JAS_FIX_ASR			JAS_FIX_ASR_UFLOW
+#define JAS_FIX_ASR                     JAS_FIX_ASR_UFLOW
 #endif
 
 /* Perform an arithmetic shift right of a fixed-point number without underflow
   checking. */
-#define	JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) \
-	((x) >> (n))
+#define JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) \
+        ((x) >> (n))
 
 /* Perform an arithmetic shift right of a fixed-point number with underflow
   checking. */
-#define	JAS_FIX_ASR_UFLOW(fix_t, fracbits, x, n) \
-	JAS_FIX_ASR_FAST(fix_t, fracbits, x, n)
+#define JAS_FIX_ASR_UFLOW(fix_t, fracbits, x, n) \
+        JAS_FIX_ASR_FAST(fix_t, fracbits, x, n)
 
 /******************************************************************************\
 * Other basic arithmetic operations.
@@ -310,35 +310,35 @@ extern "C" {
 
 /* Calculate the difference between two fixed-point numbers. */
 #define JAS_FIX_SUB(fix_t, fracbits, x, y) \
-	JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y))
+        JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y))
 
 /* Add one fixed-point number to another. */
 #define JAS_FIX_PLUSEQ(fix_t, fracbits, x, y) \
-	((x) = JAS_FIX_ADD(fix_t, fracbits, x, y))
+        ((x) = JAS_FIX_ADD(fix_t, fracbits, x, y))
 
 /* Subtract one fixed-point number from another. */
 #define JAS_FIX_MINUSEQ(fix_t, fracbits, x, y) \
-	((x) = JAS_FIX_SUB(fix_t, fracbits, x, y))
+        ((x) = JAS_FIX_SUB(fix_t, fracbits, x, y))
 
 /* Multiply one fixed-point number by another. */
-#define	JAS_FIX_MULEQ(fix_t, fracbits, bigfix_t, x, y) \
-	((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y))
+#define JAS_FIX_MULEQ(fix_t, fracbits, bigfix_t, x, y) \
+        ((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y))
 
 /******************************************************************************\
 * Miscellaneous operations.
 \******************************************************************************/
 
 /* Calculate the absolute value of a fixed-point number. */
-#define	JAS_FIX_ABS(fix_t, fracbits, x) \
-	(((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x)))
+#define JAS_FIX_ABS(fix_t, fracbits, x) \
+        (((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x)))
 
 /* Is a fixed-point number an integer? */
-#define	JAS_FIX_ISINT(fix_t, fracbits, x) \
-	(JAS_FIX_FLOOR(fix_t, fracbits, x) == (x))
+#define JAS_FIX_ISINT(fix_t, fracbits, x) \
+        (JAS_FIX_FLOOR(fix_t, fracbits, x) == (x))
 
 /* Get the sign of a fixed-point number. */
 #define JAS_FIX_SGN(fix_t, fracbits, x) \
-	((x) >= 0 ? 1 : (-1))
+        ((x) >= 0 ? 1 : (-1))
 
 /******************************************************************************\
 * Relational operations.
@@ -346,45 +346,45 @@ extern "C" {
 
 /* Compare two fixed-point numbers. */
 #define JAS_FIX_CMP(fix_t, fracbits, x, y) \
-	((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1)))
+        ((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1)))
 
 /* Less than. */
-#define	JAS_FIX_LT(fix_t, fracbits, x, y) \
-	((x) < (y))
+#define JAS_FIX_LT(fix_t, fracbits, x, y) \
+        ((x) < (y))
 
 /* Less than or equal. */
-#define	JAS_FIX_LTE(fix_t, fracbits, x, y) \
-	((x) <= (y))
+#define JAS_FIX_LTE(fix_t, fracbits, x, y) \
+        ((x) <= (y))
 
 /* Greater than. */
-#define	JAS_FIX_GT(fix_t, fracbits, x, y) \
-	((x) > (y))
+#define JAS_FIX_GT(fix_t, fracbits, x, y) \
+        ((x) > (y))
 
 /* Greater than or equal. */
-#define	JAS_FIX_GTE(fix_t, fracbits, x, y) \
-	((x) >= (y))
+#define JAS_FIX_GTE(fix_t, fracbits, x, y) \
+        ((x) >= (y))
 
 /******************************************************************************\
 * Rounding functions.
 \******************************************************************************/
 
 /* Round a fixed-point number to the nearest integer. */
-#define	JAS_FIX_ROUND(fix_t, fracbits, x) \
-	(((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \
-	  (x), JAS_FIX_HALF(fix_t, fracbits))) : \
-	  JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \
-	  JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits)))))
+#define JAS_FIX_ROUND(fix_t, fracbits, x) \
+        (((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \
+          (x), JAS_FIX_HALF(fix_t, fracbits))) : \
+          JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \
+          JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits)))))
 
 /* Round a fixed-point number to the nearest integer in the direction of
   negative infinity (i.e., the floor function). */
-#define	JAS_FIX_FLOOR(fix_t, fracbits, x) \
-	((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1)))
+#define JAS_FIX_FLOOR(fix_t, fracbits, x) \
+        ((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1)))
 
 /* Round a fixed-point number to the nearest integer in the direction
   of zero. */
 #define JAS_FIX_TRUNC(fix_t, fracbits, x) \
-	(((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \
-	  JAS_FIX_CEIL(fix_t, fracbits, x))
+        (((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \
+          JAS_FIX_CEIL(fix_t, fracbits, x))
 
 /******************************************************************************\
 * The below macros are for internal library use only.  Do not invoke them
@@ -392,12 +392,12 @@ extern "C" {
 \******************************************************************************/
 
 /* Handle overflow. */
-#define	JAS_FIX_OFLOW() \
-	fprintf(stderr, "overflow error: file %s, line %d\n", __FILE__, __LINE__)
+#define JAS_FIX_OFLOW() \
+        fprintf(stderr, "overflow error: file %s, line %d\n", __FILE__, __LINE__)
 
 /* Handle underflow. */
-#define	JAS_FIX_UFLOW() \
-	fprintf(stderr, "underflow error: file %s, line %d\n", __FILE__, __LINE__)
+#define JAS_FIX_UFLOW() \
+        fprintf(stderr, "underflow error: file %s, line %d\n", __FILE__, __LINE__)
 
 #ifdef __cplusplus
 }
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_getopt.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_getopt.h
index 4f272dc9..31087948 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_getopt.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_getopt.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -127,11 +127,11 @@ extern "C" {
 * Constants.
 \******************************************************************************/
 
-#define	JAS_GETOPT_EOF	(-1)
-#define	JAS_GETOPT_ERR	'?'
+#define JAS_GETOPT_EOF  (-1)
+#define JAS_GETOPT_ERR  '?'
 
 /* option flags. */
-#define	JAS_OPT_HASARG	0x01	/* option has argument */
+#define JAS_OPT_HASARG  0x01    /* option has argument */
 
 /******************************************************************************\
 * Types.
@@ -140,14 +140,14 @@ extern "C" {
 /* Command line option type. */
 typedef struct {
 
-	int id;
-	/* The unique identifier for this option. */
+        int id;
+        /* The unique identifier for this option. */
 
-	char *name;
-	/* The name of this option. */
+        char *name;
+        /* The name of this option. */
 
-	int flags;
-	/* option flags. */
+        int flags;
+        /* option flags. */
 
 } jas_opt_t;
 
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h
index 20170986..56bb6cdf 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -140,36 +140,36 @@ extern "C" {
  */
 
 /* The threshold at which image data is no longer stored in memory. */
-#define JAS_IMAGE_INMEMTHRESH	(16 * 1024 * 1024)
+#define JAS_IMAGE_INMEMTHRESH   (16 * 1024 * 1024)
 
 /*
  * Color models.
  */
 
-#define JAS_IMAGE_CS_UNKNOWN	0	/* Unknown */
-#define	JAS_IMAGE_CS_GRAY	1	/* Standard Gray */
-#define	JAS_IMAGE_CS_RGB	2	/* Standard RGB */
-#define	JAS_IMAGE_CS_YCBCR	3	/* Standard YCC */
+#define JAS_IMAGE_CS_UNKNOWN    0       /* Unknown */
+#define JAS_IMAGE_CS_GRAY       1       /* Standard Gray */
+#define JAS_IMAGE_CS_RGB        2       /* Standard RGB */
+#define JAS_IMAGE_CS_YCBCR      3       /* Standard YCC */
 #if 0
-#define	JAS_IMAGE_CM_ICC	4	/* ICC Profile */
+#define JAS_IMAGE_CM_ICC        4       /* ICC Profile */
 #endif
 /*
  * Component types
  */
 
-#define	JAS_IMAGE_CT_UNKNOWN	0x10000
-#define	JAS_IMAGE_CT_COLOR(n)	((n) & 0x7fff)
-#define	JAS_IMAGE_CT_OPACITY	0x08000
+#define JAS_IMAGE_CT_UNKNOWN    0x10000
+#define JAS_IMAGE_CT_COLOR(n)   ((n) & 0x7fff)
+#define JAS_IMAGE_CT_OPACITY    0x08000
 
-#define	JAS_IMAGE_CT_RGB_R	0
-#define	JAS_IMAGE_CT_RGB_G	1
-#define	JAS_IMAGE_CT_RGB_B	2
+#define JAS_IMAGE_CT_RGB_R      0
+#define JAS_IMAGE_CT_RGB_G      1
+#define JAS_IMAGE_CT_RGB_B      2
 
-#define	JAS_IMAGE_CT_YCBCR_Y	0
-#define	JAS_IMAGE_CT_YCBCR_CB	1
-#define	JAS_IMAGE_CT_YCBCR_CR	2
+#define JAS_IMAGE_CT_YCBCR_Y    0
+#define JAS_IMAGE_CT_YCBCR_CB   1
+#define JAS_IMAGE_CT_YCBCR_CR   2
 
-#define	JAS_IMAGE_CT_GRAY_Y	0
+#define JAS_IMAGE_CT_GRAY_Y     0
 
 /*****************************************************************************\
 * Image class and supporting classes.
@@ -179,40 +179,40 @@ extern "C" {
 
 typedef struct {
 
-	uint_fast32_t tlx_;
-	/* The x-coordinate of the top-left corner of the component. */
+        uint_fast32_t tlx_;
+        /* The x-coordinate of the top-left corner of the component. */
 
-	uint_fast32_t tly_;
-	/* The y-coordinate of the top-left corner of the component. */
+        uint_fast32_t tly_;
+        /* The y-coordinate of the top-left corner of the component. */
 
-	uint_fast32_t hstep_;
-	/* The horizontal sampling period in units of the reference grid. */
+        uint_fast32_t hstep_;
+        /* The horizontal sampling period in units of the reference grid. */
 
-	uint_fast32_t vstep_;
-	/* The vertical sampling period in units of the reference grid. */
+        uint_fast32_t vstep_;
+        /* The vertical sampling period in units of the reference grid. */
 
-	uint_fast32_t width_;
-	/* The component width in samples. */
+        uint_fast32_t width_;
+        /* The component width in samples. */
 
-	uint_fast32_t height_;
-	/* The component height in samples. */
+        uint_fast32_t height_;
+        /* The component height in samples. */
 
-	uint_fast16_t prec_;
-	/* The precision of the sample data (i.e., the number of bits per
-	sample).  If the samples are signed values, this quantity
-	includes the sign bit. */
+        uint_fast16_t prec_;
+        /* The precision of the sample data (i.e., the number of bits per
+        sample).  If the samples are signed values, this quantity
+        includes the sign bit. */
 
-	uint_fast8_t sgnd_;
-	/* The signedness of the sample data. */
+        uint_fast8_t sgnd_;
+        /* The signedness of the sample data. */
 
-	jas_stream_t *stream_;
-	/* The stream containing the component data. */
+        jas_stream_t *stream_;
+        /* The stream containing the component data. */
 
-	int cps_;
-	/* The number of characters per sample in the stream. */
+        int cps_;
+        /* The number of characters per sample in the stream. */
 
-	uint_fast32_t type_;
-	/* The type of component (e.g., opacity, red, green, blue, luma). */
+        uint_fast32_t type_;
+        /* The type of component (e.g., opacity, red, green, blue, luma). */
 
 } jas_image_cmpt_t;
 
@@ -220,40 +220,40 @@ typedef struct {
 
 typedef struct {
 
-	uint_fast32_t tlx_;
-	/* The x-coordinate of the top-left corner of the image bounding box. */
+        uint_fast32_t tlx_;
+        /* The x-coordinate of the top-left corner of the image bounding box. */
 
-	uint_fast32_t tly_;
-	/* The y-coordinate of the top-left corner of the image bounding box. */
+        uint_fast32_t tly_;
+        /* The y-coordinate of the top-left corner of the image bounding box. */
 
-	uint_fast32_t brx_;
-	/* The x-coordinate of the bottom-right corner of the image bounding
-	  box (plus one). */
+        uint_fast32_t brx_;
+        /* The x-coordinate of the bottom-right corner of the image bounding
+          box (plus one). */
 
-	uint_fast32_t bry_;
-	/* The y-coordinate of the bottom-right corner of the image bounding
-	  box (plus one). */
+        uint_fast32_t bry_;
+        /* The y-coordinate of the bottom-right corner of the image bounding
+          box (plus one). */
 
-	uint_fast16_t numcmpts_;
-	/* The number of components. */
+        uint_fast16_t numcmpts_;
+        /* The number of components. */
 
-	uint_fast16_t maxcmpts_;
-	/* The maximum number of components that this image can have (i.e., the
-	  allocated size of the components array). */
+        uint_fast16_t maxcmpts_;
+        /* The maximum number of components that this image can have (i.e., the
+          allocated size of the components array). */
 
-	jas_image_cmpt_t **cmpts_;
-	/* Per-component information. */
+        jas_image_cmpt_t **cmpts_;
+        /* Per-component information. */
 
-	int colorspace_;
-	/* The color space used (e.g., RGB, YCbCr, gray).  This field is only
-	of particular relevance in the case of a multi-component image. */
+        int colorspace_;
+        /* The color space used (e.g., RGB, YCbCr, gray).  This field is only
+        of particular relevance in the case of a multi-component image. */
 
-	unsigned char *iccp_;
-	/* ICC profile information. */
+        unsigned char *iccp_;
+        /* ICC profile information. */
 
-	int iccplen_;
+        int iccplen_;
 
-	bool inmem_;
+        bool inmem_;
 
 } jas_image_t;
 
@@ -263,29 +263,29 @@ typedef struct {
 
 typedef struct {
 
-	uint_fast32_t tlx;
-	/* The x-coordinate of the top-left corner of the component. */
+        uint_fast32_t tlx;
+        /* The x-coordinate of the top-left corner of the component. */
 
-	uint_fast32_t tly;
-	/* The y-coordinate of the top-left corner of the component. */
+        uint_fast32_t tly;
+        /* The y-coordinate of the top-left corner of the component. */
 
-	uint_fast32_t hstep;
-	/* The horizontal sampling period in units of the reference grid. */
+        uint_fast32_t hstep;
+        /* The horizontal sampling period in units of the reference grid. */
 
-	uint_fast32_t vstep;
-	/* The vertical sampling period in units of the reference grid. */
+        uint_fast32_t vstep;
+        /* The vertical sampling period in units of the reference grid. */
 
-	uint_fast32_t width;
-	/* The width of the component in samples. */
+        uint_fast32_t width;
+        /* The width of the component in samples. */
 
-	uint_fast32_t height;
-	/* The height of the component in samples. */
+        uint_fast32_t height;
+        /* The height of the component in samples. */
 
-	uint_fast16_t prec;
-	/* The precision of the component sample data. */
+        uint_fast16_t prec;
+        /* The precision of the component sample data. */
 
-	bool sgnd;
-	/* The signedness of the component sample data. */
+        bool sgnd;
+        /* The signedness of the component sample data. */
 
 } jas_image_cmptparm_t;
 
@@ -293,24 +293,24 @@ typedef struct {
 * File format related classes.
 \******************************************************************************/
 
-#define	JAS_IMAGE_MAXFMTS	32
+#define JAS_IMAGE_MAXFMTS       32
 /* The maximum number of image data formats we can handle. */
 
 /* Image format-dependent operations. */
 
 typedef struct {
 
-	void (*decode)(jas_stream_t * const in,
-				   const char *   const opts,
-				   jas_image_t ** const imagePP,
-				   const char **  const errorP);
-	/* Decode image data from a stream. */
+        void (*decode)(jas_stream_t * const in,
+                                   const char *   const opts,
+                                   jas_image_t ** const imagePP,
+                                   const char **  const errorP);
+        /* Decode image data from a stream. */
 
-	int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts);
-	/* Encode image data to a stream. */
+        int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts);
+        /* Encode image data to a stream. */
 
-	int (*validate)(jas_stream_t *in);
-	/* Determine if stream data is in a particular format. */
+        int (*validate)(jas_stream_t *in);
+        /* Determine if stream data is in a particular format. */
 
 } jas_image_fmtops_t;
 
@@ -318,20 +318,20 @@ typedef struct {
 
 typedef struct {
 
-	int id;
-	/* The ID for this format. */
+        int id;
+        /* The ID for this format. */
 
-	char *name;
-	/* The name by which this format is identified. */
+        char *name;
+        /* The name by which this format is identified. */
 
-	char *ext;
-	/* The file name extension associated with this format. */
+        char *ext;
+        /* The file name extension associated with this format. */
 
-	char *desc;
-	/* A brief description of the format. */
+        char *desc;
+        /* A brief description of the format. */
 
-	jas_image_fmtops_t ops;
-	/* The operations for this format. */
+        jas_image_fmtops_t ops;
+        /* The operations for this format. */
 
 } jas_image_fmtinfo_t;
 
@@ -354,92 +354,92 @@ void jas_image_destroy(jas_image_t *image);
 
 /* Get the width of the image in units of the image reference grid. */
 #define jas_image_width(image) \
-	((image)->brx_ - (image)->tlx_)
+        ((image)->brx_ - (image)->tlx_)
 
 /* Get the height of the image in units of the image reference grid. */
-#define	jas_image_height(image) \
-	((image)->bry_ - (image)->tly_)
+#define jas_image_height(image) \
+        ((image)->bry_ - (image)->tly_)
 
 /* Get the x-coordinate of the top-left corner of the image bounding box
   on the reference grid. */
 #define jas_image_tlx(image) \
-	((image)->tlx_)
+        ((image)->tlx_)
 
 /* Get the y-coordinate of the top-left corner of the image bounding box
   on the reference grid. */
 #define jas_image_tly(image) \
-	((image)->tly_)
+        ((image)->tly_)
 
 /* Get the x-coordinate of the bottom-right corner of the image bounding box
   on the reference grid (plus one). */
 #define jas_image_brx(image) \
-	((image)->brx_)
+        ((image)->brx_)
 
 /* Get the y-coordinate of the bottom-right corner of the image bounding box
   on the reference grid (plus one). */
 #define jas_image_bry(image) \
-	((image)->bry_)
+        ((image)->bry_)
 
 /* Get the number of image components. */
-#define	jas_image_numcmpts(image) \
-	((image)->numcmpts_)
+#define jas_image_numcmpts(image) \
+        ((image)->numcmpts_)
 
 /* Get the color model used by the image. */
-#define	jas_image_colorspace(image) \
-	((image)->colorspace_)
+#define jas_image_colorspace(image) \
+        ((image)->colorspace_)
 
 /* Set the color model for an image. */
 #define jas_image_setcolorspace(image, colorspace) \
-	((image)->colorspace_ = (colorspace))
+        ((image)->colorspace_ = (colorspace))
 
 #define jas_image_cmpttype(image, cmptno) \
-	((image)->cmpts_[(cmptno)]->type_)
+        ((image)->cmpts_[(cmptno)]->type_)
 #define jas_image_setcmpttype(image, cmptno, type) \
-	((image)->cmpts_[(cmptno)]->type_ = (type))
+        ((image)->cmpts_[(cmptno)]->type_ = (type))
 
 /* Get the width of a component. */
-#define	jas_image_cmptwidth(image, cmptno) \
-	((image)->cmpts_[cmptno]->width_)
+#define jas_image_cmptwidth(image, cmptno) \
+        ((image)->cmpts_[cmptno]->width_)
 
 /* Get the height of a component. */
-#define	jas_image_cmptheight(image, cmptno) \
-	((image)->cmpts_[cmptno]->height_)
+#define jas_image_cmptheight(image, cmptno) \
+        ((image)->cmpts_[cmptno]->height_)
 
 /* Get the signedness of the sample data for a component. */
-#define	jas_image_cmptsgnd(image, cmptno) \
-	((image)->cmpts_[cmptno]->sgnd_)
+#define jas_image_cmptsgnd(image, cmptno) \
+        ((image)->cmpts_[cmptno]->sgnd_)
 
 /* Get the precision of the sample data for a component. */
-#define	jas_image_cmptprec(image, cmptno) \
-	((image)->cmpts_[cmptno]->prec_)
+#define jas_image_cmptprec(image, cmptno) \
+        ((image)->cmpts_[cmptno]->prec_)
 
 /* Get the horizontal subsampling factor for a component. */
-#define	jas_image_cmpthstep(image, cmptno) \
-	((image)->cmpts_[cmptno]->hstep_)
+#define jas_image_cmpthstep(image, cmptno) \
+        ((image)->cmpts_[cmptno]->hstep_)
 
 /* Get the vertical subsampling factor for a component. */
-#define	jas_image_cmptvstep(image, cmptno) \
-	((image)->cmpts_[cmptno]->vstep_)
+#define jas_image_cmptvstep(image, cmptno) \
+        ((image)->cmpts_[cmptno]->vstep_)
 
 /* Get the x-coordinate of the top-left corner of a component. */
-#define	jas_image_cmpttlx(image, cmptno) \
-	((image)->cmpts_[cmptno]->tlx_)
+#define jas_image_cmpttlx(image, cmptno) \
+        ((image)->cmpts_[cmptno]->tlx_)
 
 /* Get the y-coordinate of the top-left corner of a component. */
-#define	jas_image_cmpttly(image, cmptno) \
-	((image)->cmpts_[cmptno]->tly_)
+#define jas_image_cmpttly(image, cmptno) \
+        ((image)->cmpts_[cmptno]->tly_)
 
 /* Get the x-coordinate of the bottom-right corner of a component
   (plus "one"). */
-#define	jas_image_cmptbrx(image, cmptno) \
-	((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \
-	  (image)->cmpts_[cmptno]->hstep_)
+#define jas_image_cmptbrx(image, cmptno) \
+        ((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \
+          (image)->cmpts_[cmptno]->hstep_)
 
 /* Get the y-coordinate of the bottom-right corner of a component
   (plus "one"). */
-#define	jas_image_cmptbry(image, cmptno) \
-	((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \
-	  (image)->cmpts_[cmptno]->vstep_)
+#define jas_image_cmptbry(image, cmptno) \
+        ((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \
+          (image)->cmpts_[cmptno]->vstep_)
 
 /* Get the raw size of an image (i.e., the nominal size of the image without
   any compression. */
@@ -449,10 +449,10 @@ uint_fast32_t jas_image_rawsize(jas_image_t *image);
 
 void
 pmjas_image_decode(jas_stream_t * const in,
-				   int            const fmt,
-				   const char *   const optstr,
-				   jas_image_t ** const imagePP,
-				   const char **  const errorP);
+                                   int            const fmt,
+                                   const char *   const optstr,
+                                   jas_image_t ** const imagePP,
+                                   const char **  const errorP);
 
 /* Write an image to a stream in a specified format. */
 int jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt,
@@ -486,13 +486,13 @@ int_fast64_t jas_image_readcmpt1(jas_image_t *image, uint_fast16_t cmptno,
   uint_fast32_t x, uint_fast32_t y);
 #endif
 
-#define	JAS_IMAGE_CDT_GETSGND(dtype) (((dtype) >> 7) & 1)
-#define	JAS_IMAGE_CDT_SETSGND(dtype) (((dtype) & 1) << 7)
-#define	JAS_IMAGE_CDT_GETPREC(dtype) ((dtype) & 0x7f)
-#define	JAS_IMAGE_CDT_SETPREC(dtype) ((dtype) & 0x7f)
+#define JAS_IMAGE_CDT_GETSGND(dtype) (((dtype) >> 7) & 1)
+#define JAS_IMAGE_CDT_SETSGND(dtype) (((dtype) & 1) << 7)
+#define JAS_IMAGE_CDT_GETPREC(dtype) ((dtype) & 0x7f)
+#define JAS_IMAGE_CDT_SETPREC(dtype) ((dtype) & 0x7f)
 
-#define	jas_image_cmptdtype(image, cmptno) \
-	(JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_))
+#define jas_image_cmptdtype(image, cmptno) \
+        (JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_))
 
 void jas_image_dump(jas_image_t *image, FILE *out);
 
@@ -513,7 +513,7 @@ int jas_image_getcmptbytype(jas_image_t *image, int ctype);
 void jas_image_clearfmts(void);
 
 /* Add entry to table of image formats. */
-int jas_image_addfmt(int id, const char *name, const char *ext, 
+int jas_image_addfmt(int id, const char *name, const char *ext,
   const char *desc,
   jas_image_fmtops_t *ops);
 
@@ -578,9 +578,9 @@ int bmp_validate(jas_stream_t *in);
 /* Format-dependent operations for JP2 capability. */
 void
 jp2_decode(jas_stream_t * const in,
-		   const char *   const optstr,
-		   jas_image_t ** const imagePP,
-		   const char **  const errorP);
+                   const char *   const optstr,
+                   jas_image_t ** const imagePP,
+                   const char **  const errorP);
 int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
 int jp2_validate(jas_stream_t *in);
 #endif
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_init.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_init.h
index 4ebeaa87..8d84a10b 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_init.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_init.h
@@ -4,14 +4,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -19,22 +19,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -54,17 +54,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -104,7 +104,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_malloc.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_malloc.h
index fe5b6172..c2a32581 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_malloc.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_malloc.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -138,10 +138,10 @@ extern "C" {
 /* This is somewhat of a hack, but it's a useful hack. :-) */
 /* Use my own custom memory allocator for debugging. */
 #include "../../../../local/src/memalloc.h"
-#define jas_malloc	MEMALLOC
-#define	jas_free	MEMFREE
-#define	jas_realloc	MEMREALLOC
-#define	jas_calloc	MEMCALLOC
+#define jas_malloc      MEMALLOC
+#define jas_free        MEMFREE
+#define jas_realloc     MEMREALLOC
+#define jas_calloc      MEMCALLOC
 #endif
 
 /******************************************************************************\
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_math.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_math.h
index a43051e5..2baac725 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_math.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_math.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -116,16 +116,16 @@
  * $Id$
  */
 
-#ifndef	JAS_MATH_H
-#define	JAS_MATH_H
+#ifndef JAS_MATH_H
+#define JAS_MATH_H
 
 /******************************************************************************\
 * Includes
 \******************************************************************************/
 
-#include	<assert.h>
-#include	<stdio.h>
-#include	<string.h>
+#include        <assert.h>
+#include        <stdio.h>
+#include        <string.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -136,25 +136,25 @@ extern "C" {
 \******************************************************************************/
 
 /* Compute the absolute value. */
-#define	JAS_ABS(x) \
-	(((x) >= 0) ? (x) : (-(x)))
+#define JAS_ABS(x) \
+        (((x) >= 0) ? (x) : (-(x)))
 
 /* Compute the minimum of two values. */
-#define	JAS_MIN(x, y) \
-	(((x) < (y)) ? (x) : (y))
+#define JAS_MIN(x, y) \
+        (((x) < (y)) ? (x) : (y))
 
 /* Compute the maximum of two values. */
-#define	JAS_MAX(x, y) \
-	(((x) > (y)) ? (x) : (y))
+#define JAS_MAX(x, y) \
+        (((x) > (y)) ? (x) : (y))
 
 /* Compute the remainder from division (where division is defined such
   that the remainder is always nonnegative). */
-#define	JAS_MOD(x, y) \
-	(((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y)))
+#define JAS_MOD(x, y) \
+        (((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y)))
 
 /* Compute the integer with the specified number of least significant bits
   set to one. */
-#define	JAS_ONES(n) \
+#define JAS_ONES(n) \
   ((1 << (n)) - 1)
 
 #ifdef __cplusplus
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_seq.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_seq.h
index 4599f50c..502470d0 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_seq.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_seq.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -135,7 +135,7 @@ extern "C" {
 \******************************************************************************/
 
 /* This matrix is a reference to another matrix. */
-#define JAS_MATRIX_REF	0x0001
+#define JAS_MATRIX_REF  0x0001
 
 /******************************************************************************\
 * Types.
@@ -151,38 +151,38 @@ typedef int_fast32_t jas_matent_t;
 
 typedef struct {
 
-	/* Additional state information. */
-	int flags_;
+        /* Additional state information. */
+        int flags_;
 
-	/* The starting horizontal index. */
-	int_fast32_t xstart_;
+        /* The starting horizontal index. */
+        int_fast32_t xstart_;
 
-	/* The starting vertical index. */
-	int_fast32_t ystart_;
+        /* The starting vertical index. */
+        int_fast32_t ystart_;
 
-	/* The ending horizontal index. */
-	int_fast32_t xend_;
+        /* The ending horizontal index. */
+        int_fast32_t xend_;
 
-	/* The ending vertical index. */
-	int_fast32_t yend_;
+        /* The ending vertical index. */
+        int_fast32_t yend_;
 
-	/* The number of rows in the matrix. */
-	int_fast32_t numrows_;
+        /* The number of rows in the matrix. */
+        int_fast32_t numrows_;
 
-	/* The number of columns in the matrix. */
-	int_fast32_t numcols_;
+        /* The number of columns in the matrix. */
+        int_fast32_t numcols_;
 
-	/* Pointers to the start of each row. */
-	jas_seqent_t **rows_;
+        /* Pointers to the start of each row. */
+        jas_seqent_t **rows_;
 
-	/* The allocated size of the rows array. */
-	int_fast32_t maxrows_;
+        /* The allocated size of the rows array. */
+        int_fast32_t maxrows_;
 
-	/* The matrix data buffer. */
-	jas_seqent_t *data_;
+        /* The matrix data buffer. */
+        jas_seqent_t *data_;
 
-	/* The allocated size of the data array. */
-	int_fast32_t datasize_;
+        /* The allocated size of the data array. */
+        int_fast32_t datasize_;
 
 } jas_matrix_t;
 
@@ -195,39 +195,39 @@ typedef jas_matrix_t jas_seq_t;
 
 /* Get the number of rows. */
 #define jas_matrix_numrows(matrix) \
-	((matrix)->numrows_)
+        ((matrix)->numrows_)
 
 /* Get the number of columns. */
 #define jas_matrix_numcols(matrix) \
-	((matrix)->numcols_)
+        ((matrix)->numcols_)
 
 /* Get a matrix element. */
 #define jas_matrix_get(matrix, i, j) \
-	((matrix)->rows_[i][j])
+        ((matrix)->rows_[i][j])
 
 /* Set a matrix element. */
 #define jas_matrix_set(matrix, i, j, v) \
-	((matrix)->rows_[i][j] = (v))
+        ((matrix)->rows_[i][j] = (v))
 
 /* Get an element from a matrix that is known to be a row or column vector. */
 #define jas_matrix_getv(matrix, i) \
-	(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \
-	  ((matrix)->rows_[i][0]))
+        (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \
+          ((matrix)->rows_[i][0]))
 
 /* Set an element in a matrix that is known to be a row or column vector. */
 #define jas_matrix_setv(matrix, i, v) \
-	(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \
-	  ((matrix)->rows_[i][0] = (v)))
+        (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \
+          ((matrix)->rows_[i][0] = (v)))
 
 /* Get the address of an element in a matrix. */
-#define	jas_matrix_getref(matrix, i, j) \
-	(&(matrix)->rows_[i][j])
+#define jas_matrix_getref(matrix, i, j) \
+        (&(matrix)->rows_[i][j])
 
-#define	jas_matrix_getvref(matrix, i) \
-	(((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i))
+#define jas_matrix_getvref(matrix, i) \
+        (((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i))
 
 #define jas_matrix_length(matrix) \
-	(max((matrix)->numrows_, (matrix)->numcols_))
+        (max((matrix)->numrows_, (matrix)->numcols_))
 
 /* Create a matrix with the specified dimensions. */
 jas_matrix_t *jas_matrix_create(int numrows, int numcols);
@@ -273,12 +273,12 @@ void jas_matrix_divpow2(jas_matrix_t *matrix, int n);
 void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val);
 
 /* The spacing between rows of a matrix. */
-#define	jas_matrix_rowstep(matrix) \
-	(((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0))
+#define jas_matrix_rowstep(matrix) \
+        (((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0))
 
 /* The spacing between columns of a matrix. */
-#define	jas_matrix_step(matrix) \
-	(((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1))
+#define jas_matrix_step(matrix) \
+        (((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1))
 
 /* Compare two matrices for equality. */
 int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1);
@@ -291,31 +291,31 @@ jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x);
 
 jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend);
 
-#define	jas_seq2d_destroy(s) \
-	jas_matrix_destroy(s)
-
-#define	jas_seq2d_xstart(s) \
-	((s)->xstart_)
-#define	jas_seq2d_ystart(s) \
-	((s)->ystart_)
-#define	jas_seq2d_xend(s) \
-	((s)->xend_)
-#define	jas_seq2d_yend(s) \
-	((s)->yend_)
-#define	jas_seq2d_getref(s, x, y) \
-	(jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
-#define	jas_seq2d_get(s, x, y) \
-	(jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
-#define	jas_seq2d_rowstep(s) \
-	jas_matrix_rowstep(s)
-#define	jas_seq2d_width(s) \
-	((s)->xend_ - (s)->xstart_)
-#define	jas_seq2d_height(s) \
-	((s)->yend_ - (s)->ystart_)
-#define	jas_seq2d_setshift(s, x, y) \
-	((s)->xstart_ = (x), (s)->ystart_ = (y), \
-	  (s)->xend_ = (s)->xstart_ + (s)->numcols_, \
-	  (s)->yend_ = (s)->ystart_ + (s)->numrows_)
+#define jas_seq2d_destroy(s) \
+        jas_matrix_destroy(s)
+
+#define jas_seq2d_xstart(s) \
+        ((s)->xstart_)
+#define jas_seq2d_ystart(s) \
+        ((s)->ystart_)
+#define jas_seq2d_xend(s) \
+        ((s)->xend_)
+#define jas_seq2d_yend(s) \
+        ((s)->yend_)
+#define jas_seq2d_getref(s, x, y) \
+        (jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
+#define jas_seq2d_get(s, x, y) \
+        (jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
+#define jas_seq2d_rowstep(s) \
+        jas_matrix_rowstep(s)
+#define jas_seq2d_width(s) \
+        ((s)->xend_ - (s)->xstart_)
+#define jas_seq2d_height(s) \
+        ((s)->yend_ - (s)->ystart_)
+#define jas_seq2d_setshift(s, x, y) \
+        ((s)->xstart_ = (x), (s)->ystart_ = (y), \
+          (s)->xend_ = (s)->xstart_ + (s)->numcols_, \
+          (s)->yend_ = (s)->ystart_ + (s)->numrows_)
 
 void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
   int ystart, int xend, int yend);
@@ -324,22 +324,22 @@ void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
 * Functions/macros for 1-D sequence class.
 \******************************************************************************/
 
-#define	jas_seq_create(start, end) \
-	(jas_seq2d_create(start, 0, end, 1))
+#define jas_seq_create(start, end) \
+        (jas_seq2d_create(start, 0, end, 1))
 
-#define	jas_seq_destroy(seq) \
-	(jas_seq2d_destroy(seq))
+#define jas_seq_destroy(seq) \
+        (jas_seq2d_destroy(seq))
 
 #define jas_seq_set(seq, i, v) \
-	((seq)->rows_[0][(i) - (seq)->xstart_] = (v))
-#define	jas_seq_getref(seq, i) \
-	(&(seq)->rows_[0][(i) - (seq)->xstart_])
-#define	jas_seq_get(seq, i) \
-	((seq)->rows_[0][(i) - (seq)->xstart_])
-#define	jas_seq_start(seq) \
-	((seq)->xstart_)
-#define	jas_seq_end(seq) \
-	((seq)->xend_)
+        ((seq)->rows_[0][(i) - (seq)->xstart_] = (v))
+#define jas_seq_getref(seq, i) \
+        (&(seq)->rows_[0][(i) - (seq)->xstart_])
+#define jas_seq_get(seq, i) \
+        ((seq)->rows_[0][(i) - (seq)->xstart_])
+#define jas_seq_start(seq) \
+        ((seq)->xstart_)
+#define jas_seq_end(seq) \
+        ((seq)->xend_)
 
 #ifdef __cplusplus
 }
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_stream.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_stream.h
index 1062fe1d..8d4d4a77 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_stream.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_stream.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -141,7 +141,7 @@ extern "C" {
 
 /* On most UNIX systems, we probably need to define O_BINARY ourselves. */
 #ifndef O_BINARY
-#define O_BINARY	0
+#define O_BINARY        0
 #endif
 
 /*
@@ -149,64 +149,64 @@ extern "C" {
  */
 
 /* The stream was opened for reading. */
-#define JAS_STREAM_READ	0x0001
+#define JAS_STREAM_READ 0x0001
 /* The stream was opened for writing. */
-#define JAS_STREAM_WRITE	0x0002
+#define JAS_STREAM_WRITE        0x0002
 /* The stream was opened for appending. */
-#define JAS_STREAM_APPEND	0x0004
+#define JAS_STREAM_APPEND       0x0004
 /* The stream was opened in binary mode. */
-#define JAS_STREAM_BINARY	0x0008
+#define JAS_STREAM_BINARY       0x0008
 /* The stream should be created/truncated. */
-#define JAS_STREAM_CREATE	0x0010
+#define JAS_STREAM_CREATE       0x0010
 
-#define JAS_STREAM_NOCLOSE	0x0020
+#define JAS_STREAM_NOCLOSE      0x0020
 
 /*
  * Stream buffering flags.
  */
 
 /* The stream is unbuffered. */
-#define JAS_STREAM_UNBUF	0x0000
+#define JAS_STREAM_UNBUF        0x0000
 /* The stream is line buffered. */
-#define JAS_STREAM_LINEBUF	0x0001
+#define JAS_STREAM_LINEBUF      0x0001
 /* The stream is fully buffered. */
-#define JAS_STREAM_FULLBUF	0x0002
+#define JAS_STREAM_FULLBUF      0x0002
 /* The buffering mode mask. */
-#define	JAS_STREAM_BUFMODEMASK	0x000f
+#define JAS_STREAM_BUFMODEMASK  0x000f
 
 /* The memory associated with the buffer needs to be deallocated when the
   stream is destroyed. */
-#define JAS_STREAM_FREEBUF	0x0008
+#define JAS_STREAM_FREEBUF      0x0008
 /* The buffer is currently being used for reading. */
-#define JAS_STREAM_RDBUF	0x0010
+#define JAS_STREAM_RDBUF        0x0010
 /* The buffer is currently being used for writing. */
-#define JAS_STREAM_WRBUF	0x0020
+#define JAS_STREAM_WRBUF        0x0020
 
 /*
  * Stream error flags.
  */
 
 /* The end-of-file has been encountered (on reading). */
-#define JAS_STREAM_EOF	0x0001
+#define JAS_STREAM_EOF  0x0001
 /* An I/O error has been encountered on the stream. */
-#define JAS_STREAM_ERR	0x0002
+#define JAS_STREAM_ERR  0x0002
 /* The read/write limit has been exceeded. */
-#define	JAS_STREAM_RWLIMIT	0x0004
+#define JAS_STREAM_RWLIMIT      0x0004
 /* The error mask. */
 #define JAS_STREAM_ERRMASK \
-	(JAS_STREAM_EOF | JAS_STREAM_ERR | JAS_STREAM_RWLIMIT)
+        (JAS_STREAM_EOF | JAS_STREAM_ERR | JAS_STREAM_RWLIMIT)
 
 /*
  * Other miscellaneous constants.
  */
 
 /* The default buffer size (for fully-buffered operation). */
-#define JAS_STREAM_BUFSIZE	8192
+#define JAS_STREAM_BUFSIZE      8192
 /* The default permission mask for file creation. */
-#define JAS_STREAM_PERMS	0666
+#define JAS_STREAM_PERMS        0666
 
 /* The maximum number of characters that can always be put back on a stream. */
-#define	JAS_STREAM_MAXPUTBACK	16
+#define JAS_STREAM_MAXPUTBACK   16
 
 /******************************************************************************\
 * Types.
@@ -224,17 +224,17 @@ typedef void jas_stream_obj_t;
 
 typedef struct {
 
-	/* Read characters from a file object. */
-	int (*read_)(jas_stream_obj_t *obj, char *buf, int cnt);
+        /* Read characters from a file object. */
+        int (*read_)(jas_stream_obj_t *obj, char *buf, int cnt);
 
-	/* Write characters to a file object. */
-	int (*write_)(jas_stream_obj_t *obj, char *buf, int cnt);
+        /* Write characters to a file object. */
+        int (*write_)(jas_stream_obj_t *obj, char *buf, int cnt);
 
-	/* Set the position for a file object. */
-	long (*seek_)(jas_stream_obj_t *obj, long offset, int origin);
+        /* Set the position for a file object. */
+        long (*seek_)(jas_stream_obj_t *obj, long offset, int origin);
 
-	/* Close a file object. */
-	int (*close_)(jas_stream_obj_t *obj);
+        /* Close a file object. */
+        int (*close_)(jas_stream_obj_t *obj);
 
 } jas_stream_ops_t;
 
@@ -244,46 +244,46 @@ typedef struct {
 
 typedef struct {
 
-	/* The mode in which the stream was opened. */
-	int openmode_;
+        /* The mode in which the stream was opened. */
+        int openmode_;
 
-	/* The buffering mode. */
-	int bufmode_;
+        /* The buffering mode. */
+        int bufmode_;
 
-	/* The stream status. */
-	int flags_;
+        /* The stream status. */
+        int flags_;
 
-	/* The start of the buffer area to use for reading/writing. */
-	unsigned char *bufbase_;
+        /* The start of the buffer area to use for reading/writing. */
+        unsigned char *bufbase_;
 
-	/* The start of the buffer area excluding the extra initial space for
-	  character putback. */
-	unsigned char *bufstart_;
+        /* The start of the buffer area excluding the extra initial space for
+          character putback. */
+        unsigned char *bufstart_;
 
-	/* The buffer size. */
-	int bufsize_;
+        /* The buffer size. */
+        int bufsize_;
 
-	/* The current position in the buffer. */
-	unsigned char *ptr_;
+        /* The current position in the buffer. */
+        unsigned char *ptr_;
 
-	/* The number of characters that must be read/written before
-	the buffer needs to be filled/flushed. */
-	int cnt_;
+        /* The number of characters that must be read/written before
+        the buffer needs to be filled/flushed. */
+        int cnt_;
 
-	/* A trivial buffer to be used for unbuffered operation. */
-	unsigned char tinybuf_[JAS_STREAM_MAXPUTBACK + 1];
+        /* A trivial buffer to be used for unbuffered operation. */
+        unsigned char tinybuf_[JAS_STREAM_MAXPUTBACK + 1];
 
-	/* The operations for the underlying stream file object. */
-	jas_stream_ops_t *ops_;
+        /* The operations for the underlying stream file object. */
+        jas_stream_ops_t *ops_;
 
-	/* The underlying stream file object. */
-	jas_stream_obj_t *obj_;
+        /* The underlying stream file object. */
+        jas_stream_obj_t *obj_;
 
-	/* The number of characters read/written. */
-	long rwcnt_;
+        /* The number of characters read/written. */
+        long rwcnt_;
 
-	/* The maximum number of characters that may be read/written. */
-	long rwlimit_;
+        /* The maximum number of characters that may be read/written. */
+        long rwlimit_;
 
 } jas_stream_t;
 
@@ -300,23 +300,23 @@ typedef int jas_stream_fileobj_t;
 
 typedef struct {
 
-	/* The data associated with this file. */
-	unsigned char *buf_;
+        /* The data associated with this file. */
+        unsigned char *buf_;
 
-	/* The allocated size of the buffer for holding file data. */
-	int bufsize_;
+        /* The allocated size of the buffer for holding file data. */
+        int bufsize_;
 
-	/* The length of the file. */
-	int_fast32_t len_;
+        /* The length of the file. */
+        int_fast32_t len_;
 
-	/* The seek position. */
-	int_fast32_t pos_;
+        /* The seek position. */
+        int_fast32_t pos_;
 
-	/* Is the buffer growable? */
-	int growable_;
+        /* Is the buffer growable? */
+        int growable_;
 
-	/* Was the buffer allocated internally? */
-	int myalloc_;
+        /* Was the buffer allocated internally? */
+        int myalloc_;
 
 } jas_stream_memobj_t;
 
@@ -348,26 +348,26 @@ int jas_stream_close(jas_stream_t *stream);
 
 /* Get the EOF indicator for a stream. */
 #define jas_stream_eof(stream) \
-	(((stream)->flags_ & JAS_STREAM_EOF) != 0)
+        (((stream)->flags_ & JAS_STREAM_EOF) != 0)
 
 /* Get the error indicator for a stream. */
 #define jas_stream_error(stream) \
-	(((stream)->flags_ & JAS_STREAM_ERR) != 0)
+        (((stream)->flags_ & JAS_STREAM_ERR) != 0)
 
 /* Clear the error indicator for a stream. */
 #define jas_stream_clearerr(stream) \
-	((stream)->flags_ &= ~(JAS_STREAM_ERR | JAS_STREAM_EOF))
+        ((stream)->flags_ &= ~(JAS_STREAM_ERR | JAS_STREAM_EOF))
 
 /* Get the read/write limit for a stream. */
-#define	jas_stream_getrwlimit(stream) \
-	(((const jas_stream_t *)(stream))->rwlimit_)
+#define jas_stream_getrwlimit(stream) \
+        (((const jas_stream_t *)(stream))->rwlimit_)
 
 /* Set the read/write limit for a stream. */
 int jas_stream_setrwlimit(jas_stream_t *stream, long rwlimit);
 
 /* Get the read/write count for a stream. */
-#define	jas_stream_getrwcount(stream) \
-	(((const jas_stream_t *)(stream))->rwcnt_)
+#define jas_stream_getrwcount(stream) \
+        (((const jas_stream_t *)(stream))->rwcnt_)
 
 /* Set the read/write count for a stream. */
 long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt);
@@ -378,16 +378,16 @@ long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt);
 
 /* Read a character from a stream. */
 #if defined(DEBUG)
-#define	jas_stream_getc(stream)	jas_stream_getc_func(stream)
+#define jas_stream_getc(stream) jas_stream_getc_func(stream)
 #else
-#define jas_stream_getc(stream)	jas_stream_getc_macro(stream)
+#define jas_stream_getc(stream) jas_stream_getc_macro(stream)
 #endif
 
 /* Write a character to a stream. */
 #if defined(DEBUG)
-#define jas_stream_putc(stream, c)	jas_stream_putc_func(stream, c)
+#define jas_stream_putc(stream, c)      jas_stream_putc_func(stream, c)
 #else
-#define jas_stream_putc(stream, c)	jas_stream_putc_macro(stream, c)
+#define jas_stream_putc(stream, c)      jas_stream_putc_macro(stream, c)
 #endif
 
 /* Read characters from a stream into a buffer. */
@@ -407,9 +407,9 @@ char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize);
 
 /* Look at the next character to be read from a stream without actually
   removing it from the stream. */
-#define	jas_stream_peekc(stream) \
-	(((stream)->cnt_ <= 0) ? jas_stream_fillbuf(stream, 0) : \
-	  ((int)(*(stream)->ptr_)))
+#define jas_stream_peekc(stream) \
+        (((stream)->cnt_ <= 0) ? jas_stream_fillbuf(stream, 0) : \
+          ((int)(*(stream)->ptr_)))
 
 /* Put a character back on a stream. */
 int jas_stream_ungetc(jas_stream_t *stream, int c);
@@ -463,26 +463,26 @@ directly, you will die a horrible, miserable, and painful death! */
 
 /* Read a character from a stream. */
 #define jas_stream_getc_macro(stream) \
-	((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
-	  JAS_STREAM_RWLIMIT))) ? \
-	  (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
-	  (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
-	  jas_stream_getc2(stream)) : EOF)
+        ((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
+          JAS_STREAM_RWLIMIT))) ? \
+          (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
+          (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
+          jas_stream_getc2(stream)) : EOF)
 #define jas_stream_getc2(stream) \
-	((--(stream)->cnt_ < 0) ? jas_stream_fillbuf(stream, 1) : \
-	  (++(stream)->rwcnt_, (int)(*(stream)->ptr_++)))
+        ((--(stream)->cnt_ < 0) ? jas_stream_fillbuf(stream, 1) : \
+          (++(stream)->rwcnt_, (int)(*(stream)->ptr_++)))
 
 /* Write a character to a stream. */
 #define jas_stream_putc_macro(stream, c) \
-	((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
-	  JAS_STREAM_RWLIMIT))) ? \
-	  (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
-	  (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
-	  jas_stream_putc2(stream, c)) : EOF)
+        ((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
+          JAS_STREAM_RWLIMIT))) ? \
+          (((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
+          (stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
+          jas_stream_putc2(stream, c)) : EOF)
 #define jas_stream_putc2(stream, c) \
-	(((stream)->bufmode_ |= JAS_STREAM_WRBUF, --(stream)->cnt_ < 0) ? \
-	  jas_stream_flushbuf((stream), (unsigned char)(c)) : \
-	  (++(stream)->rwcnt_, (int)(*(stream)->ptr_++ = (c))))
+        (((stream)->bufmode_ |= JAS_STREAM_WRBUF, --(stream)->cnt_ < 0) ? \
+          jas_stream_flushbuf((stream), (unsigned char)(c)) : \
+          (++(stream)->rwcnt_, (int)(*(stream)->ptr_++ = (c))))
 
 /* These prototypes need to be here for the sake of the stream_getc and
 stream_putc macros. */
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_string.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_string.h
index 55b611ba..ff2d3af4 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_string.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_string.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -116,8 +116,8 @@
  * $Id$
  */
 
-#ifndef	JAS_STRING_H
-#define	JAS_STRING_H
+#ifndef JAS_STRING_H
+#define JAS_STRING_H
 
 /******************************************************************************\
 * Includes.
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_tvp.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_tvp.h
index 9ac50dbd..34e389bf 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_tvp.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_tvp.h
@@ -4,14 +4,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -19,22 +19,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -54,17 +54,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -104,7 +104,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -133,11 +133,11 @@ extern "C" {
 
 typedef struct {
 
-	int id;
-	/* The ID for the tag. */
+        int id;
+        /* The ID for the tag. */
 
-	const char *name;
-	/* The name of the tag. */
+        const char *name;
+        /* The name of the tag. */
 
 } jas_taginfo_t;
 
@@ -145,17 +145,17 @@ typedef struct {
 
 typedef struct {
 
-	char *buf;
-	/* The parsing buffer. */
+        char *buf;
+        /* The parsing buffer. */
 
-	char *tag;
-	/* The current tag name. */
+        char *tag;
+        /* The current tag name. */
 
-	const char *val;
-	/* The current value. */
+        const char *val;
+        /* The current value. */
 
-	char *pos;
-	/* The current position in the parsing buffer. */
+        char *pos;
+        /* The current position in the parsing buffer. */
 
 } jas_tvparser_t;
 
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h
index fbcb2ffb..ce12e083 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_types.h
@@ -10,5 +10,5 @@
 /* The below macro is intended to be used for type casts.  By using this
   macro, type casts can be easily located in the source code with
   tools like "grep". */
-#define	JAS_CAST(t, e) \
-	((t) (e))
+#define JAS_CAST(t, e) \
+        ((t) (e))
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_version.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_version.h
index 2178257c..28442f51 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jas_version.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_version.h
@@ -6,14 +6,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -21,22 +21,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -56,17 +56,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -106,7 +106,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */
 
@@ -128,28 +128,28 @@ extern "C" {
 #if !defined(JAS_VERSION)
 /* The version information below should match that specified in
   the "configure.in" file! */
-#define	JAS_VERSION		"1.600.0"
+#define JAS_VERSION             "1.600.0"
 #endif
 
-#define	JAS_COPYRIGHT \
-	"Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \
-	"  British Columbia.\n" \
-	"Copyright (c) 2001-2002 Michael David Adams.\n" \
-	"All rights reserved.\n"
+#define JAS_COPYRIGHT \
+        "Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \
+        "  British Columbia.\n" \
+        "Copyright (c) 2001-2002 Michael David Adams.\n" \
+        "All rights reserved.\n"
 
-#define	JAS_NOTES \
-	"For more information about this software, please visit the following\n" \
-	"web sites/pages:\n" \
-	"    http://www.ece.ubc.ca/~mdadams/jasper\n" \
-	"    http://www.jpeg.org/software\n" \
-	"To be added to the (moderated) JasPer software announcements\n" \
-	"mailing list, send an email to:\n" \
-	"    jasper-announce-subscribe@yahoogroups.com\n" \
-	"To be added to the (unmoderated) JasPer software discussion\n" \
-	"mailing list, send an email to:\n" \
-	"    jasper-discussion-subscribe@yahoogroups.com\n" \
-	"Please send any bug reports to:\n" \
-	"    mdadams@ieee.org\n"
+#define JAS_NOTES \
+        "For more information about this software, please visit the following\n" \
+        "web sites/pages:\n" \
+        "    http://www.ece.ubc.ca/~mdadams/jasper\n" \
+        "    http://www.jpeg.org/software\n" \
+        "To be added to the (moderated) JasPer software announcements\n" \
+        "mailing list, send an email to:\n" \
+        "    jasper-announce-subscribe@yahoogroups.com\n" \
+        "To be added to the (unmoderated) JasPer software discussion\n" \
+        "mailing list, send an email to:\n" \
+        "    jasper-discussion-subscribe@yahoogroups.com\n" \
+        "Please send any bug reports to:\n" \
+        "    mdadams@ieee.org\n"
 
 /******************************************************************************\
 * Functions.
diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jasper.h b/converter/other/jpeg2000/libjasper/include/jasper/jasper.h
index b003acfa..68986c65 100644
--- a/converter/other/jpeg2000/libjasper/include/jasper/jasper.h
+++ b/converter/other/jpeg2000/libjasper/include/jasper/jasper.h
@@ -4,14 +4,14 @@
  */
 
 /* __START_OF_JASPER_LICENSE__
- * 
+ *
  * JasPer Software License
- * 
+ *
  * IMAGE POWER JPEG-2000 PUBLIC LICENSE
  * ************************************
- * 
+ *
  * GRANT:
- * 
+ *
  * Permission is hereby granted, free of charge, to any person (the "User")
  * obtaining a copy of this software and associated documentation, to deal
  * in the JasPer Software without restriction, including without limitation
@@ -19,22 +19,22 @@
  * and/or sell copies of the JasPer Software (in source and binary forms),
  * and to permit persons to whom the JasPer Software is furnished to do so,
  * provided further that the License Conditions below are met.
- * 
+ *
  * License Conditions
  * ******************
- * 
+ *
  * A.  Redistributions of source code must retain the above copyright notice,
  * and this list of conditions, and the following disclaimer.
- * 
+ *
  * B.  Redistributions in binary form must reproduce the above copyright
  * notice, and this list of conditions, and the following disclaimer in
  * the documentation and/or other materials provided with the distribution.
- * 
+ *
  * C.  Neither the name of Image Power, Inc. nor any other contributor
  * (including, but not limited to, the University of British Columbia and
  * Michael David Adams) may be used to endorse or promote products derived
  * from this software without specific prior written permission.
- * 
+ *
  * D.  User agrees that it shall not commence any action against Image Power,
  * Inc., the University of British Columbia, Michael David Adams, or any
  * other contributors (collectively "Licensors") for infringement of any
@@ -54,17 +54,17 @@
  * trade dress, or service mark rights); and (v) divisions, continuations,
  * renewals, reissues and extensions of the foregoing (as and to the extent
  * applicable) now existing, hereafter filed, issued or acquired.
- * 
+ *
  * E.  If User commences an infringement action against any Licensor(s) then
  * such Licensor(s) shall have the right to terminate User's license and
  * all sublicenses that have been granted hereunder by User to other parties.
- * 
+ *
  * F.  This software is for use only in hardware or software products that
  * are compliant with ISO/IEC 15444-1 (i.e., JPEG-2000 Part 1).  No license
  * or right to this Software is granted for products that do not comply
  * with ISO/IEC 15444-1.  The JPEG-2000 Part 1 standard can be purchased
  * from the ISO.
- * 
+ *
  * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
  * NO USE OF THE JASPER SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
  * THIS DISCLAIMER.  THE JASPER SOFTWARE IS PROVIDED BY THE LICENSORS AND
@@ -104,7 +104,7 @@
  * TECHNOLOGY OR PRODUCTS FOR HIGH RISK ACTIVITIES AND WILL ENSURE THAT ITS
  * CUSTOMERS AND END-USERS OF ITS PRODUCTS ARE PROVIDED WITH A COPY OF THE
  * NOTICE SPECIFIED IN THIS SECTION.
- * 
+ *
  * __END_OF_JASPER_LICENSE__
  */