summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-08-08 01:45:26 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2019-08-09 07:17:58 (GMT)
commit5657949d395848aaffb5547b16c14ccdc1e898a4 (patch)
tree25dc98825e3ad45adb490d3e55f5dcf005c4beed /recipes-multimedia
parent699bbf66a799435aaa7cf388d7926f1ef40e875b (diff)
downloadmeta-intel-5657949d395848aaffb5547b16c14ccdc1e898a4.tar.gz
libyami: upgrade 1.3.1 -> 1.3.2
For changes, see: https://github.com/intel/libyami/blob/1.3.2/NEWS Remove all the patches fixing warnings converted to errors when using clang. Most of these have been fixed and others are trivial enough to be ignored. Pass -Wno-error to CXXFLAGS to ignore these. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-multimedia')
-rw-r--r--recipes-multimedia/libyami/libyami-utils_1.3.2.bb (renamed from recipes-multimedia/libyami/libyami-utils_1.3.1.bb)2
-rw-r--r--recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch27
-rw-r--r--recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch42
-rw-r--r--recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch29
-rw-r--r--recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch33
-rw-r--r--recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch41
-rw-r--r--recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch36
-rw-r--r--recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch31
-rw-r--r--recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch37
-rw-r--r--recipes-multimedia/libyami/libyami/0010-h26xparser-Fix-build-error-with-GCC9.patch157
-rw-r--r--recipes-multimedia/libyami/libyami_1.3.2.bb (renamed from recipes-multimedia/libyami/libyami_1.3.1.bb)13
11 files changed, 4 insertions, 444 deletions
diff --git a/recipes-multimedia/libyami/libyami-utils_1.3.1.bb b/recipes-multimedia/libyami/libyami-utils_1.3.2.bb
index ab1b83a..b7f4e26 100644
--- a/recipes-multimedia/libyami/libyami-utils_1.3.1.bb
+++ b/recipes-multimedia/libyami/libyami-utils_1.3.2.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
10SRC_URI = "git://github.com/intel/libyami-utils.git \ 10SRC_URI = "git://github.com/intel/libyami-utils.git \
11 file://0001-Fix-build-with-clang.patch \ 11 file://0001-Fix-build-with-clang.patch \
12 " 12 "
13SRCREV = "7e801b5cc3066b176c2dccffda0af8d762184650" 13SRCREV = "c3d25b64b05aeb0c4eecc140aef617cfeced6b8e"
14S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
15 15
16DEPENDS = "libva libyami" 16DEPENDS = "libva libyami"
diff --git a/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
deleted file mode 100644
index a96c9b8..0000000
--- a/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:15:45 -0700
4Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 codecparsers/bitWriter.cpp | 1 -
11 1 file changed, 1 deletion(-)
12
13diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp
14index 9bcb14d..08469bf 100644
15--- a/codecparsers/bitWriter.cpp
16+++ b/codecparsers/bitWriter.cpp
17@@ -24,7 +24,6 @@
18
19 namespace YamiParser {
20
21-const uint32_t CACHEBYTES = sizeof(unsigned long int);
22 const uint32_t CACHEBITS = sizeof(unsigned long int) * 8;
23
24 // clip to keep lowest n bits
25--
262.14.1
27
diff --git a/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
deleted file mode 100644
index a216566..0000000
--- a/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:29:02 -0700
4Subject: [PATCH 2/9] typecast index from size_t to int
5
6size_t is not consistent across architectures e.g. on arm its unsigned int
7
8Fixes
9error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Pending
14
15 codecparsers/jpegParser.cpp | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp
19index 2217028..6da5c36 100644
20--- a/codecparsers/jpegParser.cpp
21+++ b/codecparsers/jpegParser.cpp
22@@ -639,7 +639,7 @@ bool Parser::parseDAC()
23
24 length -= 2;
25
26- if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
27+ if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
28 ERROR("Invalid DAC Index");
29 return false;
30 }
31@@ -747,7 +747,7 @@ bool Parser::parseDHT()
32 huffTables = &m_dcHuffTables;
33 }
34
35- if (index < 0 || index >= NUM_HUFF_TBLS) {
36+ if ((int)index < 0 || index >= NUM_HUFF_TBLS) {
37 ERROR("Bad Huff Table Index");
38 return false;
39 }
40--
412.14.1
42
diff --git a/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
deleted file mode 100644
index 1728960..0000000
--- a/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:49:43 -0700
4Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline
5
6clang++ is fussy about offsetof on non-POD types
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 codecparsers/Makefile.am | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am
16index 720bf81..d9226b3 100644
17--- a/codecparsers/Makefile.am
18+++ b/codecparsers/Makefile.am
19@@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \
20 -Dvp8dx_start_decode=libyami_vp8dx_start_decode \
21 -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \
22 -I$(top_srcdir)/interface \
23+ -Wno-invalid-offsetof \
24 $(extra_includes) \
25 $(NULL)
26
27--
282.14.1
29
diff --git a/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
deleted file mode 100644
index 27eca39..0000000
--- a/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:57:34 -0700
4Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t
5
6Fixes
7
8h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression
9of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Pending
14
15 codecparsers/h265Parser.cpp | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp
19index 0dea3a6..c6cded2 100644
20--- a/codecparsers/h265Parser.cpp
21+++ b/codecparsers/h265Parser.cpp
22@@ -125,7 +125,7 @@ namespace H265 {
23 \
24 CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]); \
25 \
26- CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2); \
27+ CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2); \
28 } \
29 }
30
31--
322.14.1
33
diff --git a/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
deleted file mode 100644
index c9c7452..0000000
--- a/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:38:05 -0700
4Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using
5 <namespace>
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9Upstream-Status: Pending
10
11 decoder/vaapidecoder_h264.h | 1 +
12 decoder/vaapidecoder_h265.h | 1 +
13 2 files changed, 2 insertions(+)
14
15diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h
16index 57e2c27..ea5c2f2 100644
17--- a/decoder/vaapidecoder_h264.h
18+++ b/decoder/vaapidecoder_h264.h
19@@ -30,6 +30,7 @@ namespace YamiMediaCodec {
20
21 class VaapiDecPictureH264;
22 class VaapiDecoderH264 : public VaapiDecoderBase {
23+using YamiMediaCodec::VaapiDecoderBase::createPicture;
24 public:
25 typedef SharedPtr<VaapiDecPictureH264> PicturePtr;
26 typedef std::vector<PicturePtr> RefSet;
27diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
28index f7e2303..159e25f 100644
29--- a/decoder/vaapidecoder_h265.h
30+++ b/decoder/vaapidecoder_h265.h
31@@ -38,6 +38,7 @@ namespace YamiMediaCodec {
32
33 class VaapiDecPictureH265;
34 class VaapiDecoderH265:public VaapiDecoderBase {
35+ using YamiMediaCodec::VaapiDecoderBase::createPicture;
36 typedef YamiParser::H265::SPS SPS;
37 typedef YamiParser::H265::SliceHeader SliceHeader;
38 typedef YamiParser::H265::NalUnit NalUnit;
39--
402.14.1
41
diff --git a/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
deleted file mode 100644
index b80774c..0000000
--- a/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:39:58 -0700
4Subject: [PATCH 7/9] Delete unused variables
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 decoder/vaapidecoder_vp8.cpp | 8 ++++----
11 1 file changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp
14index 5fc89ec..ff5b896 100644
15--- a/decoder/vaapidecoder_vp8.cpp
16+++ b/decoder/vaapidecoder_vp8.cpp
17@@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr;
18
19 // the following parameter apply to Intra-Predicted Macroblocks,
20 // $11.2 $11.4: key frame default probs
21-static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
22-static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
23+//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
24+//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
25
26 // $16.1: non-key frame default probs
27-static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
28-static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
29+//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
30+//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
31
32 static const uint32_t surfaceNumVP8 = 3;
33
34--
352.14.1
36
diff --git a/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
deleted file mode 100644
index 18b98be..0000000
--- a/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:42:28 -0700
4Subject: [PATCH 8/9] NalUnit is declared in different namespace
5
6Fixes
7vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class [-Werror,-Wmismatched-tags] struct NalUnit;
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 decoder/vaapidecoder_h265.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
17index 159e25f..674638f 100644
18--- a/decoder/vaapidecoder_h265.h
19+++ b/decoder/vaapidecoder_h265.h
20@@ -29,7 +29,7 @@ namespace YamiParser {
21 namespace H265 {
22 struct SPS;
23 struct SliceHeader;
24- struct NalUnit;
25+ class NalUnit;
26 class Parser;
27 };
28 };
29--
302.14.1
31
diff --git a/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
deleted file mode 100644
index 08ef455..0000000
--- a/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:53:06 -0700
4Subject: [PATCH 9/9] Fix clang warnings
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 encoder/vaapiencoder_h264.cpp | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp
14index 98bc2ed..94015cb 100644
15--- a/encoder/vaapiencoder_h264.cpp
16+++ b/encoder/vaapiencoder_h264.cpp
17@@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter,
18 }
19 /* vcl_hrd_parameters_present_flag */
20 bitwriter->writeBits(0, 1);
21- if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) {
22+ if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) {
23 /* low_delay_hrd_flag */
24 bitwriter->writeBits(0, 1);
25 }
26@@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const
27 sliceParam->num_macroblocks = curSliceMbs;
28 sliceParam->macroblock_info = VA_INVALID_ID;
29 sliceParam->slice_type = h264_get_slice_type (picture->m_type);
30- assert (sliceParam->slice_type != -1);
31+ assert ((int)sliceParam->slice_type != -1);
32 sliceParam->idr_pic_id = m_idrNum;
33 sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt;
34
35--
362.14.1
37
diff --git a/recipes-multimedia/libyami/libyami/0010-h26xparser-Fix-build-error-with-GCC9.patch b/recipes-multimedia/libyami/libyami/0010-h26xparser-Fix-build-error-with-GCC9.patch
deleted file mode 100644
index be69ab7..0000000
--- a/recipes-multimedia/libyami/libyami/0010-h26xparser-Fix-build-error-with-GCC9.patch
+++ /dev/null
@@ -1,157 +0,0 @@
1From fdb8185749098eaf55050c4ec5c0f21c5be1e326 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Tue, 4 Jun 2019 16:53:16 +0800
4Subject: [PATCH] h26xparser: Fix build error with GCC9
5
6GCC9 causing build failure:
7
8| ../../git/codecparsers/h264Parser.cpp: In constructor 'YamiParser::H264::PPS::PPS()':
9| ../../git/codecparsers/h264Parser.cpp:140:41: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct YamiParser::H264::PPS' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
10| 140 | memset(this, 0, offsetof(PPS, m_sps));
11| | ^
12| In file included from ../../git/codecparsers/h264Parser.cpp:21:
13| ../../git/codecparsers/h264Parser.h:292:8: note: 'struct YamiParser::H264::PPS' declared here
14| 292 | struct PPS {
15| | ^~~
16| ../../git/codecparsers/h264Parser.cpp: In constructor 'YamiParser::H264::SliceHeader::SliceHeader()':
17| ../../git/codecparsers/h264Parser.cpp:686:49: error: 'void* memset(void*, int, size_t)' clearing an object of type 'class YamiParser::H264::SliceHeader' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
18| 686 | memset(this, 0, offsetof(SliceHeader, m_pps));
19| | ^
20| In file included from ../../git/codecparsers/h264Parser.cpp:21:
21| ../../git/codecparsers/h264Parser.h:371:7: note: 'class YamiParser::H264::SliceHeader' declared here
22| 371 | class SliceHeader {
23| | ^~~~~~~~~~~
24| ../../git/codecparsers/h265Parser.cpp: In constructor 'YamiParser::H265::VPS::VPS()':
25| ../../git/codecparsers/h265Parser.cpp:165:53: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct YamiParser::H265::VPS' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
26| 165 | memset(this, 0, offsetof(VPS, hrd_layer_set_idx));
27| | ^
28| In file included from ../../git/codecparsers/h265Parser.cpp:21:
29| ../../git/codecparsers/h265Parser.h:256:12: note: 'struct YamiParser::H265::VPS' declared here
30| 256 | struct VPS {
31| | ^~~
32| ../../git/codecparsers/h265Parser.cpp: In constructor 'YamiParser::H265::SPS::SPS()':
33| ../../git/codecparsers/h265Parser.cpp:174:39: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct YamiParser::H265::SPS' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
34| 174 | memset(this, 0, offsetof(SPS, vps));
35| | ^
36| In file included from ../../git/codecparsers/h265Parser.cpp:21:
37| ../../git/codecparsers/h265Parser.h:290:12: note: 'struct YamiParser::H265::SPS' declared here
38| 290 | struct SPS {
39| | ^~~
40| ../../git/codecparsers/h265Parser.cpp: In constructor 'YamiParser::H265::PPS::PPS()':
41| ../../git/codecparsers/h265Parser.cpp:179:39: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct YamiParser::H265::PPS' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
42| 179 | memset(this, 0, offsetof(PPS, sps));
43| | ^
44| In file included from ../../git/codecparsers/h265Parser.cpp:21:
45| ../../git/codecparsers/h265Parser.h:362:12: note: 'struct YamiParser::H265::PPS' declared here
46| 362 | struct PPS {
47| | ^~~
48| ../../git/codecparsers/h265Parser.cpp: In constructor 'YamiParser::H265::SliceHeader::SliceHeader()':
49| ../../git/codecparsers/h265Parser.cpp:184:47: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct YamiParser::H265::SliceHeader' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
50| 184 | memset(this, 0, offsetof(SliceHeader, pps));
51| | ^
52| In file included from ../../git/codecparsers/h265Parser.cpp:21:
53| ../../git/codecparsers/h265Parser.h:499:12: note: 'struct YamiParser::H265::SliceHeader' declared here
54| 499 | struct SliceHeader {
55| | ^~~~~~~~~~~
56| ../../git/codecparsers/mpeg2_parser.cpp: In constructor 'YamiParser::MPEG2::SeqHeader::SeqHeader()':
57| ../../git/codecparsers/mpeg2_parser.cpp:163:59: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct YamiParser::MPEG2::SeqHeader'; use assignment or value-initialization instead [-Werror=class-memaccess]
58| 163 | SeqHeader::SeqHeader() { memset(this, 0, sizeof(*this)); }
59| | ^
60| In file included from ../../git/codecparsers/mpeg2_parser.cpp:34:
61| ../../git/codecparsers/mpeg2_parser.h:153:12: note: 'struct YamiParser::MPEG2::SeqHeader' declared here
62| 153 | struct SeqHeader {
63| | ^~~~~~~~~
64| cc1plus: all warnings being treated as errors
65
66By typecasting structure pointer to void pointer, GCC9 does normal memset operation where offsetof() give correct
67number of bytes to set.
68
69Status: Submitted [https://github.com/intel/libyami/pull/876]
70
71Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
72---
73 codecparsers/h264Parser.cpp | 4 ++--
74 codecparsers/h265Parser.cpp | 8 ++++----
75 codecparsers/mpeg2_parser.cpp | 3 ++-
76 3 files changed, 8 insertions(+), 7 deletions(-)
77
78diff --git a/codecparsers/h264Parser.cpp b/codecparsers/h264Parser.cpp
79index 22117a1..6f7959e 100644
80--- a/codecparsers/h264Parser.cpp
81+++ b/codecparsers/h264Parser.cpp
82@@ -137,7 +137,7 @@ static bool scalingList(NalReader& br, uint8_t* sl, uint32_t size, uint32_t inde
83
84 PPS::PPS()
85 {
86- memset(this, 0, offsetof(PPS, m_sps));
87+ memset((void*)this, 0, offsetof(PPS, m_sps));
88 }
89
90 PPS::~PPS()
91@@ -683,7 +683,7 @@ Parser::searchSps(uint8_t id) const
92
93 SliceHeader::SliceHeader()
94 {
95- memset(this, 0, offsetof(SliceHeader, m_pps));
96+ memset((void*)this, 0, offsetof(SliceHeader, m_pps));
97 }
98
99 bool SliceHeader::refPicListModification(NalReader& br, RefPicListModification* pm0,
100diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp
101index 0dea3a6..d7e6740 100644
102--- a/codecparsers/h265Parser.cpp
103+++ b/codecparsers/h265Parser.cpp
104@@ -162,7 +162,7 @@ static const uint8_t DefaultScalingList2[64] = {
105
106 VPS::VPS()
107 {
108- memset(this, 0, offsetof(VPS, hrd_layer_set_idx));
109+ memset((void*)this, 0, offsetof(VPS, hrd_layer_set_idx));
110 }
111
112 VPS::~VPS()
113@@ -171,17 +171,17 @@ VPS::~VPS()
114
115 SPS::SPS()
116 {
117- memset(this, 0, offsetof(SPS, vps));
118+ memset((void*)this, 0, offsetof(SPS, vps));
119 }
120
121 PPS::PPS()
122 {
123- memset(this, 0, offsetof(PPS, sps));
124+ memset((void*)this, 0, offsetof(PPS, sps));
125 }
126
127 SliceHeader::SliceHeader()
128 {
129- memset(this, 0, offsetof(SliceHeader, pps));
130+ memset((void*)this, 0, offsetof(SliceHeader, pps));
131 }
132
133 SliceHeader::~SliceHeader()
134diff --git a/codecparsers/mpeg2_parser.cpp b/codecparsers/mpeg2_parser.cpp
135index 21032b1..173da39 100644
136--- a/codecparsers/mpeg2_parser.cpp
137+++ b/codecparsers/mpeg2_parser.cpp
138@@ -33,6 +33,7 @@
139 #include "common/log.h"
140 #include "mpeg2_parser.h"
141 #include <inttypes.h>
142+#include <cstddef>
143
144 namespace YamiParser {
145 namespace MPEG2 {
146@@ -160,7 +161,7 @@ namespace MPEG2 {
147
148 SeqExtension::SeqExtension() { memset(this, 0, sizeof(*this)); }
149
150- SeqHeader::SeqHeader() { memset(this, 0, sizeof(*this)); }
151+ SeqHeader::SeqHeader() { memset((void*)this, 0, offsetof(SeqHeader, quantizationMatrices)); }
152
153 StreamHeader::StreamHeader() { memset(this, 0, sizeof(*this)); }
154
155--
1562.17.0
157
diff --git a/recipes-multimedia/libyami/libyami_1.3.1.bb b/recipes-multimedia/libyami/libyami_1.3.2.bb
index 8384593..3cbde04 100644
--- a/recipes-multimedia/libyami/libyami_1.3.1.bb
+++ b/recipes-multimedia/libyami/libyami_1.3.2.bb
@@ -9,19 +9,12 @@ LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57" 9LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57"
10 10
11SRC_URI = "git://github.com/intel/libyami.git;branch=apache \ 11SRC_URI = "git://github.com/intel/libyami.git;branch=apache \
12 file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \
13 file://0002-typecast-index-from-size_t-to-int.patch \
14 file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \
15 file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \
16 file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \
17 file://0007-Delete-unused-variables.patch \
18 file://0008-NalUnit-is-declared-in-different-namespace.patch \
19 file://0009-Fix-clang-warnings.patch \
20 file://0010-h26xparser-Fix-build-error-with-GCC9.patch \
21" 12"
22SRCREV = "fb48083de91f837ddbf599dd4b5ad1eb1239e1cf" 13SRCREV = "08606d0a43e0ef15e5b61cc13563169370ce8715"
23S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
24 15
16CXXFLAGS_append = " -Wno-error"
17
25PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" 18PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}"
26PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" 19PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender"
27 20