Files
LibreELEC.tv/projects/Amlogic/devices/AMLGX/patches/linux/amlogic-0010-LOCAL-media-meson-vdec-disable-MPEG1-MPEG2-hardware-.patch
2025-05-29 11:45:36 +00:00

198 lines
6.1 KiB
Diff

From 7af076b7917e31ab222f7a0881ff43aba1fe8354 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Thu, 5 Jan 2023 15:16:46 +0000
Subject: [PATCH 10/50] LOCAL: media: meson: vdec: disable MPEG1/MPEG2 hardware
decoding
The MPEG1/2 decoder is broken and nobody has volunteered to poke
code and fix it. As media is mostly SD (and never over 1080p)
resolution most boards can software decode it. So lets disable
hardware decoding for now.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
.../staging/media/meson/vdec/vdec_platform.c | 132 ------------------
1 file changed, 132 deletions(-)
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
index 66bb307db85a..8a7e5b3f5d00 100644
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
@@ -26,28 +26,6 @@ static const struct amvdec_format vdec_formats_gxbb[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
@@ -76,28 +54,6 @@ static const struct amvdec_format vdec_formats_gxl[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
@@ -114,28 +70,6 @@ static const struct amvdec_format vdec_formats_gxlx[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
@@ -164,28 +98,6 @@ static const struct amvdec_format vdec_formats_gxm[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
@@ -214,28 +126,6 @@ static const struct amvdec_format vdec_formats_g12a[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
@@ -264,28 +154,6 @@ static const struct amvdec_format vdec_formats_sm1[] = {
.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
.flags = V4L2_FMT_FLAG_COMPRESSED |
V4L2_FMT_FLAG_DYN_RESOLUTION,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG1,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
- }, {
- .pixfmt = V4L2_PIX_FMT_MPEG2,
- .min_buffers = 8,
- .max_buffers = 8,
- .max_width = 1920,
- .max_height = 1080,
- .vdec_ops = &vdec_1_ops,
- .codec_ops = &codec_mpeg12_ops,
- .firmware_path = "meson/vdec/gxl_mpeg12.bin",
- .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
- .flags = V4L2_FMT_FLAG_COMPRESSED,
},
};
--
2.34.1