X6833B: Configure Media stack

* References: 1cba75df74

Co-authored-by: electimon <electimon@gmail.com>
Co-authored-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
This commit is contained in:
dodyirawan85 2023-12-13 09:42:40 +07:00
parent 8739c09edc
commit 1a1754044a
17 changed files with 2852 additions and 0 deletions

View file

@ -46,6 +46,13 @@ $(KEYMASTER_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $@" $(hide) echo "Linking $@"
@ln -sf $(subst default,trustonic,$(notdir $@)) $@ @ln -sf $(subst default,trustonic,$(notdir $@)) $@
MEDIA_SYMLINKS := \
$(TARGET_OUT_VENDOR)/bin/v3avpud
$(MEDIA_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $@"
@ln -sf $(notdir $@).$(TARGET_BOARD_PLATFORM) $@
SENSOR_SYMLINKS := $(TARGET_OUT_VENDOR)/lib64/hw/sensors.$(TARGET_BOARD_PLATFORM).so SENSOR_SYMLINKS := $(TARGET_OUT_VENDOR)/lib64/hw/sensors.$(TARGET_BOARD_PLATFORM).so
$(SENSOR_SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(SENSOR_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
$(hide) echo "Linking $(notdir $@)" $(hide) echo "Linking $(notdir $@)"
@ -61,6 +68,7 @@ ALL_DEFAULT_INSTALLED_MODULES += \
$(DISPLAY_SYMLINKS) \ $(DISPLAY_SYMLINKS) \
$(GATEKEEPER_SYMLINKS) \ $(GATEKEEPER_SYMLINKS) \
$(KEYMASTER_SYMLINKS) \ $(KEYMASTER_SYMLINKS) \
$(MEDIA_SYMLINKS) \
$(SENSOR_SYMLINKS) \ $(SENSOR_SYMLINKS) \
$(VENDOR_PLATFORM_SYMLINKS) $(VENDOR_PLATFORM_SYMLINKS)

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012 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.
-->
<!--
<!DOCTYPE MediaCodecs [
<!ELEMENT MediaCodecs (Decoders,Encoders)>
<!ELEMENT Decoders (MediaCodec*)>
<!ELEMENT Encoders (MediaCodec*)>
<!ELEMENT MediaCodec (Type*,Quirk*)>
<!ATTLIST MediaCodec name CDATA #REQUIRED>
<!ATTLIST MediaCodec type CDATA>
<!ELEMENT Type EMPTY>
<!ATTLIST Type name CDATA #REQUIRED>
<!ELEMENT Quirk EMPTY>
<!ATTLIST Quirk name CDATA #REQUIRED>
]>
There's a simple and a complex syntax to declare the availability of a
media codec:
A codec that properly follows the OpenMax spec and therefore doesn't have any
quirks and that only supports a single content type can be declared like so:
<MediaCodec name="OMX.foo.bar" type="something/interesting" />
If a codec has quirks OR supports multiple content types, the following syntax
can be used:
<MediaCodec name="OMX.foo.bar" >
<Type name="something/interesting" />
<Type name="something/else" />
...
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="output-buffers-are-unreadable" />
</MediaCodec>
Only the three quirks included above are recognized at this point:
"requires-allocate-on-input-ports"
must be advertised if the component does not properly support specification
of input buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"requires-allocate-on-output-ports"
must be advertised if the component does not properly support specification
of output buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"output-buffers-are-unreadable"
must be advertised if the emitted output buffers of a decoder component
are not readable, i.e. use a custom format even though abusing one of
the official OMX colorspace constants.
Clients of such decoders will not be able to access the decoded data,
naturally making the component much less useful. The only use for
a component with this quirk is to render the output to the screen.
Audio decoders MUST NOT advertise this quirk.
Video decoders that advertise this quirk must be accompanied by a
corresponding color space converter for thumbnail extraction,
matching surfaceflinger support that can render the custom format to
a texture and possibly other code, so just DON'T USE THIS QUIRK.
2012/07/13 config for MTK OMX Media Codecs, created by Morris Yang (mtk03147)
-->
<MediaCodecs>
<Settings>
<Setting name="max-video-encoder-input-buffers" value="10" />
</Settings>
<Include href="media_codecs_mediatek_audio.xml" />
<Include href="media_codecs_google_audio.xml" />
</MediaCodecs>

View file

@ -0,0 +1,427 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2014 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.
-->
<MediaCodecs>
<Settings>
<!-- disable TV and telephony domains by default. These must be opted in by OEMs -->
<Domain name="telephony" enabled="false" />
<Domain name="tv" enabled="false" />
<Variant name="slow-cpu" enabled="false" />
</Settings>
<Decoders>
<MediaCodec name="c2.android.mp3.decoder" type="audio/mpeg">
<Alias name="OMX.google.mp3.decoder" />
<Limit name="channel-count" max="2" />
<Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" />
<Limit name="bitrate" range="8000-320000" />
</MediaCodec>
<MediaCodec name="c2.android.amrnb.decoder" type="audio/3gpp">
<Alias name="OMX.google.amrnb.decoder" />
<Limit name="channel-count" max="1" />
<Limit name="sample-rate" ranges="8000" />
<Limit name="bitrate" range="4750-12200" />
</MediaCodec>
<MediaCodec name="c2.android.amrwb.decoder" type="audio/amr-wb">
<Alias name="OMX.google.amrwb.decoder" />
<Limit name="channel-count" max="1" />
<Limit name="sample-rate" ranges="16000" />
<Limit name="bitrate" range="6600-23850" />
</MediaCodec>
<MediaCodec name="c2.android.aac.decoder" type="audio/mp4a-latm">
<Alias name="OMX.google.aac.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="7350,8000,11025,12000,16000,22050,24000,32000,44100,48000" />
<Limit name="bitrate" range="8000-960000" />
</MediaCodec>
<MediaCodec name="c2.android.g711.alaw.decoder" type="audio/g711-alaw">
<Alias name="OMX.google.g711.alaw.decoder" />
<Limit name="channel-count" max="6" />
<Limit name="sample-rate" ranges="8000-48000" />
<Limit name="bitrate" range="64000" />
</MediaCodec>
<MediaCodec name="c2.android.g711.mlaw.decoder" type="audio/g711-mlaw">
<Alias name="OMX.google.g711.mlaw.decoder" />
<Limit name="channel-count" max="6" />
<Limit name="sample-rate" ranges="8000-48000" />
<Limit name="bitrate" range="64000" />
</MediaCodec>
<MediaCodec name="c2.android.vorbis.decoder" type="audio/vorbis">
<Alias name="OMX.google.vorbis.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-96000" />
<Limit name="bitrate" range="32000-500000" />
</MediaCodec>
<MediaCodec name="c2.android.opus.decoder" type="audio/opus">
<Alias name="OMX.google.opus.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000,12000,16000,24000,48000" />
<Limit name="bitrate" range="6000-510000" />
</MediaCodec>
<MediaCodec name="c2.android.raw.decoder" type="audio/raw">
<Alias name="OMX.google.raw.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-96000" />
<Limit name="bitrate" range="1-10000000" />
</MediaCodec>
<MediaCodec name="c2.android.flac.decoder" type="audio/flac">
<Alias name="OMX.google.flac.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="1-655350" />
<Limit name="bitrate" range="1-21000000" />
</MediaCodec>
<MediaCodec name="c2.android.gsm.decoder" type="audio/gsm" domain="telephony">
<Alias name="OMX.google.gsm.decoder" />
<Limit name="channel-count" max="1" />
<Limit name="sample-rate" ranges="8000" />
<Limit name="bitrate" range="13000" />
</MediaCodec>
<MediaCodec name="c2.mtk.adpcm-ms.decoder" type="audio/x-adpcm-ms">
<Alias name="OMX.MTK.AUDIO.DECODER.ADPCM.MS" />
<Limit name="channel-count" max="8" />
</MediaCodec>
<MediaCodec name="c2.mtk.adpcm-dvi-ima.decoder" type="audio/x-adpcm-dvi-ima">
<Alias name="OMX.MTK.AUDIO.DECODER.ADPCM.DVI" />
<Limit name="channel-count" max="8" />
</MediaCodec>
<MediaCodec name="c2.mtk.ape.decoder" type="audio/ape">
<Alias name="OMX.MTK.AUDIO.DECODER.APE" />
<Limit name="channel-count" max="2" />
</MediaCodec>
<MediaCodec name="c2.mtk.alac.decoder" type="audio/alac">
<Alias name="OMX.MTK.AUDIO.DECODER.ALAC" />
<Limit name="channel-count" max="8" />
</MediaCodec>
<MediaCodec name="c2.mtk.wma.decoder" type="audio/x-ms-wma">
<Alias name="OMX.MTK.AUDIO.DECODER.WMA" />
<Limit name="channel-count" max="2" />
</MediaCodec>
<MediaCodec name="c2.mtk.mp3.decoder" type="audio/mpeg" rank="5">
<Alias name="OMX.MTK.AUDIO.DECODER.MP3" />
<Limit name="channel-count" max="2" />
<Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" />
<Limit name="bitrate" range="8000-320000" />
</MediaCodec>
<MediaCodec name="c2.mtk.mpeg4.decoder" type="video/mp4v-es" >
<Alias name="OMX.MTK.VIDEO.DECODER.MPEG4" />
<Limit name="size" min="16x16" max="2048x1088" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="120" />
<Limit name="performance-point-1920x1088" value="60" />
</MediaCodec>
<MediaCodec name="c2.mtk.h263.decoder" type="video/3gpp" >
<Alias name="OMX.MTK.VIDEO.DECODER.H263" />
<Limit name="size" min="128x96" max="1408x1152" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="60" />
</MediaCodec>
<MediaCodec name="c2.mtk.avc.decoder" type="video/avc" >
<Alias name="OMX.MTK.VIDEO.DECODER.AVC" />
<Limit name="size" min="64x64" max="2560x1440" />
<Quirk name="wants-NAL-fragments" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="120" />
<Limit name="performance-point-1920x1088" value="60" />
<Limit name="performance-point-2560x1440" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.avc.decoder.secure" type="video/avc" >
<Alias name="OMX.MTK.VIDEO.DECODER.AVC.secure" />
<Limit name="size" min="64x64" max="2560x1440" />
<Quirk name="wants-NAL-fragments" />
<Feature name="secure-playback" required="true" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="1" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.hevc.decoder" type="video/hevc" >
<Alias name="OMX.MTK.VIDEO.DECODER.HEVC" />
<Limit name="size" min="16x16" max="2560x1440" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="120" />
<Limit name="performance-point-1920x1088" value="60" />
<Limit name="performance-point-2560x1440" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.hevc.decoder.secure" type="video/hevc" >
<Alias name="OMX.MTK.VIDEO.DECODER.HEVC.secure" />
<Limit name="size" min="16x16" max="2560x1440" />
<Quirk name="wants-NAL-fragments" />
<Feature name="secure-playback" required="true" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="1" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.heif.decoder" type="image/vnd.android.heic" >
<Alias name="OMX.MTK.VIDEO.DECODER.HEIF" />
<Limit name="size" min="16x16" max="16383x16383" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-3840x2160" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.vpx.decoder" type="video/x-vnd.on2.vp8" >
<Alias name="OMX.MTK.VIDEO.DECODER.VPX" />
<Limit name="size" min="16x16" max="1920x1088" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.vp9.decoder" type="video/x-vnd.on2.vp9" >
<Alias name="OMX.MTK.VIDEO.DECODER.VP9" />
<Limit name="size" min="16x16" max="2560x1440" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="120" />
<Limit name="performance-point-1920x1088" value="60" />
<Limit name="performance-point-2560x1440" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.vp9.decoder.secure" type="video/x-vnd.on2.vp9" >
<Alias name="OMX.MTK.VIDEO.DECODER.VP9.secure" />
<Limit name="size" min="16x16" max="2560x1440" />
<Quirk name="wants-NAL-fragments" />
<Feature name="secure-playback" required="true" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="1" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.mpeg2.decoder" type="video/mpeg2" >
<Alias name="OMX.MTK.VIDEO.DECODER.MPEG2" />
<Limit name="size" min="16x16" max="2048x1088" />
<Feature name="adaptive-playback"/>
<Limit name="concurrent-instances" max="32" />
<Limit name="performance-point-1280x720" value="120" />
<Limit name="performance-point-1920x1088" value="60" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
<Alias name="OMX.google.mpeg4.decoder" />
<!-- profiles and levels: ProfileSimple : Level3 -->
<Limit name="size" min="2x2" max="352x288" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" range="12-11880" />
<Limit name="bitrate" range="1-384000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
<Alias name="OMX.google.h263.decoder" />
<!-- profiles and levels: ProfileBaseline : Level30, ProfileBaseline : Level45
ProfileISWV2 : Level30, ProfileISWV2 : Level45 -->
<Limit name="size" min="2x2" max="352x288" />
<Limit name="alignment" value="2x2" />
<Limit name="bitrate" range="1-384000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
<Alias name="OMX.google.h264.decoder" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="size" min="2x2" max="1920x1088" />
<!-- profiles and levels: ProfileHigh : Level51 -->
<Limit name="block-count" range="1-16384" />
<Limit name="blocks-per-second" range="1-491520" />
<Limit name="bitrate" range="1-40000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
<Alias name="OMX.google.hevc.decoder" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="8x8" />
<Limit name="size" min="2x2" max="1920x1088" />
<!-- profiles and levels: ProfileMain : MainTierLevel51 -->
<Limit name="block-count" range="1-65536" />
<Limit name="blocks-per-second" range="1-491520" />
<Limit name="bitrate" range="1-5000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<Alias name="OMX.google.vp8.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="block-count" range="1-8192" /> <!-- max 2048x1024 -->
<Limit name="blocks-per-second" range="1-1000000" />
<Limit name="bitrate" range="1-40000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
<Alias name="OMX.google.vp9.decoder" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="size" min="2x2" max="1280x1280" />
<Limit name="block-count" range="1-3600" /> <!-- max 1280x720 -->
<Limit name="blocks-per-second" range="1-108000" />
<Limit name="bitrate" range="1-5000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.av1.decoder" type="video/av01" update="true">
<Limit name="size" min="2x2" max="1920x1080" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="block-count" range="1-16384" />
<Limit name="blocks-per-second" range="1-2073600" />
<Limit name="bitrate" range="1-120000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg2.decoder" type="video/mpeg2" domain="tv" update="true">
<Alias name="OMX.google.mpeg2.decoder" />
<!-- profiles and levels: ProfileMain : LevelHL -->
<Limit name="size" min="16x16" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" range="1-244800" />
<Limit name="bitrate" range="1-20000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
</Decoders>
<Encoders>
<MediaCodec name="c2.android.aac.encoder" type="audio/mp4a-latm">
<Alias name="OMX.google.aac.encoder" />
<Limit name="channel-count" max="6" />
<Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" />
<!-- also may support 64000, 88200 and 96000 Hz -->
<Limit name="bitrate" range="8000-960000" />
</MediaCodec>
<MediaCodec name="c2.android.amrnb.encoder" type="audio/3gpp">
<Alias name="OMX.google.amrnb.encoder" />
<Limit name="channel-count" max="1" />
<Limit name="sample-rate" ranges="8000" />
<Limit name="bitrate" range="4750-12200" />
<Feature name="bitrate-modes" value="CBR" />
</MediaCodec>
<MediaCodec name="c2.android.amrwb.encoder" type="audio/amr-wb">
<Alias name="OMX.google.amrwb.encoder" />
<Limit name="channel-count" max="1" />
<Limit name="sample-rate" ranges="16000" />
<Limit name="bitrate" range="6600-23850" />
<Feature name="bitrate-modes" value="CBR" />
</MediaCodec>
<MediaCodec name="c2.android.flac.encoder" type="audio/flac">
<Alias name="OMX.google.flac.encoder" />
<Limit name="channel-count" max="2" />
<Limit name="sample-rate" ranges="1-655350" />
<Limit name="bitrate" range="1-21000000" />
<Limit name="complexity" range="0-8" default="5" />
<Feature name="bitrate-modes" value="CQ" />
</MediaCodec>
<MediaCodec name="c2.android.opus.encoder" type="audio/opus">
<Limit name="channel-count" max="2" />
<Limit name="sample-rate" ranges="8000,12000,16000,24000,48000" />
<Limit name="bitrate" range="500-512000" />
<Limit name="complexity" range="0-10" default="5" />
<Feature name="bitrate-modes" value="CBR" />
</MediaCodec>
<MediaCodec name="c2.mtk.avc.encoder" type="video/avc" >
<Alias name="OMX.MTK.VIDEO.ENCODER.AVC" />
<Limit name="size" min="160x160" max="2560x1440" />
<Limit name="alignment" value="16x16" />
<Limit name="block-size" value="16x16" />
<Limit name="concurrent-instances" max="16" />
<Feature name="can-swap-width-height" value="1"/>
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.avc.encoder.secure" type="video/avc" >
<Limit name="size" min="160x128" max="1920x1088" />
<Limit name="alignment" value="16x16" />
<Limit name="block-size" value="16x16" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1088" value="30" />
<Feature name="special-codec" required="true" />
</MediaCodec>
<MediaCodec name="c2.mtk.hevc.encoder" type="video/hevc" >
<Alias name="OMX.MTK.VIDEO.ENCODER.HEVC" />
<Limit name="size" min="160x128" max="2560x1440" />
<Limit name="alignment" value="16x16" />
<Limit name="block-size" value="16x16" />
<Limit name="quality" range="0-100" default="50" />
<Limit name="concurrent-instances" max="12" />
<Feature name="bitrate-modes" value="VBR,CBR,CQ" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.mtk.heif.encoder" type="image/vnd.android.heic" >
<Alias name="OMX.MTK.VIDEO.ENCODER.HEIF" />
<Limit name="size" min="160x128" max="16383x16383" />
<Limit name="alignment" value="16x16" />
<Limit name="block-size" value="16x16" />
<Limit name="quality" range="0-100" default="50" />
<Limit name="concurrent-instances" max="2" />
<Feature name="bitrate-modes" value="VBR,CBR,CQ" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
<Alias name="OMX.google.h263.encoder" />
<!-- profiles and levels: ProfileBaseline : Level45 -->
<Limit name="size" min="176x144" max="176x144" />
<Limit name="alignment" value="16x16" />
<Limit name="bitrate" range="1-128000" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
<Alias name="OMX.google.mpeg4.encoder" />
<!-- profiles and levels: ProfileCore : Level2 -->
<Limit name="size" min="16x16" max="176x144" />
<Limit name="alignment" value="16x16" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" range="12-1485" />
<Limit name="bitrate" range="1-64000" />
</MediaCodec>
<MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
<Alias name="OMX.google.h264.encoder" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="size" min="16x16" max="1808x1808" />
<!-- profiles and levels: ProfileBaseline : Level3 -->
<Limit name="block-count" range="1-1620" />
<Limit name="blocks-per-second" range="1-40500" />
<Limit name="bitrate" range="1-2000000" />
<Feature name="intra-refresh" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
<Alias name="OMX.google.vp8.encoder" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="size" min="2x2" max="1280x1280" />
<!-- profiles and levels: ProfileMain : Level_Version0-3 -->
<Limit name="block-count" range="1-3600" /> <!-- max 1280x720 -->
<Limit name="bitrate" range="1-20000000" />
<Feature name="bitrate-modes" value="VBR,CBR" />
</MediaCodec>
<MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true" enabled="false">
<!-- profiles and levels: ProfileMain : MainTierLevel51 -->
<Limit name="size" min="2x2" max="512x512" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="8x8" />
<Limit name="block-count" range="1-4096" />
<!-- max 512x512 -->
<Limit name="blocks-per-second" range="1-122880" />
<Limit name="frame-rate" range="1-120" />
<Limit name="bitrate" range="1-10000000" />
<Limit name="complexity" range="0-10" default="0" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="VBR,CBR,CQ" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.encoder" type="video/x-vnd.on2.vp9" update="true" enabled="false">
<Alias name="OMX.google.vp9.encoder" />
<!-- profiles and levels: ProfileMain : Level_Version0-3 -->
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<!-- 2016 devices can encode at about 8fps at this block count -->
<Limit name="block-count" range="1-3600" /> <!-- max 1280x720 -->
<Limit name="bitrate" range="1-40000000" />
<Feature name="bitrate-modes" value="VBR,CBR" />
</MediaCodec>
</Encoders>
</MediaCodecs>

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012 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.
-->
<!--
<!DOCTYPE MediaCodecs [
<!ELEMENT MediaCodecs (Decoders,Encoders)>
<!ELEMENT Decoders (MediaCodec*)>
<!ELEMENT Encoders (MediaCodec*)>
<!ELEMENT MediaCodec (Type*,Quirk*)>
<!ATTLIST MediaCodec name CDATA #REQUIRED>
<!ATTLIST MediaCodec type CDATA>
<!ELEMENT Type EMPTY>
<!ATTLIST Type name CDATA #REQUIRED>
<!ELEMENT Quirk EMPTY>
<!ATTLIST Quirk name CDATA #REQUIRED>
]>
There's a simple and a complex syntax to declare the availability of a
media codec:
A codec that properly follows the OpenMax spec and therefore doesn't have any
quirks and that only supports a single content type can be declared like so:
<MediaCodec name="OMX.foo.bar" type="something/interesting" />
If a codec has quirks OR supports multiple content types, the following syntax
can be used:
<MediaCodec name="OMX.foo.bar" >
<Type name="something/interesting" />
<Type name="something/else" />
...
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="output-buffers-are-unreadable" />
</MediaCodec>
Only the three quirks included above are recognized at this point:
"requires-allocate-on-input-ports"
must be advertised if the component does not properly support specification
of input buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"requires-allocate-on-output-ports"
must be advertised if the component does not properly support specification
of output buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"output-buffers-are-unreadable"
must be advertised if the emitted output buffers of a decoder component
are not readable, i.e. use a custom format even though abusing one of
the official OMX colorspace constants.
Clients of such decoders will not be able to access the decoded data,
naturally making the component much less useful. The only use for
a component with this quirk is to render the output to the screen.
Audio decoders MUST NOT advertise this quirk.
Video decoders that advertise this quirk must be accompanied by a
corresponding color space converter for thumbnail extraction,
matching surfaceflinger support that can render the custom format to
a texture and possibly other code, so just DON'T USE THIS QUIRK.
2012/07/13 config for MTK OMX Media Codecs, created by Morris Yang (mtk03147)
-->
<Included>
<Decoders>
<MediaCodec name="OMX.MTK.AUDIO.DECODER.MP3" type="audio/mpeg" rank="6">
<Quirk name="decoder-lies-about-number-of-channels" />
<Quirk name="supports-multiple-frames-per-input-buffer" />
</MediaCodec>
<MediaCodec name="OMX.MTK.AUDIO.DECODER.GSM" type="audio/gsm" />
<!--TCD:delete XLQLBH-1272 KHLHLWYS-1790 by wenqiang.zhang 20220602 start-->
<!--<MediaCodec name="OMX.MTK.AUDIO.DECODER.WMA" type="audio/x-ms-wma" />-->
<!--TCD:delete XLQLBH-1272 KHLHLWYS-1790 by wenqiang.zhang 20220602 end-->
<MediaCodec name="OMX.MTK.AUDIO.DECODER.ADPCM.MS" type="audio/x-adpcm-ms" />
<MediaCodec name="OMX.MTK.AUDIO.DECODER.ADPCM.DVI" type="audio/x-adpcm-dvi-ima" />
<MediaCodec name="OMX.MTK.AUDIO.DECODER.APE" type="audio/ape" >
<Quirk name="decoder-lies-about-number-of-channels" />
<Quirk name="supports-multiple-frames-per-input-buffer" />
</MediaCodec>
<MediaCodec name="OMX.MTK.AUDIO.DECODER.ALAC" type="audio/alac" />
</Decoders>
</Included>

View file

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012 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.
-->
<!--
<!DOCTYPE MediaCodecs [
<!ELEMENT MediaCodecs (Decoders,Encoders)>
<!ELEMENT Decoders (MediaCodec*)>
<!ELEMENT Encoders (MediaCodec*)>
<!ELEMENT MediaCodec (Type*,Quirk*)>
<!ATTLIST MediaCodec name CDATA #REQUIRED>
<!ATTLIST MediaCodec type CDATA>
<!ELEMENT Type EMPTY>
<!ATTLIST Type name CDATA #REQUIRED>
<!ELEMENT Quirk EMPTY>
<!ATTLIST Quirk name CDATA #REQUIRED>
]>
There's a simple and a complex syntax to declare the availability of a
media codec:
A codec that properly follows the OpenMax spec and therefore doesn't have any
quirks and that only supports a single content type can be declared like so:
<MediaCodec name="OMX.foo.bar" type="something/interesting" />
If a codec has quirks OR supports multiple content types, the following syntax
can be used:
<MediaCodec name="OMX.foo.bar" >
<Type name="something/interesting" />
<Type name="something/else" />
...
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="output-buffers-are-unreadable" />
</MediaCodec>
Only the three quirks included above are recognized at this point:
"requires-allocate-on-input-ports"
must be advertised if the component does not properly support specification
of input buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"requires-allocate-on-output-ports"
must be advertised if the component does not properly support specification
of output buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"output-buffers-are-unreadable"
must be advertised if the emitted output buffers of a decoder component
are not readable, i.e. use a custom format even though abusing one of
the official OMX colorspace constants.
Clients of such decoders will not be able to access the decoded data,
naturally making the component much less useful. The only use for
a component with this quirk is to render the output to the screen.
Audio decoders MUST NOT advertise this quirk.
Video decoders that advertise this quirk must be accompanied by a
corresponding color space converter for thumbnail extraction,
matching surfaceflinger support that can render the custom format to
a texture and possibly other code, so just DON'T USE THIS QUIRK.
2012/07/13 config for MTK OMX Media Codecs, created by Morris Yang (mtk03147)
-->
<MediaCodecs>
<Encoders>
<!-- MTK codec -->
<MediaCodec name="c2.mtk.avc.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="130-286" />
<Limit name="measured-frame-rate-720x480" range="75-166" />
<Limit name="measured-frame-rate-1280x720" range="50-111" />
<Limit name="measured-frame-rate-1920x1080" range="36-80" />
</MediaCodec>
<MediaCodec name="c2.mtk.hevc.encoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-320x240" range="129-283" />
<Limit name="measured-frame-rate-720x480" range="75-166" />
<Limit name="measured-frame-rate-1280x720" range="51-113" />
<Limit name="measured-frame-rate-1920x1080" range="44-96" />
</MediaCodec>
<!-- Google codec -->
<MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="101-223" />
<Limit name="measured-frame-rate-720x480" range="62-136" />
<Limit name="measured-frame-rate-1280x720" range="21-46" />
<Limit name="measured-frame-rate-1920x1080" range="13-29" />
</MediaCodec>
<MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-320x240" range="20-43" />
</MediaCodec>
<MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="265-584" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="243-536" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="128-281" />
<Limit name="measured-frame-rate-640x360" range="65-143" />
<Limit name="measured-frame-rate-1280x720" range="13-29" />
<Limit name="measured-frame-rate-1920x1080" range="9-20" />
</MediaCodec>
</Encoders>
<Decoders>
<!-- MTK codec -->
<MediaCodec name="c2.mtk.mpeg4.decoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="350-1056" />
<Limit name="measured-frame-rate-480x360" range="136-759" />
<Limit name="measured-frame-rate-1280x720" range="54-119" />
</MediaCodec>
<MediaCodec name="c2.mtk.h263.decoder" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="274-602" />
<Limit name="measured-frame-rate-352x288" range="233-513" />
</MediaCodec>
<MediaCodec name="c2.mtk.avc.decoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="426-938" />
<Limit name="measured-frame-rate-720x480" range="193-424" />
<Limit name="measured-frame-rate-1280x720" range="138-304" />
<Limit name="measured-frame-rate-1920x1080" range="55-122" />
</MediaCodec>
<MediaCodec name="c2.mtk.hevc.decoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="484-1065" />
<Limit name="measured-frame-rate-640x360" range="362-796" />
<Limit name="measured-frame-rate-720x480" range="241-530" />
<Limit name="measured-frame-rate-1280x720" range="184-405" />
<Limit name="measured-frame-rate-1920x1080" range="69-354" />
</MediaCodec>
<MediaCodec name="c2.mtk.vpx.decoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="161-355" />
<Limit name="measured-frame-rate-640x360" range="132-292" />
<Limit name="measured-frame-rate-1280x720" range="65-142" />
<Limit name="measured-frame-rate-1920x1080" range="23-79" />
</MediaCodec>
<MediaCodec name="c2.mtk.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
<Limit name="measured-frame-rate-320x180" range="237-522" />
<Limit name="measured-frame-rate-640x360" range="170-373" />
<Limit name="measured-frame-rate-1280x720" range="89-196" />
<Limit name="measured-frame-rate-1920x1080" range="55-121" />
</MediaCodec>
<!-- Google codec -->
<MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="359-790" />
</MediaCodec>
<MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="313-688" />
<Limit name="measured-frame-rate-352x288" range="128-297" />
</MediaCodec>
<MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="110-243" />
<Limit name="measured-frame-rate-720x480" range="31-68" />
<Limit name="measured-frame-rate-1280x720" range="20-44" />
<Limit name="measured-frame-rate-1920x1080" range="13-28" />
</MediaCodec>
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="114-250" />
<Limit name="measured-frame-rate-640x360" range="59-129" />
<Limit name="measured-frame-rate-720x480" range="57-125" />
<Limit name="measured-frame-rate-1280x720" range="21-46" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="345-760" />
<Limit name="measured-frame-rate-640x360" range="185-406" />
<Limit name="measured-frame-rate-1280x720" range="49-107" />
<Limit name="measured-frame-rate-1920x1080" range="20-43" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
<Limit name="measured-frame-rate-320x180" range="201-442" />
<Limit name="measured-frame-rate-640x360" range="89-195" />
<Limit name="measured-frame-rate-1280x720" range="52-115" />
<Limit name="measured-frame-rate-1920x1080" range="29-64" />
</MediaCodec>
</Decoders>
</MediaCodecs>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
OMX.MTK.AUDIO.DECODER.MP3 audio_decoder.mp3 libMtkOmxMp3Dec.so 32
OMX.MTK.AUDIO.DECODER.APE audio_decoder.ape libMtkOmxApeDec.so 32
OMX.MTK.AUDIO.DECODER.ADPCM.MS audio_decoder.adpcm libMtkOmxAdpcmDec.so 32
OMX.MTK.AUDIO.DECODER.ADPCM.DVI audio_decoder.adpcm libMtkOmxAdpcmDec.so 32
OMX.MTK.AUDIO.DECODER.GSM audio_decoder.gsm libMtkOmxGsmDec.so 32
OMX.MTK.AUDIO.DECODER.ALAC audio_decoder.alac libMtkOmxAlacDec.so 32

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
-->
<MediaCodecs>
<Decoders>
<Video name="color.converter"
alwaysColorConvertChecker="true" />
<Video name="cpu.boost.mode"
cluster="0"
minFrequency="700000" />
<Video name="c2.mtk.mpeg4.decoder"
type="video/mp4v-es"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.mpeg2.decoder"
type="video/mpeg2"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.h263.decoder"
type="video/3gpp"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.avc.decoder"
type="video/avc"
driverIntf="v4l2"
maxConcurrentInstances="32"
metaBufferSize="4096" />
<Video name="c2.mtk.avc.decoder.secure"
type="video/avc"
driverIntf="v4l2"
maxConcurrentInstances="1" />
<Video name="c2.mtk.hevc.decoder"
type="video/hevc"
driverIntf="v4l2"
maxConcurrentInstances="32"
metaBufferSize="4096" />
<Video name="c2.mtk.hevc.decoder.secure"
type="video/hevc"
driverIntf="v4l2"
maxConcurrentInstances="1"
metaBufferSize="4096" />
<Video name="c2.mtk.heif.decoder"
type="image/vnd.android.heic"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.vpx.decoder"
type="video/x-vnd.on2.vp8"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.vp9.decoder"
type="video/x-vnd.on2.vp9"
driverIntf="v4l2"
maxConcurrentInstances="32" />
<Video name="c2.mtk.vp9.decoder.secure"
type="video/x-vnd.on2.vp9"
driverIntf="v4l2"
maxConcurrentInstances="1" />
<Video name="c2.mtk.mpeg2.decoder"
type="video/mpeg2"
driverIntf="v4l2"
maxConcurrentInstances="32" />
</Decoders>
<Encoders>
<Video name="c2.mtk.avc.encoder"
type="video/avc"
driverIntf="v4l2"
maxConcurrentInstances="16"
canSwapWidthHeight="true" />
<Video name="c2.mtk.avc.encoder.secure"
type="video/avc"
driverIntf="v4l2"
maxConcurrentInstances="16"
canSwapWidthHeight="true" />
<Video name="c2.mtk.hevc.encoder"
type="video/hevc"
driverIntf="v4l2"
maxConcurrentInstances="12"
canSwapWidthHeight="true" />
<Video name="c2.mtk.heif.encoder"
type="image/vnd.android.heic"
driverIntf="v4l2"
maxConcurrentInstances="2"
canSwapWidthHeight="true" />
</Encoders>
</MediaCodecs>

View file

@ -85,6 +85,16 @@ persist.vendor.volte_support=1
ro.vendor.md_auto_setup_ims=1 ro.vendor.md_auto_setup_ims=1
ro.vendor.mtk_data_config=1 ro.vendor.mtk_data_config=1
# Media
debug.mediatek.disp_decompress=1
debug.stagefright.c2inputsurface=-1
media.c2.dmabuf.padding=3072
ro.vendor.jpeg_decode_sw_opt=1
ro.vendor.mtk_config_max_dram_size=0x800000000
ro.vendor.mtk_sec_video_path_support=1
ro.vendor.mtk_video_hevc_enc_support=1
vendor.mtk.vdec.waitkeyframeforplay=9
# Sensors # Sensors
ro.vendor.mtk.sensor.support=yes ro.vendor.mtk.sensor.support=yes

View file

@ -0,0 +1,42 @@
connect: 1
fcntl64: 1
socket: 1
writev: 1
clock_nanosleep: 1
eventfd2: 1
sched_getparam: 1
sched_getscheduler :1
setsockopt: 1
bind: 1
listen: 1
# Add more for 32bits process, from android.hardware.media.c2@1.1-default-arm.policy
mmap2: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
ftruncate64: 1
getuid32: 1
open: 1
fstat64: 1
readlink: 1
fstatfs64: 1
_llseek: 1
fstatat64: 1
ugetrlimit: 1
# crash dump policy additions
sigreturn: 1
futex: 1
#mmap2: arg2 in 0x1|0x2
geteuid32: 1
getgid32: 1
getegid32: 1
getgroups32: 1
getpriority: 1
mlock: 1
munlock: 1
fchmod: 1
getuid: 1
mmap: 1
getrlimit: 1
newfstatat: 1
fstat: 1
fstatfs: 1
flock: 1

View file

@ -0,0 +1,92 @@
# Copyright (C) 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.
futex: 1
# ioctl calls are filtered via the selinux policy.
ioctl: 1
sched_yield: 1
close: 1
dup: 1
ppoll: 1
mprotect: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
#mmap2: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
memfd_create: 1
ftruncate: 1
ftruncate64: 1
# mremap: Ensure |flags| are (MREMAP_MAYMOVE | MREMAP_FIXED) TODO: Once minijail
# parser support for '<' is in this needs to be modified to also prevent
# |old_address| and |new_address| from touching the exception vector page, which
# on ARM is statically loaded at 0xffff 0000. See
# http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0211h/Babfeega.html
# for more details.
mremap: arg3 == 3 || arg3 == MREMAP_MAYMOVE
munmap: 1
prctl: 1
getuid32: 1
writev: 1
sigaltstack: 1
clone: 1
exit: 1
lseek: 1
rt_sigprocmask: 1
openat: 1
open: 1
fstat64: 1
write: 1
nanosleep: 1
setpriority: 1
set_tid_address: 1
getdents64: 1
readlinkat: 1
readlink: 1
read: 1
pread64: 1
fstatfs64: 1
gettimeofday: 1
faccessat: 1
_llseek: 1
fstatat64: 1
ugetrlimit: 1
exit_group: 1
restart_syscall: 1
rt_sigreturn: 1
getrandom: 1
madvise: 1
sched_setaffinity: 1
sched_getaffinity: 1
sched_getparam: 1
sched_getscheduler: 1
recvfrom: 1
# crash dump policy additions
sigreturn: 1
clock_gettime: 1
futex: 1
getpid: 1
gettid: 1
pipe2: 1
recvmsg: 1
process_vm_readv: 1
tgkill: 1
rt_sigaction: 1
rt_tgsigqueueinfo: 1
#prctl: arg0 == PR_GET_NO_NEW_PRIVS || arg0 == 0x53564d41
#mprotect: arg2 in 0x1|0x2
#mmap2: arg2 in 0x1|0x2
geteuid32: 1
getgid32: 1
getegid32: 1
getgroups32: 1
flock: 1

View file

@ -0,0 +1,22 @@
#Mediatek used system call
getpid: 1
gettid: 1
sendto: 1
pselect6: 1
sched_getparam: 1
sched_getscheduler: 1
mlock: 1
munlock: 1
recvfrom: 1
sched_getaffinity: 1
sched_setaffinity: 1
sched_getaffinity: 1
flock: 1
fchownat: 1
fchmodat: 1
fsync: 1
sysinfo: 1
setsockopt: 1
setrlimit: 1
eventfd2: 1
unlinkat: 1

View file

@ -0,0 +1,8 @@
# MediaTek used system call
gettimeofday: 1
# for audio TableOfContent thread
ioprio_set: 1
unlinkat: 1
setsockopt: 1
clock_gettime: 1
setrlimit: 1

View file

@ -0,0 +1,2 @@
#Mediatek used system call
clock_nanosleep: 1

View file

@ -163,6 +163,23 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.lights-service.transsion android.hardware.lights-service.transsion
# Media
PRODUCT_PACKAGES += \
libcodec2_hidl@1.1.vendor \
libcodec2_hidl@1.2.vendor \
libavservices_minijail_vendor \
libstagefright_softomx_plugin.vendor \
libsfplugin_ccodec_utils.vendor \
libcodec2_soft_common.vendor
PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video_le.xml
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/seccomp,$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy) \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/media,$(TARGET_COPY_OUT_VENDOR)/etc)
# NFC # NFC
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.nfc@1.2.vendor \ android.hardware.nfc@1.2.vendor \

View file

@ -513,6 +513,57 @@ vendor/etc/init/android.hardware.security.keymint-service.trustonic.rc
-vendor/etc/vintf/manifest/android.hardware.security.secureclock-service.trustonic.xml -vendor/etc/vintf/manifest/android.hardware.security.secureclock-service.trustonic.xml
-vendor/etc/vintf/manifest/android.hardware.security.sharedsecret-service.trustonic.xml -vendor/etc/vintf/manifest/android.hardware.security.sharedsecret-service.trustonic.xml
# Media
vendor/bin/mt6789/v3avpud.mt6789
vendor/etc/init/v3avpud.rc
vendor/lib/mt6789/libvcodec_utility.so
vendor/lib/mt6789/libvcodec_utility_v3a.so
vendor/lib/mt6789/libvcodecdrv.so
vendor/lib/mt6789/libvcodecdrv_v3a.so
vendor/lib/mt6789/libvpudv3a_vcodec.so
vendor/lib/libvcodec_oal.so
vendor/lib/libvcodecdrv_header_stub.so
vendor/lib/libvpu5.so
vendor/lib/libvpud_vcodec.so
# Media (OMX)
vendor/lib/libMtkOmxAdpcmDec.so
vendor/lib/libMtkOmxAlacDec.so
vendor/lib/libMtkOmxCore.so
vendor/lib/libMtkOmxGsmDec.so
vendor/lib/libMtkOmxMp3Dec.so
vendor/lib/libadpcmdec_mtk.so
vendor/lib/libmp3dec_mtk.so
vendor/lib/libstagefrighthw.so
vendor/lib64/libstagefrighthw.so
# Media (C2)
vendor/bin/hw/android.hardware.media.c2@1.2-mediatek-64b:vendor/bin/hw/android.hardware.media.c2@1.2-mediatek
vendor/etc/init/android.hardware.media.c2@1.2-mediatek.rc
vendor/etc/vintf/manifest/manifest_media_c2_V1_1_default.xml
vendor/lib/libcodec2_mtk_c2store.so
vendor/lib/libcodec2_mtk_vdec.so
vendor/lib/libcodec2_mtk_venc.so
vendor/lib/libcodec2_soft_mtk_alacdec.so
vendor/lib/libcodec2_soft_mtk_apedec.so
vendor/lib/libcodec2_soft_mtk_imaadpcmdec.so
vendor/lib/libcodec2_soft_mtk_mp3dec.so
vendor/lib/libcodec2_soft_mtk_msadpcmdec.so
vendor/lib/libcodec2_vpp_qt_plugin.so
vendor/lib/libcodec2_vpp_rs_plugin.so
vendor/lib/libformatter.so
vendor/lib64/libcodec2_mtk_c2store.so
vendor/lib64/libcodec2_mtk_vdec.so
vendor/lib64/libcodec2_mtk_venc.so
vendor/lib64/libcodec2_soft_mtk_alacdec.so
vendor/lib64/libcodec2_soft_mtk_apedec.so
vendor/lib64/libcodec2_soft_mtk_imaadpcmdec.so
vendor/lib64/libcodec2_soft_mtk_mp3dec.so
vendor/lib64/libcodec2_soft_mtk_msadpcmdec.so
vendor/lib64/libcodec2_vpp_qt_plugin.so
vendor/lib64/libcodec2_vpp_rs_plugin.so
vendor/lib64/libformatter.so
# NFC # NFC
vendor/bin/hw/android.hardware.nfc@1.2-service vendor/bin/hw/android.hardware.nfc@1.2-service
vendor/etc/init/android.hardware.nfc@1.2-service.rc vendor/etc/init/android.hardware.nfc@1.2-service.rc

View file

@ -1,3 +1,4 @@
bin/v3avpud.mt6789
lib/egl/libGLES_mali.so lib/egl/libGLES_mali.so
lib/hw/android.hardware.graphics.allocator@4.0-impl-mediatek.so lib/hw/android.hardware.graphics.allocator@4.0-impl-mediatek.so
lib/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so lib/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so
@ -14,6 +15,11 @@ lib/libnir_neon_driver.so
lib/libpq_cust_base.so lib/libpq_cust_base.so
lib/libpq_prot.so lib/libpq_prot.so
lib/libpqparamparser.so lib/libpqparamparser.so
lib/libvcodec_utility.so
lib/libvcodec_utility_v3a.so
lib/libvcodecdrv.so
lib/libvcodecdrv_v3a.so
lib/libvpudv3a_vcodec.so
lib64/egl/libGLES_mali.so lib64/egl/libGLES_mali.so
lib64/hw/android.hardware.graphics.allocator@4.0-impl-mediatek.so lib64/hw/android.hardware.graphics.allocator@4.0-impl-mediatek.so
lib64/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so lib64/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so