Skip to content

Commit a711e2a

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents ab4065f + a84afb6 commit a711e2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+850
-717
lines changed

3rdparty/libjpeg-turbo/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter -Wsign-compare -Wshorten-6
44

55
set(VERSION_MAJOR 2)
66
set(VERSION_MINOR 0)
7-
set(VERSION_REVISION 4)
7+
set(VERSION_REVISION 5)
88
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION})
9-
set(LIBJPEG_TURBO_VERSION_NUMBER 2000004)
9+
set(LIBJPEG_TURBO_VERSION_NUMBER 2000005)
1010

1111
string(TIMESTAMP BUILD "opencv-${OPENCV_VERSION}-libjpeg-turbo")
1212
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -65,6 +65,8 @@ set(JPEG_LIB_VERSION 62)
6565
# OpenCV
6666
set(JPEG_LIB_VERSION "${VERSION}-${JPEG_LIB_VERSION}" PARENT_SCOPE)
6767

68+
set(THREAD_LOCAL "") # WITH_TURBOJPEG is not used
69+
6870
if(MSVC)
6971
add_definitions(-W3 -wd4996 -wd4018)
7072
endif()

3rdparty/libjpeg-turbo/jconfigint.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#endif
1616
#endif
1717

18+
/* How to obtain thread-local storage */
19+
#define THREAD_LOCAL @THREAD_LOCAL@
20+
1821
/* Define to the full name of this package. */
1922
#define PACKAGE_NAME "@CMAKE_PROJECT_NAME@"
2023

3rdparty/libjpeg-turbo/src/jdatadst.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ empty_mem_output_buffer(j_compress_ptr cinfo)
143143

144144
MEMCOPY(nextbuffer, dest->buffer, dest->bufsize);
145145

146-
if (dest->newbuffer != NULL)
147-
free(dest->newbuffer);
146+
free(dest->newbuffer);
148147

149148
dest->newbuffer = nextbuffer;
150149

3rdparty/libjpeg-turbo/src/jversion.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This file was part of the Independent JPEG Group's software:
55
* Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
66
* libjpeg-turbo Modifications:
7-
* Copyright (C) 2010, 2012-2019, D. R. Commander.
7+
* Copyright (C) 2010, 2012-2020, D. R. Commander.
88
* For conditions of distribution and use, see the accompanying README.ijg
99
* file.
1010
*
@@ -36,7 +36,7 @@
3636
*/
3737

3838
#define JCOPYRIGHT \
39-
"Copyright (C) 2009-2019 D. R. Commander\n" \
39+
"Copyright (C) 2009-2020 D. R. Commander\n" \
4040
"Copyright (C) 2011-2016 Siarhei Siamashka\n" \
4141
"Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
4242
"Copyright (C) 2015 Intel Corporation\n" \
@@ -49,4 +49,4 @@
4949
"Copyright (C) 1991-2016 Thomas G. Lane, Guido Vollbeding"
5050

5151
#define JCOPYRIGHT_SHORT \
52-
"Copyright (C) 1991-2019 The libjpeg-turbo Project and many others"
52+
"Copyright (C) 1991-2020 The libjpeg-turbo Project and many others"

3rdparty/libjpeg/README

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The Independent JPEG Group's JPEG software
22
==========================================
33

4-
README for release 9c of 14-Jan-2018
4+
README for release 9d of 12-Jan-2020
55
====================================
66

77
This distribution contains the ninth public release of the Independent JPEG
@@ -10,8 +10,8 @@ to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
1010

1111
This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
1212
Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
13-
Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
14-
and other members of the Independent JPEG Group.
13+
John Korejwa, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
14+
Ge' Weijers, and other members of the Independent JPEG Group.
1515

1616
IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee
1717
(previously known as JPEG, together with ITU-T SG16).
@@ -115,7 +115,7 @@ with respect to this software, its quality, accuracy, merchantability, or
115115
fitness for a particular purpose. This software is provided "AS IS", and you,
116116
its user, assume the entire risk as to its quality and accuracy.
117117

118-
This software is copyright (C) 1991-2018, Thomas G. Lane, Guido Vollbeding.
118+
This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
119119
All Rights Reserved except as specified below.
120120

121121
Permission is hereby granted to use, copy, modify, and distribute this
@@ -152,13 +152,6 @@ The same holds for its supporting scripts (config.guess, config.sub,
152152
ltmain.sh). Another support script, install-sh, is copyright by X Consortium
153153
but is also freely distributable.
154154

155-
The IJG distribution formerly included code to read and write GIF files.
156-
To avoid entanglement with the Unisys LZW patent (now expired), GIF reading
157-
support has been removed altogether, and the GIF writer has been simplified
158-
to produce "uncompressed GIFs". This technique does not use the LZW
159-
algorithm; the resulting GIF files are larger than usual, but are readable
160-
by all standard GIF decoders.
161-
162155

163156
REFERENCES
164157
==========
@@ -246,8 +239,8 @@ ARCHIVE LOCATIONS
246239
The "official" archive site for this software is www.ijg.org.
247240
The most recent released version can always be found there in
248241
directory "files". This particular version will be archived as
249-
http://www.ijg.org/files/jpegsrc.v9c.tar.gz, and in Windows-compatible
250-
"zip" archive format as http://www.ijg.org/files/jpegsr9c.zip.
242+
http://www.ijg.org/files/jpegsrc.v9d.tar.gz, and in Windows-compatible
243+
"zip" archive format as http://www.ijg.org/files/jpegsr9d.zip.
251244

252245
The JPEG FAQ (Frequently Asked Questions) article is a source of some
253246
general information about JPEG.

3rdparty/libjpeg/change.log

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,55 @@
11
CHANGE LOG for Independent JPEG Group's JPEG software
22

33

4+
Version 9d 12-Jan-2020
5+
-----------------------
6+
7+
Optimize the optimal Huffman code table generation to produce
8+
slightly smaller files. Thank to John Korejwa for suggestion.
9+
Note: Requires rebuild of testimgp.jpg.
10+
11+
Decoding Huffman: Use default tables if tables are not defined.
12+
Thank to Simone Azzalin for report (Motion JPEG),
13+
and to Martin Strunz for hint.
14+
15+
Add sanity check in optimal Huffman code table generation.
16+
Thank to Adam Farley for suggestion.
17+
18+
rdtarga.c: use read_byte(), with EOF check, instead of getc()
19+
in read_*_pixel().
20+
Thank to Chijin Zhou for cjpeg potential vulnerability report.
21+
22+
jmemnobs.c: respect the max_memory_to_use setting in
23+
jpeg_mem_available() computation. Thank to Sheng Shu and
24+
Dongdong She for djpeg potential vulnerability report.
25+
26+
jdarith.c, jdhuff.c: avoid left shift of negative value
27+
compiler warning in decode_mcu_AC_refine().
28+
Thank to Indu Bhagat for suggestion.
29+
30+
Add x64 (64-bit) platform support, avoid compiler warnings.
31+
Thank to Jonathan Potter, Feiyun Wang, and Sheng Shu for suggestion.
32+
33+
Adjust libjpeg version specification for pkg-config file.
34+
Thank to Chen Chen for suggestion.
35+
36+
Restore GIF read and write support from libjpeg version 6a.
37+
Thank to Wolfgang Werner (W.W.) Heinz for suggestion.
38+
39+
Improve consistency in raw (downsampled) image data processing mode.
40+
Thank to Zhongyuan Zhou for hint.
41+
42+
Avoid out of bounds array read (AC derived table pointers)
43+
in start pass in jdhuff.c. Thank to Peng Li for report.
44+
45+
Improve code sanity (jdhuff.c).
46+
Thank to Reza Mirzazade farkhani for reports.
47+
48+
Add jpegtran -drop option; add options to the crop extension and wipe
49+
to fill the extra area with content from the source image region,
50+
instead of gray out.
51+
52+
453
Version 9c 14-Jan-2018
554
-----------------------
655

3rdparty/libjpeg/jcarith.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* jcarith.c
33
*
4-
* Developed 1997-2013 by Guido Vollbeding.
4+
* Developed 1997-2019 by Guido Vollbeding.
55
* This file is part of the Independent JPEG Group's software.
66
* For conditions of distribution and use, see the accompanying README file.
77
*
@@ -181,11 +181,11 @@ finish_pass (j_compress_ptr cinfo)
181181
if (e->zc) /* output final pending zero bytes */
182182
do emit_byte(0x00, cinfo);
183183
while (--e->zc);
184-
emit_byte((e->c >> 19) & 0xFF, cinfo);
184+
emit_byte((int) ((e->c >> 19) & 0xFF), cinfo);
185185
if (((e->c >> 19) & 0xFF) == 0xFF)
186186
emit_byte(0x00, cinfo);
187187
if (e->c & 0x7F800L) {
188-
emit_byte((e->c >> 11) & 0xFF, cinfo);
188+
emit_byte((int) ((e->c >> 11) & 0xFF), cinfo);
189189
if (((e->c >> 11) & 0xFF) == 0xFF)
190190
emit_byte(0x00, cinfo);
191191
}
@@ -280,7 +280,8 @@ arith_encode (j_compress_ptr cinfo, unsigned char *st, int val)
280280
/* Note: The 3 spacer bits in the C register guarantee
281281
* that the new buffer byte can't be 0xFF here
282282
* (see page 160 in the P&M JPEG book). */
283-
e->buffer = temp & 0xFF; /* new output byte, might overflow later */
283+
/* New output byte, might overflow later */
284+
e->buffer = (int) (temp & 0xFF);
284285
} else if (temp == 0xFF) {
285286
++e->sc; /* stack 0xFF byte (which might overflow later) */
286287
} else {
@@ -302,7 +303,8 @@ arith_encode (j_compress_ptr cinfo, unsigned char *st, int val)
302303
emit_byte(0x00, cinfo);
303304
} while (--e->sc);
304305
}
305-
e->buffer = temp & 0xFF; /* new output byte (can still overflow) */
306+
/* New output byte (can still overflow) */
307+
e->buffer = (int) (temp & 0xFF);
306308
}
307309
e->c &= 0x7FFFFL;
308310
e->ct += 8;
@@ -926,9 +928,8 @@ jinit_arith_encoder (j_compress_ptr cinfo)
926928
arith_entropy_ptr entropy;
927929
int i;
928930

929-
entropy = (arith_entropy_ptr)
930-
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
931-
SIZEOF(arith_entropy_encoder));
931+
entropy = (arith_entropy_ptr) (*cinfo->mem->alloc_small)
932+
((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(arith_entropy_encoder));
932933
cinfo->entropy = &entropy->pub;
933934
entropy->pub.start_pass = start_pass;
934935
entropy->pub.finish_pass = finish_pass;

0 commit comments

Comments
 (0)