网上没有搜到安卓下对vp9与hevc硬解码的支持的情况。
谷歌官方上的解码支持是:
developer.android.com/guide/topic…
Android 4.4及以上支持VP9解码。 Android 5.0及以上支持hevc解码。
不过这指的系统层面的支持,不包括硬解码的支持。
找了几台设备的media_codecs,做下大概的估计:
三星S5 Adreno 330不支持vp9与hevc硬解,S6 Adreno 506开始支持。Adreno 4系列手上没有相关设备。 网上查了下: cpu-comparison.com/zh/igpu/qua…
Adreno 4系列开始支持hevc硬解,不支持vp9硬解。 ARM Mali-T830 MP1 开始支持vp9与hevc硬解。这个与s6的media_codecs文件矛盾。
华为P9 Lite有点奇怪用的是Mali-T830 MP2,但是只支持hevc硬解,没有支持vp9。
cat vendor/etc/media_codecs.xml
或者
cat system/etc/media_codecs.xml
#Galaxy S6
#ARM Mali-T760 MP8
<MediaCodec name="OMX.Exynos.vp9.dec" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
<Limit name="size" min="64x64" max="3840x2160" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="972000" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="concurrent-instances" max="16" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="OMX.Exynos.hevc.dec" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
<Limit name="size" min="64x64" max="3840x2160" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="972000" />
<Limit name="bitrate" range="1-100000000" />
<Limit name="concurrent-instances" max="16" />
<Feature name="adaptive-playback" />
</MediaCodec>
最小解码分辨率:64x64
Decoder capabilities for SDM450 # Qualcomm Snapdragon 450
__________ _________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_________________________________________|
| hevc | 1920 1088 60 60 489600 |
| h264 | 1920 1088 60 60 489600 |
| h263 | 864 480 30 2 48600 |
| mpeg4 | 1920 1088 60 60 489600 |
| mpeg2 | 1920 1088 30 40 244800 |
| vc1 | 1920 1088 60 60 489600 |
| vp8 | 1920 1088 60 60 489600 |
| vp9 | 1920 1088 60 60 489600 |
| divx3 | 720 480 30 2 40500 |
| div4/5/6 | 1920 1088 30 10 244800 |
|__________|_________________________________________|
最小解码分辨率:96x96
670 Non-Secure decoder capabilities # Qualcomm Snapdragon 670
_________________________________________________________
| Codec | W H fps Mbps MB/s |
|_____________|_________________________________________|
| h264 | 4096 2160 24 100 829440 |
| hevc | 4096 2160 24 100 829440 |
| mpeg4-sw | 1920 1088 30 40 244800 |
| vp8 | 3840 2160 30 100 972000 |
| vp9 | 4096 2160 24 100 829440 |
| 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 |
|_____________|_________________________________________|
#Samsung galaxy s9
<MediaCodec name="OMX.Exynos.vp9.dec" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="64x64" max="3840x2160" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="3888000" />
<Limit name="bitrate" range="1-80000000" />
<Limit name="performance-point-3840x2160" range="120" />
<Limit name="concurrent-instances" max="16" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="OMX.Exynos.hevc.dec" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="64x64" max="3840x2160" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="3888000" />
<Limit name="bitrate" range="1-120000000" />
<Limit name="performance-point-3840x2160" range="120" />
<Limit name="concurrent-instances" max="16" />
<Feature name="adaptive-playback" />
</MediaCodec>
#Samsung galaxy s10
Non-Secure decoder capabilities
(MB is defined as 16x16)
_____________________________________________________________________
| Codec | W H fps Mbps MB/s Max MB/s|
|_____________|_____________________________________________________|
| h264 | 1920 1088 480 220 3916800 3916800 |
| | 3820 2160 120 220 3888000 |
| | 4096 2160 96 220 3317760 |
| | 4096 2304 60 220 2211840 |
| | 7680 4320 30 220 3888000 |
| | 8192 4320 24 220 3317760 |
| hevc | 1920 1088 480 220 3916800 3916800 |
| | 3820 2160 120 220 3888000 |
| | 4096 2160 96 220 3317760 |
| | 4096 2304 60 220 2211840 |
| | 7680 4320 30 220 3888000 |
| | 8192 4320 24 220 3317760 |
| mpeg4-sw | 1920 1088 30 40 244800 244800 |
| vp8 | 1280 720 240 100 864000 1036800 |
| | 1920 1088 120 100 979200 |
| | 3840 2160 30 100 972000 |
| | 4096 2160 30 100 1036800 |
| | 4096 2304 24 100 884736 |
| vp9 | 1920 1088 480 220 3916800 3916800 |
| | 3820 2160 120 220 3888000 |
| | 4096 2160 96 220 3317760 |
| | 4096 2304 60 220 2211840 |
| | 7680 4320 30 220 3888000 |
| | 8192 4320 24 220 3317760 |
| vc1 | 1920 1088 30 20 244800 244800 |
| div4/5/6-sw | 1920 1088 30 10 244800 244800 |
| h263-sw | 864 480 30 16 48600 48600 |
| mpeg2 | 1920 1088 30 40 244800 244800 |
|_____________|_____________________________________________________|
#Huawei P9 Lite (L31)
#HiSilicon Kirin 650
<MediaCodec name="OMX.IMG.MSVDX.Decoder.HEVC" type="video/hevc">
<Quirk name="needs-flush-on-all-ports" />
<Quirk name="requires-allocate-on-input-ports" />
<Limit name="size" min="96x16" max="4096x2160" />
<Limit name="concurrent-instances" max="16" />
<Feature name="adaptive-playback" />
</MediaCodec>