Merge remote-tracking branch 'goog/qcom/release/LA.UM.8.1.C9.09.00.00.518.370' into qt-qpr1-dev

Bug: 146991028
Change-Id: Id9fd1c22aca5b74bc8842806232c78e2ce98505d
diff --git a/conf_files/msmnile/media_profiles.xml b/conf_files/msmnile/media_profiles.xml
index 8afb30b..795995b 100644
--- a/conf_files/msmnile/media_profiles.xml
+++ b/conf_files/msmnile/media_profiles.xml
@@ -445,6 +445,47 @@
             channels="2" />
     </EncoderProfile>
 
+    <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30">
+      <Video codec="h264"
+             bitRate="36000000"
+             width="1280"
+             height="720"
+             frameRate="120" />
+
+      <!-- audio setting is ignored -->
+      <Audio codec="aac"
+             bitRate="96000"
+             sampleRate="48000"
+             channels="1" />
+    </EncoderProfile>
+
+    <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30">
+      <Video codec="h264"
+             bitRate="36000000"
+             width="1280"
+             height="720"
+             frameRate="120" />
+
+      <!-- audio setting is ignored -->
+      <Audio codec="aac"
+             bitRate="96000"
+             sampleRate="48000"
+             channels="1" />
+    </EncoderProfile>
+
+    <EncoderProfile quality="highspeed480p" fileFormat="mp4" duration="30">
+      <Video codec="h264"
+             bitRate="12000000"
+             width="640"
+             height="480"
+             frameRate="120" />
+
+      <Audio codec="aac"
+             bitRate="156000"
+             sampleRate="48000"
+             channels="2" />
+    </EncoderProfile>
+
         <ImageEncoding quality="95" />
         <ImageEncoding quality="80" />
         <ImageEncoding quality="70" />
diff --git a/conf_files/sm6150/media_codecs.xml b/conf_files/sm6150/media_codecs.xml
index 38aec85..bdb2869 100644
--- a/conf_files/sm6150/media_codecs.xml
+++ b/conf_files/sm6150/media_codecs.xml
@@ -82,14 +82,14 @@
 
 <!--
  SM6150 Non-Secure decoder capabilities
- _________________________________________________________
- | Codec       | W       H       fps     Mbps    MB/s    |
+ ________________________________________________________
+ | Codec       | W       H       fps     Mbps     MB/s   |
  |_____________|_________________________________________|
- | h264        | 4096    2160    24      100      829440 |
- | hevc        | 4096    2160    24      100      829440 |
+ | h264        | 3840    2160    30      100      972000 |
+ | hevc        | 3840    2160    30      100      972000 |
  | mpeg4-sw    | 1920    1088    30      40       244800 |
  | vp8         | 1920    1088    60      100      489600 |
- | vp9         | 4096    2160    24      100      829440 |
+ | vp9         | 3840    2160    30      100      972000 |
  | vc1         | 1920    1088    30      20       244800 |
  | div4/5/6-sw | 1920    1088    30      10       244800 |
  | h263-sw     | 864     480     30      16        48600 |
@@ -100,18 +100,18 @@
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 3840    2160    30      35       972000 |
- | vp9      | 3840    2160    30      35       972000 |
- | hevc     | 3840    2160    30      35       972000 |
- | mpeg2    | 1920    1088    30      35       244800 |
+ | h264     | 3840    2160    30      40       972000 |
+ | vp9      | 3840    2160    30      40       972000 |
+ | hevc     | 3840    2160    30      40       972000 |
+ | mpeg2    | 1920    1088    30      40       244800 |
  |__________|_________________________________________|
 
  SM6150 Non-Secure encoder capabilities (Secure not supported)
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 4096    2160    24      100     829440  |
- | hevc     | 4096    2160    24      100     829440  |
+ | h264     | 3840    2160    30      100     972000  |
+ | hevc     | 3840    2160    30      100     972000  |
  | mpeg4-sw | 1280     720    30      4       108000  |
  | vp8      | 1920    1088    60      40      489600  |
  | h263-sw  | 864     480     30      2       48600   |
@@ -133,7 +133,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="979200" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -162,7 +162,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="979200" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -207,7 +207,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="979200" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -220,12 +220,12 @@
         <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="3840x2160" />
+            <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
             <Limit name="blocks-per-second" min="24" max="972000" />
-            <Limit name="bitrate" range="1-35000000" />
-            <Limit name="frame-rate" range="1-30" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="3" />
@@ -251,7 +251,7 @@
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
             <Limit name="blocks-per-second" min="24" max="244800" />
-            <Limit name="bitrate" range="1-35000000" />
+            <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-30" />
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
@@ -279,8 +279,8 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="979200" />
-            <Limit name="bitrate" range="1-120000000" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
+            <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="6" />
@@ -292,12 +292,12 @@
         <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="3840x2160" />
+            <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
             <Limit name="blocks-per-second" min="24" max="972000" />
-            <Limit name="bitrate" range="1-35000000" />
-            <Limit name="frame-rate" range="1-30" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="3" />
@@ -309,7 +309,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="979200" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -322,12 +322,12 @@
         <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
             <Quirk name="requires-allocate-on-output-ports" />
-            <Limit name="size" min="96x96" max="3840x2160" />
+            <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
             <Limit name="blocks-per-second" min="24" max="972000" />
-            <Limit name="bitrate" range="1-35000000" />
-            <Limit name="frame-rate" range="1-30" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="3" />
diff --git a/conf_files/sm6150/media_codecs_performance.xml b/conf_files/sm6150/media_codecs_performance.xml
index 720dbb9..5004dc9 100644
--- a/conf_files/sm6150/media_codecs_performance.xml
+++ b/conf_files/sm6150/media_codecs_performance.xml
@@ -68,6 +68,12 @@
             <Limit name="measured-frame-rate-1280x720" range="17-24" />
             <Limit name="measured-frame-rate-1920x1080" range="8-12" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="81-182" />
+            <Limit name="measured-frame-rate-720x480" range="58-91" />
+            <Limit name="measured-frame-rate-1280x720" range="36-56" />
+            <Limit name="measured-frame-rate-1920x1080" range="18-27" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="137-175" />
             <Limit name="measured-frame-rate-720x480" range="62-92" />
@@ -161,6 +167,12 @@
             <Limit name="measured-frame-rate-1280x720" range="38-117" />
             <Limit name="measured-frame-rate-1920x1080" range="19-23" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="126-544" />
+            <Limit name="measured-frame-rate-720x480" range="185-528" />
+            <Limit name="measured-frame-rate-1280x720" range="116-281" />
+            <Limit name="measured-frame-rate-1920x1080" range="108-151" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="108-155" />
             <Limit name="measured-frame-rate-720x480" range="40-58" />
diff --git a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml
index 35ee5ae..a19c563 100644
--- a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml
+++ b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v0.xml
@@ -68,6 +68,12 @@
             <Limit name="measured-frame-rate-1280x720" range="17-24" />
             <Limit name="measured-frame-rate-1920x1080" range="8-12" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="83-211" />
+            <Limit name="measured-frame-rate-720x480" range="72-102" />
+            <Limit name="measured-frame-rate-1280x720" range="37-59" />
+            <Limit name="measured-frame-rate-1920x1080" range="23-32" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="178-250" />
             <Limit name="measured-frame-rate-720x480" range="69-95" />
@@ -162,6 +168,12 @@
             <Limit name="measured-frame-rate-1280x720" range="60-85" />
             <Limit name="measured-frame-rate-1920x1080" range="33-55" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="375-450" />
+            <Limit name="measured-frame-rate-720x480" range="362-444" />
+            <Limit name="measured-frame-rate-1280x720" range="157-470" />
+            <Limit name="measured-frame-rate-1920x1080" range="104-209" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="117-160" />
             <Limit name="measured-frame-rate-720x480" range="36-49" />
diff --git a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml
index 44c6e22..da993ff 100644
--- a/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml
+++ b/conf_files/sm6150/media_codecs_performance_sdmmagpie_v1.xml
@@ -68,6 +68,12 @@
             <Limit name="measured-frame-rate-1280x720" range="17-24" />
             <Limit name="measured-frame-rate-1920x1080" range="8-12" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="88-210" />
+            <Limit name="measured-frame-rate-720x480" range="80-106" />
+            <Limit name="measured-frame-rate-1280x720" range="41-59" />
+            <Limit name="measured-frame-rate-1920x1080" range="22-32" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="178-250" />
             <Limit name="measured-frame-rate-720x480" range="69-95" />
@@ -162,6 +168,12 @@
             <Limit name="measured-frame-rate-1280x720" range="60-85" />
             <Limit name="measured-frame-rate-1920x1080" range="33-55" />
         </MediaCodec>
+        <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="220-631" />
+            <Limit name="measured-frame-rate-720x480" range="190-519" />
+            <Limit name="measured-frame-rate-1280x720" range="182-249" />
+            <Limit name="measured-frame-rate-1920x1080" range="83-118" />
+        </MediaCodec>
         <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
             <Limit name="measured-frame-rate-320x240" range="117-160" />
             <Limit name="measured-frame-rate-720x480" range="36-49" />
diff --git a/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml
index 72853dd..2ba64c2 100644
--- a/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml
+++ b/conf_files/sm6150/media_codecs_sdmmagpie_v1.xml
@@ -87,12 +87,11 @@
  _________________________________________________________
  | Codec       | W       H       fps     Mbps    MB/s    |
  |_____________|_________________________________________|
- | h264        | 4096    2160    30      100     1036800 |
- | hevc        | 4096    2160    30      100     1036800 |
+ | h264        | 3840    2160    30      100     972000  |
+ | hevc        | 3840    2160    30      100     972000  |
  | mpeg4-sw    | 1920    1088    30      40      244800  |
  | vp8         | 1920    1088    60      100     489600  |
- | vp9         | 4096    2160    30      100     1036800 |
- |             | (4096)  (2304)  (30)    (120)           |
+ | vp9         | 3840    2160    30      100     972000  |
  | vc1         | 1920    1088    30      20      244800  |
  | div4/5/6-sw | 1920    1088    30      10      244800  |
  | h263-sw     | 864     480     30      16       48600  |
@@ -103,9 +102,9 @@
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 4096    2160    30      40      1036800 |
- | vp9      | 4096    2160    30      40      1036800 |
- | hevc     | 4096    2160    30      40      1036800 |
+ | h264     | 3840    2160    30      40      972000  |
+ | vp9      | 3840    2160    30      40      972000  |
+ | hevc     | 3840    2160    30      40      972000  |
  | mpeg2    | 1920    1088    30      40      244800  |
  |__________|_________________________________________|
 
@@ -113,8 +112,8 @@
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 4096    2160    30      100     1036800 |
- | hevc     | 4096    2160    30      100     1036800 |
+ | h264     | 3840    2160    30      100     972000  |
+ | hevc     | 3840    2160    30      100     972000  |
  | mpeg4-sw | 1280     720    30      4       108000  |
  | vp8      | 1920    1088    60      40      489600  |
  | h263-sw  | 864     480     30      2       48600   |
@@ -136,7 +135,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -160,7 +159,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -201,7 +200,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -213,7 +212,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
@@ -263,7 +262,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -275,7 +274,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
@@ -288,7 +287,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -300,7 +299,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
diff --git a/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml b/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml
index 0b2270f..0dfb94d 100644
--- a/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml
+++ b/conf_files/sm6150/media_codecs_vendor_sdmmagpie_v1.xml
@@ -87,12 +87,11 @@
  _________________________________________________________
  | Codec       | W       H       fps     Mbps    MB/s    |
  |_____________|_________________________________________|
- | h264        | 4096    2160    30      100     1036800 |
- | hevc        | 4096    2160    30      100     1036800 |
+ | h264        | 3840    2160    30      100     972000  |
+ | hevc        | 3840    2160    30      100     972000  |
  | mpeg4-sw    | 1920    1088    30      40      244800  |
  | vp8         | 1920    1088    60      100     489600  |
- | vp9         | 4096    2160    30      100     1036800 |
- |             | (4096)  (2304)  (30)    (120)           |
+ | vp9         | 3840    2160    30      100     972000  |
  | vc1         | 1920    1088    30      20      244800  |
  | div4/5/6-sw | 1920    1088    30      10      244800  |
  | h263-sw     | 864     480     30      16       48600  |
@@ -103,9 +102,9 @@
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 4096    2160    30      40      1036800 |
- | vp9      | 4096    2160    30      40      1036800 |
- | hevc     | 4096    2160    30      40      1036800 |
+ | h264     | 3840    2160    30      40      972000  |
+ | vp9      | 3840    2160    30      40      972000  |
+ | hevc     | 3840    2160    30      40      972000  |
  | mpeg2    | 1920    1088    30      40      244800  |
  |__________|_________________________________________|
 
@@ -113,8 +112,8 @@
  ______________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
- | h264     | 4096    2160    30      100     1036800 |
- | hevc     | 4096    2160    30      100     1036800 |
+ | h264     | 3840    2160    30      100     972000  |
+ | hevc     | 3840    2160    30      100     972000  |
  | mpeg4-sw | 1280     720    30      4       108000  |
  | vp8      | 1920    1088    60      40      489600  |
  | h263-sw  | 864     480     30      2       48600   |
@@ -137,7 +136,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -167,7 +166,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
@@ -242,7 +241,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -258,7 +257,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
@@ -315,7 +314,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -331,7 +330,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
@@ -347,7 +346,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
@@ -363,7 +362,7 @@
             <Limit name="size" min="96x96" max="4096x2160" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="24" max="1036800" />
+            <Limit name="blocks-per-second" min="24" max="972000" />
             <Limit name="bitrate" range="1-40000000" />
             <Limit name="frame-rate" range="1-60" />
             <Feature name="adaptive-playback" />
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 689a637..54e8f27 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -1108,6 +1108,7 @@
         ts_arr_list           m_timestamp_list;
 #endif
 
+        char m_platform_name[PROPERTY_VALUE_MAX] = {0};
         bool input_flush_progress;
         bool output_flush_progress;
         bool input_use_buffer;
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 179f53c..829555c 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -2307,10 +2307,9 @@
     struct v4l2_ext_controls controls;
     int conceal_color_8bit = 0, conceal_color_10bit = 0;
 
+    property_get("ro.board.platform", m_platform_name, "0");
 #ifdef _ANDROID_
-    char platform_name[PROPERTY_VALUE_MAX];
-    property_get("ro.board.platform", platform_name, "0");
-    if (!strncmp(platform_name, "msm8610", 7)) {
+    if (!strncmp(m_platform_name, "msm8610", 7)) {
         device_name = (OMX_STRING)"/dev/video/q6_dec";
         is_q6_platform = true;
         maxSmoothStreamingWidth = 1280;
@@ -11149,6 +11148,14 @@
     const ColorAspects &defaultColor = preferClientColor ?
         m_internal_color_space.sAspects : m_client_color_space.sAspects;
 
+    /* atoll does not support BT2020 color primaries, hence overriding with
+        BT709 to avoid tone mapping issue at display*/
+    if (!strncmp(m_platform_name, "atoll", 5) &&
+        (m_client_color_space.sAspects.mPrimaries == ColorAspects::PrimariesBT2020)) {
+        m_client_color_space.sAspects.mPrimaries = ColorAspects::PrimariesBT709_5;
+        m_client_color_space.sAspects.mMatrixCoeffs = ColorAspects::MatrixBT709_5;
+    }
+
     preferredColorAspects.mPrimaries = preferredColor.mPrimaries != ColorAspects::PrimariesUnspecified ?
         preferredColor.mPrimaries : defaultColor.mPrimaries;
     preferredColorAspects.mTransfer = preferredColor.mTransfer != ColorAspects::TransferUnspecified ?