diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2021-11-03 21:16:48 -0500 |
---|---|---|
committer | Tom Hochstein <tom.hochstein@nxp.com> | 2021-11-03 21:23:36 -0500 |
commit | dc3ea70ff53a3989636d98768c1f510cc6baedd8 (patch) | |
tree | ee11ec48aff8120e483cceb78d895a8f2b7c803e /recipes-support/opencv/opencv | |
parent | 75cc53cc480f73d8dc97cf1b52c48fb874d16a97 (diff) | |
download | meta-freescale-dc3ea70ff53a3989636d98768c1f510cc6baedd8.tar.gz |
opencv: Backport updates from OE-Core
2178fd7386 opencv: remove setup_vars_opencv4.sh
cafcc65e74 opencv: fix build with protobuf-3.18 when dnn PACKAGECONFIG is enabled
3c022cd50d opencv: Do not lock to gcc only compiler
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-support/opencv/opencv')
-rw-r--r-- | recipes-support/opencv/opencv/0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-support/opencv/opencv/0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch b/recipes-support/opencv/opencv/0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch new file mode 100644 index 00000000..5d88d1a6 --- /dev/null +++ b/recipes-support/opencv/opencv/0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 9cfa84313c5833d7295fcf57be93d5d2aaadfd88 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Rabaud <vrabaud@google.com> | ||
3 | Date: Sat, 10 Jul 2021 00:21:52 +0200 | ||
4 | Subject: [PATCH] Use the one argument version of SetTotalBytesLimit. | ||
5 | |||
6 | The two argument versions has been deprecated, cf | ||
7 | https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.io.coded_stream | ||
8 | |||
9 | Upstream-Status: Backport [9cfa84313c5833d7295fcf57be93d5d2aaadfd88 - from master after 4.5.3 tag] | ||
10 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
11 | --- | ||
12 | modules/dnn/src/caffe/caffe_io.cpp | 5 +++++ | ||
13 | 1 file changed, 5 insertions(+) | ||
14 | |||
15 | diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp | ||
16 | index 2fc4d84f46..ebecf95eea 100644 | ||
17 | --- a/modules/dnn/src/caffe/caffe_io.cpp | ||
18 | +++ b/modules/dnn/src/caffe/caffe_io.cpp | ||
19 | @@ -92,6 +92,7 @@ | ||
20 | #ifdef HAVE_PROTOBUF | ||
21 | #include <google/protobuf/io/coded_stream.h> | ||
22 | #include <google/protobuf/io/zero_copy_stream_impl.h> | ||
23 | +#include <google/protobuf/stubs/common.h> | ||
24 | #include <google/protobuf/text_format.h> | ||
25 | |||
26 | #include <opencv2/core.hpp> | ||
27 | @@ -1111,7 +1112,11 @@ static const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 by | ||
28 | |||
29 | bool ReadProtoFromBinary(ZeroCopyInputStream* input, Message *proto) { | ||
30 | CodedInputStream coded_input(input); | ||
31 | +#if GOOGLE_PROTOBUF_VERSION >= 3006000 | ||
32 | + coded_input.SetTotalBytesLimit(kProtoReadBytesLimit); | ||
33 | +#else | ||
34 | coded_input.SetTotalBytesLimit(kProtoReadBytesLimit, 536870912); | ||
35 | +#endif | ||
36 | |||
37 | return proto->ParseFromCodedStream(&coded_input); | ||
38 | } | ||
39 | -- | ||
40 | 2.32.0 | ||
41 | |||