diff --git a/aosp/vendor/isula/packages.mk b/aosp/vendor/isula/packages.mk index 569027e0bf7651f79f693a178e95519666b6d3c0..43615eca0ed2eb9d65c481743fe770677c2ff408 100644 --- a/aosp/vendor/isula/packages.mk +++ b/aosp/vendor/isula/packages.mk @@ -91,6 +91,16 @@ PRODUCT_PACKAGES += \ libvmpp-enc \ libvmpp-dec \ va_gfx.ini \ + libavcodec \ + libavdevice \ + libavfilter \ + libavformat \ + libavutil \ + libswresample \ + libswscale \ + libDisplayServer \ + libpostproc \ + va_drv_video \ libdrm.vendor \ libdumpstateutil.vendor \ libutilscallstack.vendor \ @@ -123,4 +133,4 @@ PRODUCT_PACKAGES += \ media_codecs_c2.xml \ # tools -PRODUCT_PACKAGES += curl \ No newline at end of file +PRODUCT_PACKAGES += curl diff --git a/aosp/vendor/isula/vagpu/Android.mk b/aosp/vendor/isula/vagpu/Android.mk index ce8eb12e8ea01ea5a055b3ad4f2b749e8c29793b..c01514343fa77bbf620ebef44723ccadbd6d52d2 100644 --- a/aosp/vendor/isula/vagpu/Android.mk +++ b/aosp/vendor/isula/vagpu/Android.mk @@ -15,10 +15,10 @@ endif LOCAL_MODULE_SUFFIX := .so LOCAL_CHECK_ELF_FILES := false ifneq ($5,) -LOCAL_MULTILIB := both +LOCAL_MULTILIB := $5 endif include $$(BUILD_PREBUILT) -endef +endef define install-va-video-libs include $$(CLEAR_VARS) @@ -34,10 +34,10 @@ LOCAL_MODULE_RELATIVE_PATH := $4 endif LOCAL_CHECK_ELF_FILES := false ifneq ($5,) -LOCAL_MULTILIB := both +LOCAL_MULTILIB := $5 endif include $$(BUILD_PREBUILT) -endef +endef define install-va-configs include $$(CLEAR_VARS) @@ -53,7 +53,7 @@ endif LOCAL_MODULE_CLASS := ETC LOCAL_CHECK_ELF_FILES := false include $$(BUILD_PREBUILT) -endef +endef define install-va-bins include $$(CLEAR_VARS) @@ -69,7 +69,7 @@ LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_CHECK_ELF_FILES := false LOCAL_PROPRIETARY_MODULE = true include $$(BUILD_PREBUILT) -endef +endef define override-va-syslibs include $$(CLEAR_VARS) @@ -85,7 +85,14 @@ LOCAL_MODULE_TAGS := optional LOCAL_MODULE_SUFFIX := .so LOCAL_OVERRIDES_PACKAGES := $1 include $$(BUILD_PREBUILT) -endef +endef + +ifneq ($(wildcard $(LOCAL_PATH)/vendor/lib),) +VA_MULTILIB := both +else +VA_MULTILIB := first +endif + # GFX @@ -100,7 +107,7 @@ $(foreach lib, $(egl_libs), \ vendor/lib64/egl/$(lib).so, \ vendor/lib/egl/$(lib).so, \ egl, \ - 1))) + $(VA_MULTILIB)))) hw_libs := \ gralloc.default \ @@ -113,7 +120,7 @@ $(foreach lib, $(hw_libs), \ vendor/lib64/hw/$(lib).so, \ vendor/lib/hw/$(lib).so, \ hw, \ - 1))) + $(VA_MULTILIB)))) um_libs := \ libVAegl \ @@ -125,6 +132,7 @@ libsutu_display \ libcreatesurface \ libvaANDROID_WSEGL \ libvalloc \ +libDisplayServer \ $(foreach lib, $(um_libs), \ $(eval $(call install-va-shared-libs, \ @@ -132,7 +140,17 @@ $(foreach lib, $(um_libs), \ vendor/lib64/$(lib).so, \ vendor/lib/$(lib).so, \ , \ - 1))) + $(VA_MULTILIB)))) + +gpu_bins := \ +gpu_config.sh \ + +$(foreach bin, $(gpu_bins), \ + $(eval $(call install-va-bins, \ + $(bin), \ + vendor/bin/$(bin), \ + , \ + ))) va_config := \ va_gfx.ini \ @@ -144,85 +162,183 @@ $(foreach config, $(va_config), \ , \ $(TARGET_OUT_VENDOR_ETC)))) -# va libs +# VIDEO -va_libs := \ -libvaccrt \ -libvmpp-enc \ -libvmpp-dec \ +# NDK -$(foreach lib, $(va_libs), \ +ndk_libs := \ +libc++_shared \ + +$(foreach lib, $(ndk_libs), \ $(eval $(call install-va-shared-libs, \ $(lib), \ vendor/lib64/$(lib).so, \ vendor/lib/$(lib).so, \ , \ - 1))) + $(VA_MULTILIB)))) + +# FFMPEG +ffmpeg_libs := \ +libavdevice \ +libavfilter \ +libswscale \ +libavutil \ +libswresample \ +libavformat \ +libavcodec \ +libpostproc \ + +$(foreach lib, $(ffmpeg_libs), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/$(lib).so, \ + , \ + , \ + )))) + +video_drv_libs := \ +va_drv_video \ + +$(foreach lib, $(video_drv_libs), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/$(lib).so, \ + , \ + , \ + )))) +# vame + +vame_libs := \ +libfn-log \ +libvacm \ +libvame \ +libvaml \ + +$(foreach lib, $(vame_libs), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/vame/lib/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/vame/lib/$(lib).so, \ + , \ + vame/lib, \ + )))) + +vame_config := \ +vslog.cfg \ + +$(foreach config, $(vame_config), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/etc/$(config)), \ + $(eval $(call install-va-configs, \ + $(config), \ + vendor/etc/$(config), \ + , \ + $(TARGET_OUT_VENDOR_ETC))))) + +# va libs + +va_libs := \ +libvaccrt \ +libvmpp-enc \ +libvmpp-dec \ + +$(foreach lib, $(va_libs), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/$(lib).so, \ + vendor/lib/$(lib).so, \ + , \ + $(VA_MULTILIB))))) + +# OMX + +omx_libs := \ +libstagefrighthw_va \ +libVa_OMX_VideoDec_HW \ +va_omx_component \ + +$(foreach lib, $(omx_libs), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/$(lib).so, \ + vendor/lib/$(lib).so, \ + , \ + $(VA_MULTILIB))))) + +omx_config := \ +media_codecs_va_video.xml \ + +$(foreach config, $(omx_config), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/etc/$(config)), \ + $(eval $(call install-va-configs, \ + $(config), \ + vendor/etc/$(config), \ + , \ + $(TARGET_OUT_VENDOR_ETC))))) # C2 codec2_libs := \ libcodec2_default_common \ libcodec2_default_store \ + libcodec2_default_video_enc \ libcodec2_default_video_dec \ libcodec2_default_component \ - libcodec2_default_video_enc \ - libc++_shared \ $(foreach lib, $(codec2_libs), \ - $(eval $(call install-va-shared-libs, \ - $(lib), \ - vendor/lib64/$(lib).so, \ - , \ - , \ - ))) + $(if $(wildcard $(LOCAL_PATH)/vendor/lib64/$(lib).so), \ + $(eval $(call install-va-shared-libs, \ + $(lib), \ + vendor/lib64/$(lib).so, \ + vendor/lib/$(lib).so, \ + , \ + $(VA_MULTILIB))))) codec2_service := \ android.hardware.media.c2@1.0-service-default \ $(foreach srv, $(codec2_service), \ - $(eval $(call install-va-bins, \ - $(srv), \ - vendor/bin/hw/android.hardware.media.c2@1.0-service-default, \ - , \ - hw))) + $(if $(wildcard $(LOCAL_PATH)/vendor/bin/hw/$(srv)), \ + $(eval $(call install-va-bins, \ + $(srv), \ + vendor/bin/hw/$(srv), \ + , \ + hw)))) -codec2_enc_config := \ +codec2_config := \ + media_codecs_c2.xml \ default_enc_params.json \ -$(foreach config, $(codec2_enc_config), \ - $(eval $(call install-va-configs, \ - $(config), \ - vendor/etc/default_enc_params.json, \ - , \ - $(TARGET_OUT_VENDOR_ETC)))) - -codec2_dec_config := \ - media_codecs_c2.xml \ - -$(foreach config, $(codec2_dec_config), \ - $(eval $(call install-va-configs, \ - $(config), \ - vendor/etc/media_codecs_c2.xml, \ - , \ - $(TARGET_OUT_VENDOR_ETC)))) +$(foreach config, $(codec2_config), \ + $(if $(wildcard $(LOCAL_PATH)/vendor/etc/$(config)), \ + $(eval $(call install-va-configs, \ + $(config), \ + vendor/etc/$(config), \ + , \ + $(TARGET_OUT_VENDOR_ETC))))) codec2_init := \ android.hardware.media.c2@1.0-service-default.rc \ $(foreach srv, $(codec2_init), \ - $(eval $(call install-va-configs, \ - $(srv), \ - vendor/etc/init/android.hardware.media.c2@1.0-service-default.rc, \ - , \ - $(TARGET_OUT_VENDOR_ETC)/init))) + $(if $(wildcard $(LOCAL_PATH)/vendor/etc/init/$(srv)), \ + $(eval $(call install-va-configs, \ + $(srv), \ + vendor/etc/init/$(srv), \ + , \ + $(TARGET_OUT_VENDOR_ETC)/init)))) codec2_xml := \ android.hardware.media.c2@1.0-service-default.xml \ $(foreach srv, $(codec2_xml), \ - $(eval $(call install-va-configs, \ - $(srv), \ - vendor/etc/vintf/manifest/android.hardware.media.c2@1.0-service-default.xml, \ - , \ - $(TARGET_OUT_VENDOR_ETC)/vintf/manifest))) + $(if $(wildcard $(LOCAL_PATH)/vendor/etc/vintf/manifest/$(srv)), \ + $(eval $(call install-va-configs, \ + $(srv), \ + vendor/etc/vintf/manifest/$(srv), \ + , \ + $(TARGET_OUT_VENDOR_ETC)/vintf/manifest)))) +