[meta-intel] [PATCH] libyami: Fix build with musl/clang

Khem Raj raj.khem at gmail.com
Fri Aug 11 21:17:02 PDT 2017


These patches are interesting from upstreaming point of view as well

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...01-bitWriter.cpp-Delete-unused-CACHEBYTES.patch |  25 ++++
 .../0002-typecast-index-from-size_t-to-int.patch   |  40 +++++++
 ...-invalid-offsetof-to-compiler-commandline.patch |  27 +++++
 .../0004-Typecast-POWER32SUB2-to-uint8_t.patch     |  31 +++++
 ...-move-c-definitions-out-of-extern-C-block.patch | 128 +++++++++++++++++++++
 ...pace-conflicts-by-adding-explicit-using-n.patch |  39 +++++++
 .../libyami/0007-Delete-unused-variables.patch     |  34 ++++++
 ...alUnit-is-declared-in-different-namespace.patch |  29 +++++
 .../libyami/libyami/0009-Fix-clang-warnings.patch  |  35 ++++++
 common/recipes-multimedia/libyami/libyami_1.2.0.bb |  12 +-
 10 files changed, 399 insertions(+), 1 deletion(-)
 create mode 100644 common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
 create mode 100644 common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch

diff --git a/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
new file mode 100644
index 0000000..5109166
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
@@ -0,0 +1,25 @@
+From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 17:15:45 -0700
+Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ codecparsers/bitWriter.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp
+index 9bcb14d..08469bf 100644
+--- a/codecparsers/bitWriter.cpp
++++ b/codecparsers/bitWriter.cpp
+@@ -24,7 +24,6 @@
+ 
+ namespace YamiParser {
+ 
+-const uint32_t CACHEBYTES = sizeof(unsigned long int);
+ const uint32_t CACHEBITS = sizeof(unsigned long int) * 8;
+ 
+ // clip to keep lowest n bits
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
new file mode 100644
index 0000000..eef2878
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
@@ -0,0 +1,40 @@
+From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 17:29:02 -0700
+Subject: [PATCH 2/9] typecast index from size_t to int
+
+size_t is not consistent across architectures e.g. on arm its unsigned int
+
+Fixes
+error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ codecparsers/jpegParser.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp
+index 2217028..6da5c36 100644
+--- a/codecparsers/jpegParser.cpp
++++ b/codecparsers/jpegParser.cpp
+@@ -639,7 +639,7 @@ bool Parser::parseDAC()
+ 
+         length -= 2;
+ 
+-        if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
++        if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
+             ERROR("Invalid DAC Index");
+             return false;
+         }
+@@ -747,7 +747,7 @@ bool Parser::parseDHT()
+             huffTables = &m_dcHuffTables;
+         }
+ 
+-        if (index < 0 || index >= NUM_HUFF_TBLS) {
++        if ((int)index < 0 || index >= NUM_HUFF_TBLS) {
+             ERROR("Bad Huff Table Index");
+             return false;
+         }
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
new file mode 100644
index 0000000..ae2dd9b
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
@@ -0,0 +1,27 @@
+From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 17:49:43 -0700
+Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline
+
+clang++ is fussy about offsetof on non-POD types
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ codecparsers/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am
+index 720bf81..d9226b3 100644
+--- a/codecparsers/Makefile.am
++++ b/codecparsers/Makefile.am
+@@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \
+ 	-Dvp8dx_start_decode=libyami_vp8dx_start_decode \
+ 	-Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \
+ 	-I$(top_srcdir)/interface \
++	-Wno-invalid-offsetof \
+ 	$(extra_includes) \
+ 	$(NULL)
+ 
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
new file mode 100644
index 0000000..f4ea6dc
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
@@ -0,0 +1,31 @@
+From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 17:57:34 -0700
+Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t
+
+Fixes
+
+h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression
+of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ codecparsers/h265Parser.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp
+index 0dea3a6..c6cded2 100644
+--- a/codecparsers/h265Parser.cpp
++++ b/codecparsers/h265Parser.cpp
+@@ -125,7 +125,7 @@ namespace H265 {
+                                                                                                                  \
+             CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]);    \
+                                                                                                                  \
+-            CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2);                             \
++            CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2);                             \
+         }                                                                                                        \
+     }
+ 
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch b/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch
new file mode 100644
index 0000000..4f084bf
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch
@@ -0,0 +1,128 @@
+From 3748cf904089878971cfcf66abf14c4d74f8241a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 18:03:07 -0700
+Subject: [PATCH 5/9] move c++ definitions out of extern "C" block
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ decoder/vaapidecoder_host.cpp    | 2 +-
+ encoder/vaapiencoder_host.cpp    | 3 ++-
+ interface/VideoDecoderHost.h     | 8 ++++----
+ interface/VideoEncoderHost.h     | 8 ++++----
+ interface/VideoPostProcessHost.h | 8 ++++----
+ vpp/vaapipostprocess_host.cpp    | 3 +--
+ 6 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/decoder/vaapidecoder_host.cpp b/decoder/vaapidecoder_host.cpp
+index bcc9165..d9129f3 100644
+--- a/decoder/vaapidecoder_host.cpp
++++ b/decoder/vaapidecoder_host.cpp
+@@ -100,9 +100,9 @@ void releaseVideoDecoder(IVideoDecoder * p)
+ {
+     delete p;
+ }
++} // extern "C"
+ 
+ std::vector<std::string> getVideoDecoderMimeTypes()
+ {
+     return VaapiDecoderFactory::keys();
+ }
+-} // extern "C"
+diff --git a/encoder/vaapiencoder_host.cpp b/encoder/vaapiencoder_host.cpp
+index 49e903a..3ee9354 100644
+--- a/encoder/vaapiencoder_host.cpp
++++ b/encoder/vaapiencoder_host.cpp
+@@ -78,9 +78,10 @@ void releaseVideoEncoder(IVideoEncoder* p) {
+     delete p;
+ }
+ 
++} // extern "C"
++
+ std::vector<std::string> getVideoEncoderMimeTypes()
+ {
+     return VaapiEncoderFactory::keys();
+ }
+ 
+-} // extern "C"
+diff --git a/interface/VideoDecoderHost.h b/interface/VideoDecoderHost.h
+index 86210fe..fd2ba7b 100644
+--- a/interface/VideoDecoderHost.h
++++ b/interface/VideoDecoderHost.h
+@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage
+ YamiMediaCodec::IVideoDecoder *createVideoDecoder(const char *mimeType);
+ /// \brief destroy the decoder
+ void releaseVideoDecoder(YamiMediaCodec::IVideoDecoder * p);
+-/** \fn void getVideoDecoderMimeTypes()
+- * \brief return the MimeTypes enabled in the current build
+-*/
+-std::vector<std::string> getVideoDecoderMimeTypes();
+ 
+ typedef YamiMediaCodec::IVideoDecoder *(*YamiCreateVideoDecoderFuncPtr) (const char *mimeType);
+ typedef void (*YamiReleaseVideoDecoderFuncPtr)(YamiMediaCodec::IVideoDecoder * p);
+ }
++// \fn void getVideoDecoderMimeTypes()
++// \brief return the MimeTypes enabled in the current build
++//
++std::vector<std::string> getVideoDecoderMimeTypes();
+ #endif                          /* VIDEO_DECODER_HOST_H_ */
+diff --git a/interface/VideoEncoderHost.h b/interface/VideoEncoderHost.h
+index fb80335..5fb5ab3 100644
+--- a/interface/VideoEncoderHost.h
++++ b/interface/VideoEncoderHost.h
+@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage
+ YamiMediaCodec::IVideoEncoder *createVideoEncoder(const char *mimeType);
+ ///brief destroy encoder
+ void releaseVideoEncoder(YamiMediaCodec::IVideoEncoder * p);
+-/** \fn void getVideoEncoderMimeTypes()
+- * \brief return the MimeTypes enabled in the current build
+-*/
+-std::vector<std::string> getVideoEncoderMimeTypes();
+ 
+ typedef YamiMediaCodec::IVideoEncoder *(*YamiCreateVideoEncoderFuncPtr) (const char *mimeType);
+ typedef void (*YamiReleaseVideoEncoderFuncPtr)(YamiMediaCodec::IVideoEncoder * p);
+ }
+ #endif                          /* VIDEO_ENCODER_HOST_H_ */
++// \fn void getVideoEncoderMimeTypes()
++// \brief return the MimeTypes enabled in the current build
++//
++std::vector<std::string> getVideoEncoderMimeTypes();
+diff --git a/interface/VideoPostProcessHost.h b/interface/VideoPostProcessHost.h
+index de046cd..f1c5ce5 100644
+--- a/interface/VideoPostProcessHost.h
++++ b/interface/VideoPostProcessHost.h
+@@ -34,12 +34,12 @@ YamiMediaCodec::IVideoPostProcess *createVideoPostProcess(const char *mimeType);
+  * \brief destroy encoder
+ */
+ void releaseVideoPostProcess(YamiMediaCodec::IVideoPostProcess * p);
+-/** \fn void getVideoPostProcessMimeTypes()
+- * \brief return the MimeTypes enabled in the current build
+-*/
+-std::vector<std::string> getVideoPostProcessMimeTypes();
+ 
+ typedef YamiMediaCodec::IVideoPostProcess *(*YamiCreateVideoPostProcessFuncPtr) (const char *mimeType);
+ typedef void (*YamiReleaseVideoPostProcessFuncPtr)(YamiMediaCodec::IVideoPostProcess * p);
+ }
+ #endif                          /* VIDEO_POST_PROCESS_HOST_H_ */
++// \fn void getVideoPostProcessMimeTypes()
++// \brief return the MimeTypes enabled in the current build
++//
++std::vector<std::string> getVideoPostProcessMimeTypes();
+diff --git a/vpp/vaapipostprocess_host.cpp b/vpp/vaapipostprocess_host.cpp
+index cd40dea..bc06b38 100644
+--- a/vpp/vaapipostprocess_host.cpp
++++ b/vpp/vaapipostprocess_host.cpp
+@@ -75,10 +75,9 @@ void releaseVideoPostProcess(IVideoPostProcess * p)
+ {
+     delete p;
+ }
++} // extern "C"
+ 
+ std::vector<std::string> getVideoPostProcessMimeTypes()
+ {
+     return VaapiPostProcessFactory::keys();
+ }
+-
+-} // extern "C"
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
new file mode 100644
index 0000000..8b990a2
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
@@ -0,0 +1,39 @@
+From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 18:38:05 -0700
+Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using
+ <namespace>
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ decoder/vaapidecoder_h264.h | 1 +
+ decoder/vaapidecoder_h265.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h
+index 57e2c27..ea5c2f2 100644
+--- a/decoder/vaapidecoder_h264.h
++++ b/decoder/vaapidecoder_h264.h
+@@ -30,6 +30,7 @@ namespace YamiMediaCodec {
+ 
+ class VaapiDecPictureH264;
+ class VaapiDecoderH264 : public VaapiDecoderBase {
++using YamiMediaCodec::VaapiDecoderBase::createPicture;
+ public:
+     typedef SharedPtr<VaapiDecPictureH264> PicturePtr;
+     typedef std::vector<PicturePtr> RefSet;
+diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
+index f7e2303..159e25f 100644
+--- a/decoder/vaapidecoder_h265.h
++++ b/decoder/vaapidecoder_h265.h
+@@ -38,6 +38,7 @@ namespace YamiMediaCodec {
+ 
+ class VaapiDecPictureH265;
+ class VaapiDecoderH265:public VaapiDecoderBase {
++    using YamiMediaCodec::VaapiDecoderBase::createPicture;
+     typedef YamiParser::H265::SPS SPS;
+     typedef YamiParser::H265::SliceHeader SliceHeader;
+     typedef YamiParser::H265::NalUnit NalUnit;
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
new file mode 100644
index 0000000..06e39bc
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
@@ -0,0 +1,34 @@
+From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 18:39:58 -0700
+Subject: [PATCH 7/9] Delete unused variables
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ decoder/vaapidecoder_vp8.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp
+index 5fc89ec..ff5b896 100644
+--- a/decoder/vaapidecoder_vp8.cpp
++++ b/decoder/vaapidecoder_vp8.cpp
+@@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr;
+ 
+ // the following parameter apply to Intra-Predicted Macroblocks,
+ // $11.2 $11.4: key frame default probs
+-static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
+-static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
++//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
++//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
+ 
+ // $16.1: non-key frame default probs
+-static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
+-static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
++//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
++//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
+ 
+ static const uint32_t surfaceNumVP8 = 3;
+ 
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
new file mode 100644
index 0000000..707cf7a
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
@@ -0,0 +1,29 @@
+From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 18:42:28 -0700
+Subject: [PATCH 8/9] NalUnit is declared in different namespace
+
+Fixes
+vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class       [-Werror,-Wmismatched-tags]                                                                                    struct NalUnit;
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ decoder/vaapidecoder_h265.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
+index 159e25f..674638f 100644
+--- a/decoder/vaapidecoder_h265.h
++++ b/decoder/vaapidecoder_h265.h
+@@ -29,7 +29,7 @@ namespace YamiParser {
+ namespace H265 {
+     struct SPS;
+     struct SliceHeader;
+-    struct NalUnit;
++    class NalUnit;
+     class Parser;
+ };
+ };
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
new file mode 100644
index 0000000..536f4c3
--- /dev/null
+++ b/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
@@ -0,0 +1,35 @@
+From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 11 Aug 2017 18:53:06 -0700
+Subject: [PATCH 9/9] Fix clang warnings
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ encoder/vaapiencoder_h264.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp
+index 98bc2ed..94015cb 100644
+--- a/encoder/vaapiencoder_h264.cpp
++++ b/encoder/vaapiencoder_h264.cpp
+@@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter,
+         }
+         /* vcl_hrd_parameters_present_flag */
+         bitwriter->writeBits(0, 1);
+-        if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) {
++        if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) {
+             /* low_delay_hrd_flag */
+             bitwriter->writeBits(0, 1);
+         }
+@@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const
+         sliceParam->num_macroblocks = curSliceMbs;
+         sliceParam->macroblock_info = VA_INVALID_ID;
+         sliceParam->slice_type = h264_get_slice_type (picture->m_type);
+-        assert (sliceParam->slice_type != -1);
++        assert ((int)sliceParam->slice_type != -1);
+         sliceParam->idr_pic_id = m_idrNum;
+         sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt;
+ 
+-- 
+2.14.1
+
diff --git a/common/recipes-multimedia/libyami/libyami_1.2.0.bb b/common/recipes-multimedia/libyami/libyami_1.2.0.bb
index dfc4fc2..e3462dd 100644
--- a/common/recipes-multimedia/libyami/libyami_1.2.0.bb
+++ b/common/recipes-multimedia/libyami/libyami_1.2.0.bb
@@ -8,7 +8,17 @@ BUGTRACKER = "https://github.com/01org/libyami/issues/new"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI = "https://github.com/01org/libyami/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
+SRC_URI = "https://github.com/01org/libyami/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+           file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \
+           file://0002-typecast-index-from-size_t-to-int.patch \
+           file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \
+           file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \
+           file://0005-move-c-definitions-out-of-extern-C-block.patch \
+           file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \
+           file://0007-Delete-unused-variables.patch \
+           file://0008-NalUnit-is-declared-in-different-namespace.patch \
+           file://0009-Fix-clang-warnings.patch \
+"
 SRC_URI[md5sum] = "2e2ed3bd900866476eced140799ee48b"
 SRC_URI[sha256sum] = "fdc3025f828c065a4434e73f5629e7ab8af593f1abbe097449dd5a13fa7d465f"
 
-- 
2.14.1



More information about the meta-intel mailing list