chipset-apl: set H264 decode limit to UHD(3840x2160)@24fps

When GTS version upreved to 7.0_r1, UHD@30fps sequences are used and we
found the decoding speed of UHD with DRM L3 is slightly less than 30fps
for Apollo Lake devices.

There is no UHD requirement for H264 decode on Android CDD, so we set
the decode limit down to UHD@24fps (used by GTS v6.0 and before).

BUG=b:138617566
TEST=emerge-coral -a arc-codec
TEST=pass GtsMediaTestCases WidevineH264PlaybackTests#testL3WithUHD30 on Santa

Change-Id: I24bca8cb47c28ee306b0df1cf27710fd538fd467
Reviewed-on: https://chromium-review.googlesource.com/1730934
Tested-by: Pin-chih Lin <johnylin@chromium.org>
Commit-Ready: Pin-chih Lin <johnylin@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
(cherry picked from commit 9e9816e7424d47e07dc08aae49849863a5795118)
diff --git a/chipset-apl/chromeos-base/arc-codec-chipset-apl/arc-codec-chipset-apl-0.0.1-r9.ebuild b/chipset-apl/chromeos-base/arc-codec-chipset-apl/arc-codec-chipset-apl-0.0.1-r10.ebuild
similarity index 100%
rename from chipset-apl/chromeos-base/arc-codec-chipset-apl/arc-codec-chipset-apl-0.0.1-r9.ebuild
rename to chipset-apl/chromeos-base/arc-codec-chipset-apl/arc-codec-chipset-apl-0.0.1-r10.ebuild
diff --git a/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs.xml b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs.xml
index ca2fdb3..91dc0d7 100644
--- a/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs.xml
+++ b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs.xml
@@ -93,4 +93,5 @@
     <Include href="media_codecs_google_audio.xml" />
     <Include href="media_codecs_google_video.xml" />
     <Include href="media_codecs_cheets.xml" />
+    <Include href="media_codecs_cheets_board_specific.xml" />
 </MediaCodecs>
diff --git a/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_c2.xml b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_c2.xml
index b099ccf..77e2e4f 100644
--- a/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_c2.xml
+++ b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_c2.xml
@@ -19,7 +19,8 @@
             <Limit name="size" min="16x16" max="4096x4096" />
             <Limit name="alignment" value="2x2" />
             <Limit name="block-size" value="16x16" />
-            <Limit name="blocks-per-second" min="1" max="2570400" />
+            <!-- Sets H264 decode limit to UHD(3840x2160)@24fps (b/138617566) -->
+            <Limit name="blocks-per-second" min="1" max="777600" />
             <Limit name="bitrate" range="1-62500000" />
             <Limit name="concurrent-instances" max="8" />
             <Feature name="adaptive-playback" />
diff --git a/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_cheets_board_specific.xml b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_cheets_board_specific.xml
new file mode 100644
index 0000000..eff0391
--- /dev/null
+++ b/chipset-apl/chromeos-base/arc-codec-chipset-apl/files/pic/media_codecs_cheets_board_specific.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2019 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<Included>
+    <Decoders>
+        <!-- Sets H264 decode limit to UHD(3840x2160)@24fps (b/138617566) -->
+        <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+            <Limit name="blocks-per-second" range="1-777600" />
+        </MediaCodec>
+    </Decoders>
+</Included>