support android-15.0.0_r1

This commit is contained in:
Ziyang Zhou
2024-09-05 20:42:56 +08:00
parent 4c18f31f2c
commit 142755f1b4
22 changed files with 989 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
From 3fd19c8bd01a55e40edfc639963465b9ae15789d Mon Sep 17 00:00:00 2001
From: Ziyang Zhou <ziyang.zhou@outlook.com>
Date: Mon, 20 Sep 2021 18:22:20 +0000
Subject: [PATCH 1/2] ? workaround for mesa video playback
---
media/libstagefright/colorconversion/SoftwareRenderer.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
index 2409315..1e3ec7b 100644
--- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp
+++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp
@@ -130,6 +130,7 @@ void SoftwareRenderer::resetFormatIfChanged(
// hardware has YUV12 and RGBA8888 support, so convert known formats
{
switch (mColorFormat) {
+#if 0 // HACKED
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
@@ -139,6 +140,7 @@ void SoftwareRenderer::resetFormatIfChanged(
bufHeight = (mCropHeight + 1) & ~1;
break;
}
+#endif
case OMX_COLOR_Format24bitRGB888:
{
halFormat = HAL_PIXEL_FORMAT_RGB_888;
@@ -154,6 +156,7 @@ void SoftwareRenderer::resetFormatIfChanged(
bufHeight = (mCropHeight + 1) & ~1;
break;
}
+#if 0 // HACKED
case OMX_COLOR_FormatYUV420Planar16:
{
if (((dataSpace & HAL_DATASPACE_STANDARD_MASK) == HAL_DATASPACE_STANDARD_BT2020)
@@ -170,6 +173,7 @@ void SoftwareRenderer::resetFormatIfChanged(
bufHeight = (mCropHeight + 1) & ~1;
break;
}
+#endif
default:
{
break;
--
2.45.1

View File

@@ -0,0 +1,76 @@
From cfdda512510a20305d55db8d58551ead7253e094 Mon Sep 17 00:00:00 2001
From: Ziyang Zhou <ziyang.zhou@outlook.com>
Date: Sat, 6 Aug 2022 10:17:12 +0800
Subject: [PATCH 2/2] bring back OMX nodes
users may use legacy kernel without `ION` / `DMABUF_HEAP` enabled,
enable OMX nodes to support this.
---
media/libstagefright/omx/Android.bp | 1 -
media/libstagefright/omx/OMXStore.cpp | 1 -
services/mediacodec/Android.bp | 25 +++++++++++++++++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/media/libstagefright/omx/Android.bp b/media/libstagefright/omx/Android.bp
index 630817c..23d1b1a 100644
--- a/media/libstagefright/omx/Android.bp
+++ b/media/libstagefright/omx/Android.bp
@@ -183,7 +183,6 @@ cc_defaults {
name: "libstagefright_softomx-defaults",
// TODO (b/316432618) Software OMX codecs are no longer used, disable building them till
// this code is removed completely.
- enabled: false,
vendor_available: true,
cflags: [
diff --git a/media/libstagefright/omx/OMXStore.cpp b/media/libstagefright/omx/OMXStore.cpp
index b2d5a70..3be56c8 100644
--- a/media/libstagefright/omx/OMXStore.cpp
+++ b/media/libstagefright/omx/OMXStore.cpp
@@ -161,7 +161,6 @@ void OMXStore::addPlugin(OMXPluginBase *plugin) {
}
}
if (skip) {
- continue;
}
}
diff --git a/services/mediacodec/Android.bp b/services/mediacodec/Android.bp
index 506b3bc..a2f17c2 100644
--- a/services/mediacodec/Android.bp
+++ b/services/mediacodec/Android.bp
@@ -95,6 +95,31 @@ cc_binary {
"android.hidl.memory@1.0",
],
+ runtime_libs: [
+ "libstagefright_soft_aacdec",
+ "libstagefright_soft_aacenc",
+ "libstagefright_soft_amrdec",
+ "libstagefright_soft_amrnbenc",
+ "libstagefright_soft_amrwbenc",
+ "libstagefright_soft_avcdec",
+ "libstagefright_soft_avcenc",
+ "libstagefright_soft_flacdec",
+ "libstagefright_soft_flacenc",
+ "libstagefright_soft_g711dec",
+ "libstagefright_soft_gsmdec",
+ "libstagefright_soft_hevcdec",
+ "libstagefright_soft_mp3dec",
+ "libstagefright_soft_mpeg2dec",
+ "libstagefright_soft_mpeg4dec",
+ "libstagefright_soft_mpeg4enc",
+ "libstagefright_soft_opusdec",
+ "libstagefright_soft_rawdec",
+ "libstagefright_soft_vorbisdec",
+ "libstagefright_soft_vpxdec",
+ "libstagefright_soft_vpxenc",
+ "libstagefright_softomx_plugin",
+ ],
+
// OMX interfaces force this to stay in 32-bit mode;
compile_multilib: "32",
--
2.45.1