* Move Meson64 to 5.6.y * Move Meson64 U-boot to 2020.04 Tested on Odroid C2 * Merge, replace and update patches from Khadas branch
78 lines
2.6 KiB
Diff
78 lines
2.6 KiB
Diff
From 9ed0f54432f6ef39cd94245b8578b664bf3f3a98 Mon Sep 17 00:00:00 2001
|
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
Date: Wed, 4 Dec 2019 10:40:13 +0100
|
|
Subject: [PATCH 071/101] FROMLIST: media: meson: vdec: align stride on 32
|
|
bytes
|
|
|
|
The HEVC/VP9 aligns the plane stride on 32, so align the planes stride
|
|
for all codecs to 32 to satisfy HEVC/VP9 decoding using the "HEVC" HW.
|
|
|
|
This fixes VP9 decoding of streams with following (not limited) widths:
|
|
- 264
|
|
-288
|
|
- 350
|
|
- 352
|
|
- 472
|
|
- 480
|
|
- 528
|
|
- 600
|
|
- 720
|
|
- 800
|
|
- 848
|
|
- 1440
|
|
|
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
---
|
|
drivers/staging/media/meson/vdec/vdec.c | 10 +++++-----
|
|
drivers/staging/media/meson/vdec/vdec_helpers.c | 4 ++--
|
|
2 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
|
|
index 92f0258868b1..bfca4c82aa56 100644
|
|
--- a/drivers/staging/media/meson/vdec/vdec.c
|
|
+++ b/drivers/staging/media/meson/vdec/vdec.c
|
|
@@ -528,20 +528,20 @@ vdec_try_fmt_common(struct amvdec_session *sess, u32 size,
|
|
memset(pfmt[1].reserved, 0, sizeof(pfmt[1].reserved));
|
|
if (pixmp->pixelformat == V4L2_PIX_FMT_NV12M) {
|
|
pfmt[0].sizeimage = output_size;
|
|
- pfmt[0].bytesperline = ALIGN(pixmp->width, 64);
|
|
+ pfmt[0].bytesperline = ALIGN(pixmp->width, 32);
|
|
|
|
pfmt[1].sizeimage = output_size / 2;
|
|
- pfmt[1].bytesperline = ALIGN(pixmp->width, 64);
|
|
+ pfmt[1].bytesperline = ALIGN(pixmp->width, 32);
|
|
pixmp->num_planes = 2;
|
|
} else if (pixmp->pixelformat == V4L2_PIX_FMT_YUV420M) {
|
|
pfmt[0].sizeimage = output_size;
|
|
- pfmt[0].bytesperline = ALIGN(pixmp->width, 64);
|
|
+ pfmt[0].bytesperline = ALIGN(pixmp->width, 32);
|
|
|
|
pfmt[1].sizeimage = output_size / 4;
|
|
- pfmt[1].bytesperline = ALIGN(pixmp->width, 64) / 2;
|
|
+ pfmt[1].bytesperline = ALIGN(pixmp->width, 32) / 2;
|
|
|
|
pfmt[2].sizeimage = output_size / 2;
|
|
- pfmt[2].bytesperline = ALIGN(pixmp->width, 64) / 2;
|
|
+ pfmt[2].bytesperline = ALIGN(pixmp->width, 32) / 2;
|
|
pixmp->num_planes = 3;
|
|
}
|
|
}
|
|
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
|
index a4970ec1bf2e..3f7929c54dc6 100644
|
|
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
|
|
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
|
@@ -154,8 +154,8 @@ int amvdec_set_canvases(struct amvdec_session *sess,
|
|
{
|
|
struct v4l2_m2m_buffer *buf;
|
|
u32 pixfmt = sess->pixfmt_cap;
|
|
- u32 width = ALIGN(sess->width, 64);
|
|
- u32 height = ALIGN(sess->height, 64);
|
|
+ u32 width = ALIGN(sess->width, 32);
|
|
+ u32 height = ALIGN(sess->height, 32);
|
|
u32 reg_cur = reg_base[0];
|
|
u32 reg_num_cur = 0;
|
|
u32 reg_base_cur = 0;
|
|
--
|
|
2.17.1
|
|
|