diff options
author | John Stultz <john.stultz@linaro.org> | 2018-04-09 17:36:26 -0700 |
---|---|---|
committer | Alistair Strachan <astrachan@google.com> | 2018-06-16 04:48:05 +0000 |
commit | 7eac2820f3fc8101889710bfab69de0cc643f3ce (patch) | |
tree | a3f345f0b336b02d53e6d600d37848bd777a01fc | |
parent | 7b3cf21a1a051f4989e000f3212abd12505ee905 (diff) | |
download | hikey-7eac2820f3fc8101889710bfab69de0cc643f3ce.tar.gz |
Integrate HiSi video decoder support
This adds support for HiSi's video decoder support.
This commit does not contain the library blobs, as those
will be provided in a separate vendor package.
However this seems to gracefully fall back to software
decoding if the libraries aren't present or the kernel
doesn't support the vdec driver (like w/ 4.14+).
Change-Id: I5656e8616b18302a89fb2f708801bd5eb988aa7e
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | etc/media_codecs.xml | 63 | ||||
-rw-r--r-- | sepolicy/file_contexts | 3 | ||||
-rw-r--r-- | ueventd.common.rc | 2 |
3 files changed, 68 insertions, 0 deletions
diff --git a/etc/media_codecs.xml b/etc/media_codecs.xml index 424914d8..43bb0d8f 100644 --- a/etc/media_codecs.xml +++ b/etc/media_codecs.xml @@ -78,6 +78,69 @@ Only the three quirks included above are recognized at this point: <MediaCodecs> <Include href="media_codecs_google_audio.xml" /> <Decoders> + <MediaCodec name="OMX.hisi.video.decoder.avc" type="video/avc" > + <Quirk name="needs-flush-on-all-ports" /> + <Limit name="size" min="128x128" max="4096x2304" /> + <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" /> + <Feature name="adaptive-playback" /> + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.hisi.video.decoder.hevc" type="video/hevc" > + <Quirk name="needs-flush-on-all-ports" /> + <Limit name="size" min="128x128" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="block-count" range="64-36896" /> + <Limit name="blocks-per-second" range="99-1106880" /> + <Limit name="bitrate" range="1-52428800" /> + <Feature name="adaptive-playback" /> + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.hisi.video.decoder.mpeg4" type="video/mp4v-es" > + <Quirk name="needs-flush-on-all-ports" /> + <Limit name="size" min="128x128" max="1920x1088" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="99-244800" /> + <Limit name="bitrate" range="1-60000000" /> + <Feature name="adaptive-playback" /> + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.hisi.video.decoder.mpeg2" > + <Quirk name="needs-flush-on-all-ports" /> + <Limit name="size" min="128x128" max="1920x1088" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="99-244800" /> + <Limit name="bitrate" range="1-60000000" /> + <Feature name="adaptive-playback" /> + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="concurrent-instances" max="16" /> + <Type name="video/mpeg2"> + <Limit name="concurrent-instances" max="16" /> + </Type> + <Type name="video/mpeg"> + <Limit name="concurrent-instances" max="16" /> + </Type> + </MediaCodec> + <MediaCodec name="OMX.hisi.video.decoder.vp8" type="video/x-vnd.on2.vp8" > + <Limit name="size" min="128x128" max="1920x1088" /> + <Quirk name="needs-flush-on-all-ports" /> + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Feature name="adaptive-playback" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" /> <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" /> <MediaCodec name="OMX.google.h264.decoder" type="video/avc" /> diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 9d703935..d9658d3f 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -11,6 +11,9 @@ /dev/ttyAMA1 u:object_r:hci_attach_dev:s0 /dev/ttyAMA4 u:object_r:hci_attach_dev:s0 /dev/hifi_misc u:object_r:audio_device:s0 +/dev/hi_vdec u:object_r:video_device:s0 +/dev/hi_venc u:object_r:video_device:s0 + # files in /vendor /(vendor|system/vendor)/bin/uim u:object_r:hci_attach_exec:s0 diff --git a/ueventd.common.rc b/ueventd.common.rc index df20cba9..b76dd4ca 100644 --- a/ueventd.common.rc +++ b/ueventd.common.rc @@ -9,6 +9,8 @@ subsystem usbmisc /dev/nanohub 0660 system system /dev/nanohub_comms 0660 system system /dev/hifi_misc 0666 system audio +/dev/hi_vdec 0660 system camera +/dev/hi_venc 0660 system camera /sys/devices/platform/ddr_devfreq/devfreq/ddr_devfreq min_freq 0644 system system /sys/devices/platform/e82c0000.mali/devfreq/e82c0000.mali min_freq 0644 system system |