summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-05-11 03:46:13 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-05-11 17:10:33 +0000
commit867aa217e6bcb543ea61c61f10088042d632bd07 (patch)
treeb30feb163f2144e3d8fd0d5a57a8523fdc401367
parent1a4d24b3a430ed7f75e76e64fb0e22d05a1fad0d (diff)
upgrade to jpeg-9a
Includes some type conversion fixes. Change-Id: I84f886e9f922acd780d46baea97f2d87c5ac700b Reviewed-on: https://gerrit.libreoffice.org/9306 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
-rw-r--r--download.lst3
-rw-r--r--external/jpeg/configs/jconfig.h14
-rw-r--r--external/jpeg/patches/jpeg-8c-jmorecfg.patch21
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx6
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx2
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx4
6 files changed, 23 insertions, 27 deletions
diff --git a/download.lst b/download.lst
index 617507df7f87..2bca393cb25f 100644
--- a/download.lst
+++ b/download.lst
@@ -67,7 +67,8 @@ export JFREEREPORT_LIBREPOSITORY_TARBALL := 8ce2fcd72becf06c41f7201d15373ed9-lib
export JFREEREPORT_LIBSERIALIZER_TARBALL := f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
export JFREEREPORT_LIBXML_TARBALL := ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
export JFREEREPORT_SAC_TARBALL := 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
-export JPEG_TARBALL := 52654eb3b2e60c35731ea8fc87f1bd29-jpegsrc.v8d.tar.gz
+export JPEG_MD5SUM := 3353992aecaee1805ef4109aadd433e7
+export JPEG_TARBALL := jpegsrc.v9a.tar.gz
export LANGTAGREG_MD5SUM := 504af523f5d1a5590bbeb6a4b55e8a97
export LANGTAGREG_TARBALL := language-subtag-registry-2014-03-27.tar.bz2
export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
diff --git a/external/jpeg/configs/jconfig.h b/external/jpeg/configs/jconfig.h
index 7ea8f50d47ce..0c430518c0e4 100644
--- a/external/jpeg/configs/jconfig.h
+++ b/external/jpeg/configs/jconfig.h
@@ -18,12 +18,18 @@
/* Define this if you get warnings about undefined structures. */
/* #undef INCOMPLETE_TYPES_BROKEN */
-/* Define "boolean" as unsigned char, not int, on Windows systems. */
-#ifdef WNT
-#ifndef __RPCNDR_H__/* don't conflict if rpcndr.h already read */
+/* Define "boolean" as unsigned char, not enum, on Windows systems. */
+#ifdef _WIN32
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
-#define HAVE_BOOLEAN/* prevent jmorecfg.h from redefining it */
+#ifndef FALSE /* in case these macros already exist */
+#define FALSE 0 /* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif
#ifdef JPEG_INTERNALS
diff --git a/external/jpeg/patches/jpeg-8c-jmorecfg.patch b/external/jpeg/patches/jpeg-8c-jmorecfg.patch
index 34437440220f..eed791fae9a0 100644
--- a/external/jpeg/patches/jpeg-8c-jmorecfg.patch
+++ b/external/jpeg/patches/jpeg-8c-jmorecfg.patch
@@ -1,25 +1,14 @@
---- misc/jpeg-8c/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100
-+++ misc/build/jpeg-8c/jmorecfg.h 2011-03-24 21:29:02.073761750 +0100
-@@ -21,7 +21,7 @@
- * We do not support run-time selection of data precision, sorry.
- */
-
--#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
-+#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
-
-
- /*
-@@ -158,7 +158,8 @@
-
+--- misc/jpeg-9a/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100
++++ misc/build/jpeg-9a/jmorecfg.h 2011-03-24 21:29:02.073761750 +0100
+@@ -210,6 +210,7 @@
/* INT32 must hold at least signed 32-bit values. */
--#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
-+#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
+ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
+#ifndef _SOLAR_H
#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
#ifndef _BASETSD_H /* MinGW is slightly different */
#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
-@@ -166,6 +167,7 @@
+@@ -217,6 +218,7 @@
#endif
#endif
#endif
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 31595038db0a..08fdf1dfd328 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -61,7 +61,7 @@ extern "C" void init_source (j_decompress_ptr cinfo)
* but we don't clear the input buffer.
* This is correct behavior for reading a series of images from one source.
*/
- source->start_of_file = 1;
+ source->start_of_file = TRUE;
}
long StreamRead( SvStream* pStream, void* pBuffer, long nBufferSize )
@@ -109,9 +109,9 @@ extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo)
source->pub.next_input_byte = source->buffer;
source->pub.bytes_in_buffer = nbytes;
- source->start_of_file = 0;
+ source->start_of_file = FALSE;
- return true;
+ return TRUE;
}
extern "C" void skip_input_data (j_decompress_ptr cinfo, long numberOfBytes)
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index ab2f045c5356..09a52500e951 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -62,7 +62,7 @@ extern "C" boolean empty_output_buffer (j_compress_ptr cinfo)
destination->pub.next_output_byte = destination->buffer;
destination->pub.free_in_buffer = BUFFER_SIZE;
- return true;
+ return TRUE;
}
extern "C" void term_destination (j_compress_ptr cinfo)
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 198aeaf766a7..04aa3a2202a2 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -356,7 +356,7 @@ long Transform(void* pInputStream, void* pOutputStream, long nAngle)
jpeg_svstream_src (&aSourceInfo, pInputStream);
jcopy_markers_setup(&aSourceInfo, aCopyOption);
- jpeg_read_header(&aSourceInfo, 1);
+ jpeg_read_header(&aSourceInfo, TRUE);
jtransform_request_workspace(&aSourceInfo, &aTransformOption);
aSourceCoefArrays = jpeg_read_coefficients(&aSourceInfo);
@@ -366,7 +366,7 @@ long Transform(void* pInputStream, void* pOutputStream, long nAngle)
jpeg_svstream_dest (&aDestinationInfo, pOutputStream);
// Compute optimal Huffman coding tables instead of precomuted tables
- aDestinationInfo.optimize_coding = 1;
+ aDestinationInfo.optimize_coding = TRUE;
jpeg_write_coefficients(&aDestinationInfo, aDestinationCoefArrays);
jcopy_markers_execute(&aSourceInfo, &aDestinationInfo, aCopyOption);
jtransform_execute_transformation(&aSourceInfo, &aDestinationInfo, aSourceCoefArrays, &aTransformOption);