chipset-mt8173: enable ARC++ VP9 HW decoder

Enable VP9 HW decode for ARC++ since b/79329929 is fixed.
The min/max size is obtained from mtk-vcodec driver codes.
The performance is obtained by Elm (ARC++N).

BUG=b:125134656
BUG=b:132048434
TEST=emerge-elm -a arc-codec

Change-Id: I2cdb3cabad48d98e9672aa21f72b58825cbfc9d1
Reviewed-on: https://chromium-review.googlesource.com/1614766
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Pin-chih Lin <johnylin@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
(cherry picked from commit 49840ea9572ab65a6b958f67d7582c3a2fe99171)
diff --git a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/arc-codec-chipset-mt8173-0.0.1-r8.ebuild b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/arc-codec-chipset-mt8173-0.0.1-r9.ebuild
similarity index 100%
rename from chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/arc-codec-chipset-mt8173-0.0.1-r8.ebuild
rename to chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/arc-codec-chipset-mt8173-0.0.1-r9.ebuild
diff --git a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs.xml b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs.xml
index acc1a55..54fb4fe 100644
--- a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs.xml
+++ b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs.xml
@@ -37,6 +37,15 @@
             <Limit name="concurrent-instances" max="8" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
+        <MediaCodec name="ARC.vp9.decode" type="video/x-vnd.on2.vp9" >
+            <Limit name="size" min="64x64" max="4096x2304" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="1036800" />
+            <Limit name="bitrate" range="1-60000000" />
+            <Limit name="concurrent-instances" max="8" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
         <MediaCodec name="ARC.h264.decode.secure" type="video/avc" >
             <Limit name="size" min="64x64" max="4096x2304" />
             <Limit name="alignment" value="2x2" />
@@ -57,6 +66,16 @@
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
         </MediaCodec>
+        <MediaCodec name="ARC.vp9.decode.secure" type="video/x-vnd.on2.vp9" >
+            <Limit name="size" min="64x64" max="4096x2304" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="1036800" />
+            <Limit name="bitrate" range="1-60000000" />
+            <Limit name="concurrent-instances" max="8" />
+            <Feature name="adaptive-playback" />
+            <Feature name="secure-playback" required="true" />
+        </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_audio.xml" />
     <Include href="media_codecs_google_video.xml" />
diff --git a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs_performance.xml b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs_performance.xml
index b442643..336ed12 100644
--- a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs_performance.xml
+++ b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/nyc/media_codecs_performance.xml
@@ -48,6 +48,13 @@
             <Limit name="measured-frame-rate-1280x720" range="178-180" />
             <Limit name="measured-frame-rate-1920x1080" range="94-95" />
         </MediaCodec>
+        <MediaCodec name="ARC.vp9.decode" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="296-296" />
+            <Limit name="measured-frame-rate-640x360" range="265-266" />
+            <Limit name="measured-frame-rate-1280x720" range="155-155" />
+            <Limit name="measured-frame-rate-1920x1080" range="111-111" />
+            <Limit name="measured-frame-rate-3840x2160" range="32-32" />
+        </MediaCodec>
         <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
             <Limit name="measured-frame-rate-176x144" range="243-512" />
         </MediaCodec>
diff --git a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_c2.xml b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_c2.xml
index 683d32b..f292d7e 100644
--- a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_c2.xml
+++ b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_c2.xml
@@ -33,6 +33,15 @@
             <Limit name="concurrent-instances" max="8" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
+        <MediaCodec name="c2.vda.vp9.decoder" type="video/x-vnd.on2.vp9" >
+            <Limit name="size" min="64x64" max="4096x2304" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="1036800" />
+            <Limit name="bitrate" range="1-60000000" />
+            <Limit name="concurrent-instances" max="8" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
         <MediaCodec name="c2.vda.avc.decoder.secure" type="video/avc" >
             <Limit name="size" min="64x64" max="4096x2304" />
             <Limit name="alignment" value="2x2" />
@@ -53,5 +62,15 @@
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
         </MediaCodec>
+        <MediaCodec name="c2.vda.vp9.decoder.secure" type="video/x-vnd.on2.vp9" >
+            <Limit name="size" min="64x64" max="4096x2304" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="1036800" />
+            <Limit name="bitrate" range="1-60000000" />
+            <Limit name="concurrent-instances" max="8" />
+            <Feature name="adaptive-playback" />
+            <Feature name="secure-playback" required="true" />
+        </MediaCodec>
     </Decoders>
 </MediaCodecs>
diff --git a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_performance_c2.xml b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_performance_c2.xml
index e15c267..7e32884 100644
--- a/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_performance_c2.xml
+++ b/chipset-mt8173/chromeos-base/arc-codec-chipset-mt8173/files/pic/media_codecs_performance_c2.xml
@@ -28,5 +28,12 @@
             <Limit name="measured-frame-rate-1280x720" range="178-180" />
             <Limit name="measured-frame-rate-1920x1080" range="94-95" />
         </MediaCodec>
+        <MediaCodec name="c2.vda.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="296-296" />
+            <Limit name="measured-frame-rate-640x360" range="265-266" />
+            <Limit name="measured-frame-rate-1280x720" range="155-155" />
+            <Limit name="measured-frame-rate-1920x1080" range="111-111" />
+            <Limit name="measured-frame-rate-3840x2160" range="32-32" />
+        </MediaCodec>
     </Decoders>
 </MediaCodecs>