Merge remote-tracking branch 'goog/qcom/release/LA.UM.9.12.R1.10.00.00.597.032' into rvc-dev

 Conflicts:
	conf_files/bengal/media_codecs_performance_v1.xml
	conf_files/bengal/media_codecs_vendor_v1.xml
	conf_files/lito/media_codecs.xml
	mm-core/src/registry_table.c
	mm-core/src/registry_table_android.c

Bug: 151568484
Change-Id: I1f4f9acd33eacbfafb00d5022270ca24f8964dc8
diff --git a/conf_files/bengal/media_codecs.xml b/conf_files/bengal/media_codecs.xml
index 02be016..d489fc4 100644
--- a/conf_files/bengal/media_codecs.xml
+++ b/conf_files/bengal/media_codecs.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -90,7 +90,6 @@
  | hevc        | 1920    1080    60      60     489600   |
  | vp9         | 1920    1088    60      60     489600   |
  | mpeg4-sw    | 1920    1088    30      40     244800   |
- | div4/5/6-sw | 1920    1088    30      10     244800   |
  | h263-sw     | 864     480     30      16      48600   |
  |_____________|_________________________________________|
 
@@ -291,28 +290,6 @@
              <Limit name="frame-rate" range="1-30" />
              <Limit name="concurrent-instances" max="16" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_performance.xml b/conf_files/bengal/media_codecs_performance.xml
index c6d547d..ff1ed77 100644
--- a/conf_files/bengal/media_codecs_performance.xml
+++ b/conf_files/bengal/media_codecs_performance.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <!--
-Copyright (c) 2015-2017, 2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2015-2017, 2019-2020 The Linux Foundation. All rights reserved.
 
 Not a Contribution.
 
diff --git a/conf_files/bengal/media_codecs_performance_v1.xml b/conf_files/bengal/media_codecs_performance_v1.xml
index c6d547d..ff1ed77 100644
--- a/conf_files/bengal/media_codecs_performance_v1.xml
+++ b/conf_files/bengal/media_codecs_performance_v1.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <!--
-Copyright (c) 2015-2017, 2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2015-2017, 2019-2020 The Linux Foundation. All rights reserved.
 
 Not a Contribution.
 
diff --git a/conf_files/bengal/media_codecs_vendor.xml b/conf_files/bengal/media_codecs_vendor.xml
index e37b00e..4188022 100644
--- a/conf_files/bengal/media_codecs_vendor.xml
+++ b/conf_files/bengal/media_codecs_vendor.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -90,7 +90,6 @@
  | hevc        | 1920    1080    60      60     489600   |
  | vp9         | 1920    1088    60      60     489600   |
  | mpeg4-sw    | 1920    1088    30      40     244800   |
- | div4/5/6-sw | 1920    1088    30      10     244800   |
  | h263-sw     | 864     480     30      16      48600   |
  |_____________|_________________________________________|
 
@@ -304,28 +303,6 @@
              <Limit name="frame-rate" range="1-30" />
              <Limit name="concurrent-instances" max="16" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_v1.xml b/conf_files/bengal/media_codecs_vendor_v1.xml
index fb0ab14..759f1de 100644
--- a/conf_files/bengal/media_codecs_vendor_v1.xml
+++ b/conf_files/bengal/media_codecs_vendor_v1.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -90,7 +90,6 @@
  | hevc        | 1920    1080    30      60     244800   |
  | vp9         | 1920    1088    30      60     244800   |
  | mpeg4-sw    | 1920    1088    30      40     244800   |
- | div4/5/6-sw | 1920    1088    30      10     244800   |
  | h263-sw     | 864     480     30      16      48600   |
  |_____________|_________________________________________|
 
@@ -304,28 +303,6 @@
              <Limit name="frame-rate" range="1-30" />
              <Limit name="concurrent-instances" max="16" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="16" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/kona/media_codecs.xml b/conf_files/kona/media_codecs.xml
index 430f644..fa3cb5c 100644
--- a/conf_files/kona/media_codecs.xml
+++ b/conf_files/kona/media_codecs.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -128,7 +128,6 @@
  |             | 3820    2160    240     220     7735500             |
  |             | 4096    2160    120     220     4147200             |
  |             | 7680    4320    60      220     7776000             |
- | div4/5/6-sw | 1920    1088    30      10      244800      244800  |
  | h263-sw     | 864     480     30      16      48600       48600   |
  | mpeg2       | 1020    1088    60i     40      130050      244800  |
  |             | 1920    1088    30      40      244800              |
@@ -486,32 +485,6 @@
              <Limit name="concurrent-instances" max="4" />
              <Limit name="performance-point-1920x1080" value="30" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1920" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="block-count" range="36-8160" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1920" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="block-count" range="36-8160" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
         <MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
diff --git a/conf_files/kona/media_codecs_vendor.xml b/conf_files/kona/media_codecs_vendor.xml
index f945c21..850b4d9 100644
--- a/conf_files/kona/media_codecs_vendor.xml
+++ b/conf_files/kona/media_codecs_vendor.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -128,7 +128,6 @@
  |             | 3820    2160    240     220     7735500             |
  |             | 4096    2160    120     220     4147200             |
  |             | 7680    4320    60      220     7776000             |
- | div4/5/6-sw | 1920    1088    30      10      244800      244800  |
  | h263-sw     | 864     480     30      16      48600       48600   |
  | mpeg2       | 1020    1088    60i     40      130050      244800  |
  |             | 1920    1088    30      40      244800              |
@@ -487,32 +486,6 @@
              <Limit name="concurrent-instances" max="4" />
              <Limit name="performance-point-1920x1080" value="30" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1920" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="block-count" range="36-8160" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1920" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="block-count" range="36-8160" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/lito/lito.mk b/conf_files/lito/lito.mk
index 641ae8c..7ffe0f6 100644
--- a/conf_files/lito/lito.mk
+++ b/conf_files/lito/lito.mk
@@ -37,3 +37,8 @@
   PRODUCT_COPY_FILES += \
     $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
 endif
+
+# Produce packages addition
+PRODUCT_PACKAGES += \
+    libcodec2_vndk.vendor \
+    libcodec2_hidl@1.0.vendor
diff --git a/conf_files/lito/media_codecs.xml b/conf_files/lito/media_codecs.xml
index 224cf4e..67111bc 100644
--- a/conf_files/lito/media_codecs.xml
+++ b/conf_files/lito/media_codecs.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -96,7 +96,6 @@
  | vp9         | 3840   2176    60      100    1958400 |
  |             | 4096   2176    48      100            |
  | vc1         | 1920   1088    30       20     244800 |
- | div4/5/6-sw | 1920   1088    30       10     244800 |
  | h263-sw     |  864    480    30       16      48600 |
  | mpeg2       | 1920   1088    30       40     244800 |
  |_____________|_______________________________________|
@@ -396,31 +395,6 @@
              <Limit name="concurrent-instances" max="4" />
              <Limit name="performance-point-1920x1080" value="30" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/lito/media_codecs_vendor.xml b/conf_files/lito/media_codecs_vendor.xml
index 531a84b..f9a5cc3 100644
--- a/conf_files/lito/media_codecs_vendor.xml
+++ b/conf_files/lito/media_codecs_vendor.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -96,7 +96,6 @@
  | vp9         | 3840   2176    60      100    1958400 |
  |             | 4096   2176    48      100            |
  | vc1         | 1920   1088    30       20     244800 |
- | div4/5/6-sw | 1920   1088    30       10     244800 |
  | h263-sw     |  864    480    30       16      48600 |
  | mpeg2       | 1920   1088    30       40     244800 |
  |_____________|_______________________________________|
@@ -410,30 +409,6 @@
              <Limit name="concurrent-instances" max="4" />
              <Limit name="performance-point-1920x1080" value="30" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/conf_files/lito/media_codecs_vendor_v1.xml b/conf_files/lito/media_codecs_vendor_v1.xml
index 7a49364..ba73584 100644
--- a/conf_files/lito/media_codecs_vendor_v1.xml
+++ b/conf_files/lito/media_codecs_vendor_v1.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
      Not a contribution.
      Copyright (C) 2012-2013 The Android Open Source Project
 
@@ -95,7 +95,6 @@
  | vp9         | 3840   2176    30      100    979200 |
  |             | 4096   2176    24      100           |
  | vc1         | 1920   1088    30       20    244800 |
- | div4/5/6-sw | 1920   1088    30       10    244800 |
  | h263-sw     |  864    480    30       16     48600 |
  | mpeg2       | 1920   1088    30       40    244800 |
  |_____________|______________________________________|
@@ -406,30 +405,6 @@
              <Limit name="concurrent-instances" max="4" />
              <Limit name="performance-point-1920x1080" value="30" />
         </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
-        <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
-            <Quirk name="requires-allocate-on-input-ports" />
-            <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="1920x1088" />
-            <Limit name="alignment" value="2x2" />
-            <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="36" max="244800" />
-            <Limit name="frame-rate" range="1-30" />
-            <Limit name="bitrate" range="1-10000000" />
-            <Limit name="concurrent-instances" max="4" />
-            <Limit name="performance-point-1920x1080" value="30" />
-        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
 </MediaCodecs>
diff --git a/mm-core/src/common/qc_omx_core.h b/mm-core/src/common/qc_omx_core.h
index 1f5cd0b..c636d5d 100644
--- a/mm-core/src/common/qc_omx_core.h
+++ b/mm-core/src/common/qc_omx_core.h
@@ -39,11 +39,6 @@
 #include "qc_omx_common.h"        // OMX API
 #include <string.h>
 
-#ifdef _ANDROID_O_MR1_DIVX_CHANGES
-#define DIVX4_MIME "video_decoder.divx4"
-#else
-#define DIVX4_MIME "video_decoder.divx"
-#endif
 
 #define OMX_REGISTRY_ENTRY(name, lib_name, role) \
   { \
diff --git a/mm-core/src/registry_table.c b/mm-core/src/registry_table.c
index d49000f..ec1c202 100644
--- a/mm-core/src/registry_table.c
+++ b/mm-core/src/registry_table.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
diff --git a/mm-core/src/registry_table_android.c b/mm-core/src/registry_table_android.c
index d22e4f2..ff22f00 100644
--- a/mm-core/src/registry_table_android.c
+++ b/mm-core/src/registry_table_android.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 72e2133..539ce60 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010 - 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010 - 2020, The Linux Foundation. All rights reserved.
 
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
@@ -1303,12 +1303,15 @@
         void get_preferred_color_aspects(ColorAspects& preferredColorAspects);
         void get_preferred_hdr_info(HDRStaticInfo& preferredHDRInfo);
         bool vdec_query_cap(struct v4l2_queryctrl &cap);
-        bool store_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusinfo);
+        bool store_vp9_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusinfo);
+        bool store_hevc_hdr10plusinfo(uint32_t payload_size,
+            msm_vidc_stream_userdata_payload *hdr10plusdata);
         void update_hdr10plusinfo_cookie_using_timestamp(OMX_PTR cookie, OMX_TICKS timestamp);
         void convert_hdr10plusinfo_to_metadata(OMX_PTR cookie, ColorMetaData &colorData);
         void remove_hdr10plusinfo_using_cookie(OMX_PTR cookie);
         void clear_hdr10plusinfo();
         void get_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata);
+        void print_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata);
 public:
         bool m_buffer_error;
         OMX_VIDEO_PARAM_PROFILELEVELTYPE get_clientSet_profile_level() {
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
index 9c04ae1..8af50ad 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
@@ -192,28 +192,6 @@
         m_omx_video_codingtype = OMX_VIDEO_CodingH263;
     }
     else if (((!strncmp(cmp_name,
-                        "OMX.qti.video.decoder.divxsw",
-                        OMX_MAX_STRINGNAME_SIZE))) ||
-             ((!strncmp(cmp_name,
-                        "OMX.qti.video.decoder.divx4sw",
-                        OMX_MAX_STRINGNAME_SIZE))))
-    {
-        OMX_SWVDEC_LOG_LOW("video_decoder.divx");
-
-        strlcpy(m_cmp_name,              cmp_name, OMX_MAX_STRINGNAME_SIZE);
-#ifndef _ANDROID_O_MR1_DIVX_CHANGES
-        strlcpy(m_role_name, "video_decoder.divx", OMX_MAX_STRINGNAME_SIZE);
-#else
-        if(!strncmp(cmp_name,"OMX.qti.video.decoder.divx4sw", OMX_MAX_STRINGNAME_SIZE))
-            strlcpy(m_role_name, "video_decoder.divx4", OMX_MAX_STRINGNAME_SIZE);
-        else
-            strlcpy(m_role_name, "video_decoder.divx", OMX_MAX_STRINGNAME_SIZE);
-#endif
-
-        m_swvdec_codec         = SWVDEC_CODEC_MPEG4;
-        m_omx_video_codingtype = ((OMX_VIDEO_CODINGTYPE) QOMX_VIDEO_CodingDivx);
-    }
-    else if (((!strncmp(cmp_name,
                       "OMX.qti.video.decoder.vc1sw",
                       OMX_MAX_STRINGNAME_SIZE)))||
               ((!strncmp(cmp_name,
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 4e1a4ac..1b972c2 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010 - 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010 - 2020, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -130,14 +130,13 @@
 #define MAX(x,y) (((x) > (y)) ? (x) : (y))
 
 /*
-To enable sending vp9 hdr10plus metadata via private gralloc
-handle to display, define VP9_HDR10PLUS_GRALLOC_PATH_ENABLE
-as 1. This disables sending metadata via framework.
-To enable sending vp9 hdr10plus metadata via framework, define
-VP9_HDR10PLUS_GRALLOC_PATH_ENABLE as 0. This disables sending
-metadata via gralloc handle.
+To enable sending vp9/hevc hdr10plus metadata via private gralloc
+handle to display, define HDR10PLUS_SETMETADATA_ENABLE as 1.This
+disables sending metadata via framework. To enable sending vp9/hevc
+hdr10plus metadata via framework, define HDR10PLUS_SETMETADATA_ENABLE
+as 0. This disables sending metadata via gralloc handle.
 */
-#define VP9HDR10PLUS_SETMETADATA_ENABLE 1
+#define HDR10_SETMETADATA_ENABLE 0
 
 #define THUMBNAIL_YUV420P_8BIT 0x01
 #define THUMBNAIL_YUV420P_10BIT 0x02
@@ -1070,8 +1069,9 @@
                                             pThis->omx_report_error ();
                                             break;
                                         }
-#if !VP9HDR10PLUS_SETMETADATA_ENABLE
-                                        if (pThis->output_capability != V4L2_PIX_FMT_VP9)
+#if !HDR10_SETMETADATA_ENABLE
+                                        if (pThis->output_capability != V4L2_PIX_FMT_VP9 &&
+                                            pThis->output_capability != V4L2_PIX_FMT_HEVC)
                                             break;
 
                                         if (!pThis->m_cb.EventHandler) {
@@ -3086,7 +3086,7 @@
             print_debug_color_aspects(&(m_client_color_space.sAspects), "GetConfig Client");
             print_debug_color_aspects(&(m_internal_color_space.sAspects), "GetConfig Internal");
             get_preferred_color_aspects(params->sAspects);
-            print_debug_color_aspects(&(params->sAspects), "GetConfig");
+            print_debug_color_aspects(&(params->sAspects), "Frameworks path GetConfig Color Aspects");
 
             break;
         }
@@ -3097,7 +3097,7 @@
             print_debug_hdr_color_info(&(m_client_hdr_info.sInfo), "GetConfig Client HDR");
             print_debug_hdr_color_info(&(m_internal_hdr_info.sInfo), "GetConfig Internal HDR");
             get_preferred_hdr_info(params->sInfo);
-            print_debug_hdr_color_info(&(params->sInfo), "GetConfig HDR");
+            print_debug_hdr_color_info(&(params->sInfo), "Frameworks path GetConfig HDR");
 
             break;
         }
@@ -3106,6 +3106,7 @@
             VALIDATE_OMX_PARAM_DATA(configData, DescribeHDR10PlusInfoParams);
             DescribeHDR10PlusInfoParams *params = (DescribeHDR10PlusInfoParams *)configData;
             get_hdr10plusinfo(params);
+            print_hdr10plusinfo(params);
             break;
         }
         case OMX_IndexConfigAndroidVendorExtension:
@@ -3262,7 +3263,7 @@
 
     } else if ((int)configIndex == (int)OMX_QTIIndexConfigDescribeHDR10PlusInfo) {
         VALIDATE_OMX_PARAM_DATA(configData, DescribeHDR10PlusInfoParams);
-        if (!store_hdr10plusinfo((DescribeHDR10PlusInfoParams *)configData)) {
+        if (!store_vp9_hdr10plusinfo((DescribeHDR10PlusInfoParams *)configData)) {
             DEBUG_PRINT_ERROR("Failed to set hdr10plus info");
         }
         return ret;
@@ -8092,10 +8093,14 @@
                             (payload_len > HDR_DYNAMIC_META_DATA_SZ)) {
                             DEBUG_PRINT_ERROR("Invalid User extradata size %u for HDR10+", data->nDataSize);
                         } else {
+#if HDR10_SETMETADATA_ENABLE
                             color_mdata.dynamicMetaDataValid = true;
                             color_mdata.dynamicMetaDataLen = payload_len;
                             memcpy(color_mdata.dynamicMetaDataPayload, userdata_payload->data, payload_len);
                             DEBUG_PRINT_HIGH("Copied %u bytes of HDR10+ extradata", payload_len);
+#else
+                            store_hevc_hdr10plusinfo(payload_len, userdata_payload);
+#endif
                         }
                     }
                     break;
@@ -8159,15 +8164,15 @@
                     final_color_aspects.mMatrixCoeffs = ColorAspects::MatrixBT601_6;
                 }
                 get_preferred_hdr_info(final_hdr_info);
-                convert_color_aspects_to_metadata(final_color_aspects, color_mdata);
+#if HDR10_SETMETADATA_ENABLE
                 convert_hdr_info_to_metadata(final_hdr_info, color_mdata);
-#if VP9HDR10PLUS_SETMETADATA_ENABLE
                 convert_hdr10plusinfo_to_metadata(p_buf_hdr->pMarkData, color_mdata);
                 remove_hdr10plusinfo_using_cookie(p_buf_hdr->pMarkData);
-#endif
+                convert_color_aspects_to_metadata(final_color_aspects, color_mdata);
                 print_debug_hdr_color_info_mdata(&color_mdata);
                 print_debug_hdr10plus_metadata(color_mdata);
                 setMetaData(private_handle, COLOR_METADATA, (void*)&color_mdata);
+#endif
                 set_histogram_metadata(private_handle);
         }
 
@@ -8992,7 +8997,7 @@
     return rc;
 }
 
-bool omx_vdec::store_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata)
+bool omx_vdec::store_vp9_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata)
 {
     struct hdr10plusInfo metadata;
 
@@ -9041,6 +9046,44 @@
     return true;
 }
 
+bool omx_vdec::store_hevc_hdr10plusinfo(uint32_t payload_size,
+    msm_vidc_stream_userdata_payload *hdr10plusdata)
+{
+    struct hdr10plusInfo metadata;
+
+    if (!hdr10plusdata) {
+        DEBUG_PRINT_ERROR("hdr10plus info not present");
+        return false;
+    }
+
+    if (payload_size > MAX_HDR10PLUSINFO_SIZE ||
+            payload_size < 1) {
+        DEBUG_PRINT_ERROR("Invalid hdr10plus metadata size %u", payload_size);
+        return false;
+    }
+
+    if (output_capability != V4L2_PIX_FMT_HEVC) {
+        DEBUG_PRINT_ERROR("msm_vidc_stream_userdata_payload is not supported for %d codec",
+            output_capability);
+        return false;
+    }
+
+    memset(&metadata, 0, sizeof(struct hdr10plusInfo));
+    metadata.nParamSizeUsed = payload_size;
+    memcpy(metadata.payload, hdr10plusdata->data , payload_size);
+    metadata.is_new = true;
+    if (m_etb_count) {
+        metadata.timestamp = m_etb_timestamp + 1;
+    }
+
+    pthread_mutex_lock(&m_hdr10pluslock);
+    DEBUG_PRINT_LOW("add hevc hdr10plus info to the list with size %u", payload_size);
+    m_hdr10pluslist.push_back(metadata);
+    pthread_mutex_unlock(&m_hdr10pluslock);
+
+    return true;
+}
+
 void omx_vdec::update_hdr10plusinfo_cookie_using_timestamp(OMX_PTR markdata, OMX_TICKS timestamp)
 {
     std::list<hdr10plusInfo>::reverse_iterator iter;
@@ -9048,7 +9091,8 @@
     unsigned int cookie = (unsigned int)(unsigned long)markdata;
     bool is_list_empty = false;
 
-    if (output_capability != V4L2_PIX_FMT_VP9)
+    if (output_capability != V4L2_PIX_FMT_VP9 &&
+        output_capability != V4L2_PIX_FMT_HEVC)
         return;
 
     pthread_mutex_lock(&m_hdr10pluslock);
@@ -9090,7 +9134,8 @@
     unsigned int cookie = (unsigned int)(unsigned long)markdata;
     bool is_list_empty = false;
 
-    if (output_capability != V4L2_PIX_FMT_VP9)
+    if (output_capability != V4L2_PIX_FMT_VP9 &&
+        output_capability != V4L2_PIX_FMT_HEVC)
         return;
 
     pthread_mutex_lock(&m_hdr10pluslock);
@@ -9125,7 +9170,8 @@
     unsigned int cookie = (unsigned int)(unsigned long)markdata;
     bool is_list_empty = false;
 
-    if (output_capability != V4L2_PIX_FMT_VP9)
+    if (output_capability != V4L2_PIX_FMT_VP9 &&
+        output_capability != V4L2_PIX_FMT_HEVC)
         return;
 
     pthread_mutex_lock(&m_hdr10pluslock);
@@ -9154,7 +9200,8 @@
 {
     bool is_list_empty = false;
 
-    if (output_capability != V4L2_PIX_FMT_VP9)
+    if (output_capability != V4L2_PIX_FMT_VP9 &&
+        output_capability != V4L2_PIX_FMT_HEVC)
         return;
 
     pthread_mutex_lock(&m_hdr10pluslock);
@@ -9176,7 +9223,8 @@
     std::list<hdr10plusInfo>::iterator iter;
     bool is_list_empty = false;
 
-    if (output_capability != V4L2_PIX_FMT_VP9)
+    if (output_capability != V4L2_PIX_FMT_VP9 &&
+        output_capability != V4L2_PIX_FMT_HEVC)
         return;
 
     pthread_mutex_lock(&m_hdr10pluslock);
@@ -9205,6 +9253,17 @@
     pthread_mutex_unlock(&m_hdr10pluslock);
 }
 
+void omx_vdec::print_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata)
+{
+         DEBUG_PRINT_LOW("HDR10+ frameworks path valid data length: %d", hdr10plusdata->nParamSizeUsed);
+        for (uint32_t i = 0 ; i < hdr10plusdata->nParamSizeUsed && i+3 < 1024; i=i+4) {
+            DEBUG_PRINT_LOW("HDR10+ mdata: %02X %02X %02X %02X", hdr10plusdata->nValue[i],
+            hdr10plusdata->nValue[i+1],
+            hdr10plusdata->nValue[i+2],
+            hdr10plusdata->nValue[i+3]);
+    }
+}
+
 void perf_metrics::start()
 {
     if (!active) {