summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-16 08:54:58 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-16 08:54:58 +0100
commit942ab490724fcc9544e786e5783718e1a07aa50b (patch)
treefeb7d3ff716edb37b2ca60e33c05adf8777bd964 /src/3rdparty
parent0fb8271a467202990c90321066e40faed640a7a8 (diff)
parent24adaa9a742e6f95ff897d0eb9a2bce0527dd042 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/corelib/tools/tools.pri Change-Id: I705630f9cecbf0ce51a22fc6116b8c49611259e9
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/angle/src/libANGLE/Debug2.cpp303
-rw-r--r--src/3rdparty/angle/src/libANGLE/Debug2.h120
-rw-r--r--src/3rdparty/libjpeg/qt_attribution.json2
-rw-r--r--src/3rdparty/libjpeg/src/ChangeLog.md44
-rw-r--r--src/3rdparty/libjpeg/src/jcdctmgr.c2
-rw-r--r--src/3rdparty/libjpeg/src/jdapistd.c33
-rw-r--r--src/3rdparty/libjpeg/src/jdcolor.c2
-rw-r--r--src/3rdparty/libjpeg/src/jdmerge.c2
-rw-r--r--src/3rdparty/pcre2/pcre2.pro2
-rw-r--r--src/3rdparty/sqlite/qt_attribution.json2
10 files changed, 79 insertions, 433 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/Debug2.cpp b/src/3rdparty/angle/src/libANGLE/Debug2.cpp
deleted file mode 100644
index 30321f4160..0000000000
--- a/src/3rdparty/angle/src/libANGLE/Debug2.cpp
+++ /dev/null
@@ -1,303 +0,0 @@
-//
-// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-
-// Debug.cpp: Defines debug state used for GL_KHR_debug
-
-#include "libANGLE/Debug.h"
-
-#include "common/debug.h"
-
-#include <algorithm>
-#include <tuple>
-
-namespace gl
-{
-
-Debug::Debug()
- : mOutputEnabled(false),
- mCallbackFunction(nullptr),
- mCallbackUserParam(nullptr),
- mMessages(),
- mMaxLoggedMessages(0),
- mOutputSynchronous(false),
- mGroups()
-{
- pushDefaultGroup();
-}
-
-void Debug::setMaxLoggedMessages(GLuint maxLoggedMessages)
-{
- mMaxLoggedMessages = maxLoggedMessages;
-}
-
-void Debug::setOutputEnabled(bool enabled)
-{
- mOutputEnabled = enabled;
-}
-
-bool Debug::isOutputEnabled() const
-{
- return mOutputEnabled;
-}
-
-void Debug::setOutputSynchronous(bool synchronous)
-{
- mOutputSynchronous = synchronous;
-}
-
-bool Debug::isOutputSynchronous() const
-{
- return mOutputSynchronous;
-}
-
-void Debug::setCallback(GLDEBUGPROCKHR callback, const void *userParam)
-{
- mCallbackFunction = callback;
- mCallbackUserParam = userParam;
-}
-
-GLDEBUGPROCKHR Debug::getCallback() const
-{
- return mCallbackFunction;
-}
-
-const void *Debug::getUserParam() const
-{
- return mCallbackUserParam;
-}
-
-void Debug::insertMessage(GLenum source,
- GLenum type,
- GLuint id,
- GLenum severity,
- const std::string &message)
-{
- std::string messageCopy(message);
- insertMessage(source, type, id, severity, std::move(messageCopy));
-}
-
-void Debug::insertMessage(GLenum source,
- GLenum type,
- GLuint id,
- GLenum severity,
- std::string &&message)
-{
- if (!isMessageEnabled(source, type, id, severity))
- {
- return;
- }
-
- if (mCallbackFunction != nullptr)
- {
- // TODO(geofflang) Check the synchronous flag and potentially flush messages from another
- // thread.
- mCallbackFunction(source, type, id, severity, static_cast<GLsizei>(message.length()),
- message.c_str(), mCallbackUserParam);
- }
- else
- {
- if (mMessages.size() >= mMaxLoggedMessages)
- {
- // Drop messages over the limit
- return;
- }
-
- Message m;
- m.source = source;
- m.type = type;
- m.id = id;
- m.severity = severity;
- m.message = std::move(message);
-
- mMessages.push_back(std::move(m));
- }
-}
-
-size_t Debug::getMessages(GLuint count,
- GLsizei bufSize,
- GLenum *sources,
- GLenum *types,
- GLuint *ids,
- GLenum *severities,
- GLsizei *lengths,
- GLchar *messageLog)
-{
- size_t messageCount = 0;
- size_t messageStringIndex = 0;
- while (messageCount <= count && !mMessages.empty())
- {
- const Message &m = mMessages.front();
-
- if (messageLog != nullptr)
- {
- // Check that this message can fit in the message buffer
- if (messageStringIndex + m.message.length() + 1 > static_cast<size_t>(bufSize))
- {
- break;
- }
-
- std::copy(m.message.begin(), m.message.end(), messageLog + messageStringIndex);
- messageStringIndex += m.message.length();
-
- messageLog[messageStringIndex] = '\0';
- messageStringIndex += 1;
- }
-
- if (sources != nullptr)
- {
- sources[messageCount] = m.source;
- }
-
- if (types != nullptr)
- {
- types[messageCount] = m.type;
- }
-
- if (ids != nullptr)
- {
- ids[messageCount] = m.id;
- }
-
- if (severities != nullptr)
- {
- severities[messageCount] = m.severity;
- }
-
- if (lengths != nullptr)
- {
- lengths[messageCount] = static_cast<GLsizei>(m.message.length());
- }
-
- mMessages.pop_front();
-
- messageCount++;
- }
-
- return messageCount;
-}
-
-size_t Debug::getNextMessageLength() const
-{
- return mMessages.empty() ? 0 : mMessages.front().message.length();
-}
-
-size_t Debug::getMessageCount() const
-{
- return mMessages.size();
-}
-
-void Debug::setMessageControl(GLenum source,
- GLenum type,
- GLenum severity,
- std::vector<GLuint> &&ids,
- bool enabled)
-{
- Control c;
- c.source = source;
- c.type = type;
- c.severity = severity;
- c.ids = std::move(ids);
- c.enabled = enabled;
-
- auto &controls = mGroups.back().controls;
- controls.push_back(std::move(c));
-}
-
-void Debug::pushGroup(GLenum source, GLuint id, std::string &&message)
-{
- insertMessage(source, GL_DEBUG_TYPE_PUSH_GROUP, id, GL_DEBUG_SEVERITY_NOTIFICATION,
- std::string(message));
-
- Group g;
- g.source = source;
- g.id = id;
- g.message = std::move(message);
- mGroups.push_back(std::move(g));
-}
-
-void Debug::popGroup()
-{
- // Make sure the default group is not about to be popped
- ASSERT(mGroups.size() > 1);
-
- Group g = mGroups.back();
- mGroups.pop_back();
-
- insertMessage(g.source, GL_DEBUG_TYPE_POP_GROUP, g.id, GL_DEBUG_SEVERITY_NOTIFICATION,
- g.message);
-}
-
-size_t Debug::getGroupStackDepth() const
-{
- return mGroups.size();
-}
-
-bool Debug::isMessageEnabled(GLenum source, GLenum type, GLuint id, GLenum severity) const
-{
- if (!mOutputEnabled)
- {
- return false;
- }
-
- for (auto groupIter = mGroups.rbegin(); groupIter != mGroups.rend(); groupIter++)
- {
- const auto &controls = groupIter->controls;
- for (auto controlIter = controls.rbegin(); controlIter != controls.rend(); controlIter++)
- {
- const auto &control = *controlIter;
-
- if (control.source != GL_DONT_CARE && control.source != source)
- {
- continue;
- }
-
- if (control.type != GL_DONT_CARE && control.type != type)
- {
- continue;
- }
-
- if (control.severity != GL_DONT_CARE && control.severity != severity)
- {
- continue;
- }
-
- if (!control.ids.empty() &&
- std::find(control.ids.begin(), control.ids.end(), id) == control.ids.end())
- {
- continue;
- }
-
- return control.enabled;
- }
- }
-
- return true;
-}
-
-void Debug::pushDefaultGroup()
-{
- Group g;
- g.source = GL_NONE;
- g.id = 0;
- g.message = "";
-
- Control c0;
- c0.source = GL_DONT_CARE;
- c0.type = GL_DONT_CARE;
- c0.severity = GL_DONT_CARE;
- c0.enabled = true;
- g.controls.push_back(std::move(c0));
-
- Control c1;
- c1.source = GL_DONT_CARE;
- c1.type = GL_DONT_CARE;
- c1.severity = GL_DEBUG_SEVERITY_LOW;
- c1.enabled = false;
- g.controls.push_back(std::move(c1));
-
- mGroups.push_back(std::move(g));
-}
-} // namespace gl
diff --git a/src/3rdparty/angle/src/libANGLE/Debug2.h b/src/3rdparty/angle/src/libANGLE/Debug2.h
deleted file mode 100644
index f545b815e4..0000000000
--- a/src/3rdparty/angle/src/libANGLE/Debug2.h
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-
-// Debug.h: Defines debug state used for GL_KHR_debug
-
-#ifndef LIBANGLE_DEBUG_H_
-#define LIBANGLE_DEBUG_H_
-
-#include "angle_gl.h"
-#include "common/angleutils.h"
-
-#include <deque>
-#include <string>
-#include <vector>
-
-namespace gl
-{
-
-class LabeledObject
-{
- public:
- virtual ~LabeledObject() {}
- virtual void setLabel(const std::string &label) = 0;
- virtual const std::string &getLabel() const = 0;
-};
-
-class Debug : angle::NonCopyable
-{
- public:
- Debug();
-
- void setMaxLoggedMessages(GLuint maxLoggedMessages);
-
- void setOutputEnabled(bool enabled);
- bool isOutputEnabled() const;
-
- void setOutputSynchronous(bool synchronous);
- bool isOutputSynchronous() const;
-
- void setCallback(GLDEBUGPROCKHR callback, const void *userParam);
- GLDEBUGPROCKHR getCallback() const;
- const void *getUserParam() const;
-
- void insertMessage(GLenum source,
- GLenum type,
- GLuint id,
- GLenum severity,
- const std::string &message);
- void insertMessage(GLenum source,
- GLenum type,
- GLuint id,
- GLenum severity,
- std::string &&message);
-
- void setMessageControl(GLenum source,
- GLenum type,
- GLenum severity,
- std::vector<GLuint> &&ids,
- bool enabled);
- size_t getMessages(GLuint count,
- GLsizei bufSize,
- GLenum *sources,
- GLenum *types,
- GLuint *ids,
- GLenum *severities,
- GLsizei *lengths,
- GLchar *messageLog);
- size_t getNextMessageLength() const;
- size_t getMessageCount() const;
-
- void pushGroup(GLenum source, GLuint id, std::string &&message);
- void popGroup();
- size_t getGroupStackDepth() const;
-
- private:
- bool isMessageEnabled(GLenum source, GLenum type, GLuint id, GLenum severity) const;
-
- void pushDefaultGroup();
-
- struct Message
- {
- GLenum source;
- GLenum type;
- GLuint id;
- GLenum severity;
- std::string message;
- };
-
- struct Control
- {
- GLenum source;
- GLenum type;
- GLenum severity;
- std::vector<GLuint> ids;
- bool enabled;
- };
-
- struct Group
- {
- GLenum source;
- GLuint id;
- std::string message;
-
- std::vector<Control> controls;
- };
-
- bool mOutputEnabled;
- GLDEBUGPROCKHR mCallbackFunction;
- const void *mCallbackUserParam;
- std::deque<Message> mMessages;
- GLuint mMaxLoggedMessages;
- bool mOutputSynchronous;
- std::vector<Group> mGroups;
-};
-} // namespace gl
-
-#endif // LIBANGLE_DEBUG_H_
diff --git a/src/3rdparty/libjpeg/qt_attribution.json b/src/3rdparty/libjpeg/qt_attribution.json
index a1966d43d6..9bfc14f29d 100644
--- a/src/3rdparty/libjpeg/qt_attribution.json
+++ b/src/3rdparty/libjpeg/qt_attribution.json
@@ -6,7 +6,7 @@
"Description": "The Independent JPEG Group's JPEG software",
"Homepage": "http://libjpeg-turbo.virtualgl.org/",
- "Version": "1.5.2",
+ "Version": "1.5.3",
"License": "Independent JPEG Group License",
"LicenseId": "IJG",
"LicenseFile": "LICENSE",
diff --git a/src/3rdparty/libjpeg/src/ChangeLog.md b/src/3rdparty/libjpeg/src/ChangeLog.md
index 2aaa50c148..f5fe44bf85 100644
--- a/src/3rdparty/libjpeg/src/ChangeLog.md
+++ b/src/3rdparty/libjpeg/src/ChangeLog.md
@@ -1,3 +1,47 @@
+1.5.3
+=====
+
+### Significant changes relative to 1.5.2:
+
+1. Fixed a NullPointerException in the TurboJPEG Java wrapper that occurred
+when using the YUVImage constructor that creates an instance backed by separate
+image planes and allocates memory for the image planes.
+
+2. Fixed an issue whereby the Java version of TJUnitTest would fail when
+testing BufferedImage encoding/decoding on big endian systems.
+
+3. Fixed a segfault in djpeg that would occur if an output format other than
+PPM/PGM was selected along with the `-crop` option. The `-crop` option now
+works with the GIF and Targa formats as well (unfortunately, it cannot be made
+to work with the BMP and RLE formats due to the fact that those output engines
+write scanlines in bottom-up order.) djpeg will now exit gracefully if an
+output format other than PPM/PGM, GIF, or Targa is selected along with the
+`-crop` option.
+
+4. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
+quantization was enabled.
+
+5. TJBench (both C and Java versions) will now display usage information if any
+command-line argument is unrecognized. This prevents the program from silently
+ignoring typos.
+
+6. Fixed an access violation in tjbench.exe (Windows) that occurred when the
+program was used to decompress an existing JPEG image.
+
+7. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
+occurred when attempting to decompress a JPEG image that had been compressed
+with 4:1:1 chrominance subsampling.
+
+8. Fixed an issue whereby, when using `jpeg_skip_scanlines()` to skip to the
+end of a single-scan (non-progressive) image, subsequent calls to
+`jpeg_consume_input()` would return `JPEG_SUSPENDED` rather than
+`JPEG_REACHED_EOI`.
+
+9. `jpeg_crop_scanlines()` now works correctly when decompressing grayscale
+JPEG images that were compressed with a sampling factor other than 1 (for
+instance, with `cjpeg -grayscale -sample 2x2`).
+
+
1.5.2
=====
diff --git a/src/3rdparty/libjpeg/src/jcdctmgr.c b/src/3rdparty/libjpeg/src/jcdctmgr.c
index aef8517f9c..6e3b19bcb3 100644
--- a/src/3rdparty/libjpeg/src/jcdctmgr.c
+++ b/src/3rdparty/libjpeg/src/jcdctmgr.c
@@ -216,7 +216,7 @@ compute_reciprocal (UINT16 divisor, DCTELEM *dtbl)
#endif
dtbl[DCTSIZE2 * 3] = (DCTELEM) r - sizeof(DCTELEM)*8; /* shift */
- if(r <= 16) return 0;
+ if (r <= 16) return 0;
else return 1;
}
diff --git a/src/3rdparty/libjpeg/src/jdapistd.c b/src/3rdparty/libjpeg/src/jdapistd.c
index 37afc8448b..105121df2b 100644
--- a/src/3rdparty/libjpeg/src/jdapistd.c
+++ b/src/3rdparty/libjpeg/src/jdapistd.c
@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
- * Copyright (C) 2010, 2015-2016, D. R. Commander.
+ * Copyright (C) 2010, 2015-2017, D. R. Commander.
* Copyright (C) 2015, Google, Inc.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -190,7 +190,10 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
* single-pass decompression case, allowing us to use the same MCU column
* width for all of the components.
*/
- align = cinfo->_min_DCT_scaled_size * cinfo->max_h_samp_factor;
+ if (cinfo->comps_in_scan == 1 && cinfo->num_components == 1)
+ align = cinfo->_min_DCT_scaled_size;
+ else
+ align = cinfo->_min_DCT_scaled_size * cinfo->max_h_samp_factor;
/* Adjust xoffset to the nearest iMCU boundary <= the requested value */
input_xoffset = *xoffset;
@@ -215,6 +218,9 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
+ int hsf = (cinfo->comps_in_scan == 1 && cinfo->num_components == 1) ?
+ 1 : compptr->h_samp_factor;
+
/* Set downsampled_width to the new output width. */
orig_downsampled_width = compptr->downsampled_width;
compptr->downsampled_width =
@@ -228,11 +234,10 @@ jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,
* values will be used in multi-scan decompressions.
*/
cinfo->master->first_MCU_col[ci] =
- (JDIMENSION) (long) (*xoffset * compptr->h_samp_factor) /
- (long) align;
+ (JDIMENSION) (long) (*xoffset * hsf) / (long) align;
cinfo->master->last_MCU_col[ci] =
(JDIMENSION) jdiv_round_up((long) ((*xoffset + cinfo->output_width) *
- compptr->h_samp_factor),
+ hsf),
(long) align) - 1;
}
@@ -293,6 +298,14 @@ noop_convert (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
}
+/* Dummy quantize function used by jpeg_skip_scanlines() */
+LOCAL(void)
+noop_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+ JSAMPARRAY output_buf, int num_rows)
+{
+}
+
+
/*
* In some cases, it is best to call jpeg_read_scanlines() and discard the
* output, rather than skipping the scanlines, because this allows us to
@@ -308,14 +321,22 @@ read_and_discard_scanlines (j_decompress_ptr cinfo, JDIMENSION num_lines)
void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
JDIMENSION input_row, JSAMPARRAY output_buf,
int num_rows);
+ void (*color_quantize) (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
+ JSAMPARRAY output_buf, int num_rows) = NULL;
color_convert = cinfo->cconvert->color_convert;
cinfo->cconvert->color_convert = noop_convert;
+ if (cinfo->cquantize && cinfo->cquantize->color_quantize) {
+ color_quantize = cinfo->cquantize->color_quantize;
+ cinfo->cquantize->color_quantize = noop_quantize;
+ }
for (n = 0; n < num_lines; n++)
jpeg_read_scanlines(cinfo, NULL, 1);
cinfo->cconvert->color_convert = color_convert;
+ if (color_quantize)
+ cinfo->cquantize->color_quantize = color_quantize;
}
@@ -370,6 +391,8 @@ jpeg_skip_scanlines (j_decompress_ptr cinfo, JDIMENSION num_lines)
/* Do not skip past the bottom of the image. */
if (cinfo->output_scanline + num_lines >= cinfo->output_height) {
cinfo->output_scanline = cinfo->output_height;
+ (*cinfo->inputctl->finish_input_pass) (cinfo);
+ cinfo->inputctl->eoi_reached = TRUE;
return cinfo->output_height - cinfo->output_scanline;
}
diff --git a/src/3rdparty/libjpeg/src/jdcolor.c b/src/3rdparty/libjpeg/src/jdcolor.c
index ab8fa24925..05cbf4df1f 100644
--- a/src/3rdparty/libjpeg/src/jdcolor.c
+++ b/src/3rdparty/libjpeg/src/jdcolor.c
@@ -616,7 +616,7 @@ static const JLONG dither_matrix[4] = {
static INLINE boolean is_big_endian(void)
{
int test_value = 1;
- if(*(char *)&test_value != 1)
+ if (*(char *)&test_value != 1)
return TRUE;
return FALSE;
}
diff --git a/src/3rdparty/libjpeg/src/jdmerge.c b/src/3rdparty/libjpeg/src/jdmerge.c
index 6276dd0950..ca6f16c252 100644
--- a/src/3rdparty/libjpeg/src/jdmerge.c
+++ b/src/3rdparty/libjpeg/src/jdmerge.c
@@ -503,7 +503,7 @@ static const JLONG dither_matrix[4] = {
static INLINE boolean is_big_endian(void)
{
int test_value = 1;
- if(*(char *)&test_value != 1)
+ if (*(char *)&test_value != 1)
return TRUE;
return FALSE;
}
diff --git a/src/3rdparty/pcre2/pcre2.pro b/src/3rdparty/pcre2/pcre2.pro
index 3dde2f62f8..296e65cd59 100644
--- a/src/3rdparty/pcre2/pcre2.pro
+++ b/src/3rdparty/pcre2/pcre2.pro
@@ -16,6 +16,8 @@ DEFINES += HAVE_CONFIG_H
# platform/compiler specific definitions
uikit|qnx|winrt: DEFINES += PCRE2_DISABLE_JIT
+win32:contains(QT_ARCH, "arm"): DEFINES += PCRE2_DISABLE_JIT
+win32:contains(QT_ARCH, "arm64"): DEFINES += PCRE2_DISABLE_JIT
SOURCES += \
$$PWD/src/pcre2_auto_possess.c \
diff --git a/src/3rdparty/sqlite/qt_attribution.json b/src/3rdparty/sqlite/qt_attribution.json
index 50c179bf6e..3800477239 100644
--- a/src/3rdparty/sqlite/qt_attribution.json
+++ b/src/3rdparty/sqlite/qt_attribution.json
@@ -6,7 +6,7 @@
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
"Homepage": "http://www.sqlite.org/",
- "Version": "3.20.1",
+ "Version": "3.22.0",
"License": "Public Domain",
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
}