From: Neil Armstrong <narmstrong@baylibre.com>
To: mchehab@kernel.org, hans.verkuil@cisco.com
Cc: Neil Armstrong <narmstrong@baylibre.com>,
linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] media: meson: vdec: align stride on 32 bytes
Date: Thu, 5 Dec 2019 10:24:50 +0100 [thread overview]
Message-ID: <20191205092454.26075-2-narmstrong@baylibre.com> (raw)
In-Reply-To: <20191205092454.26075-1-narmstrong@baylibre.com>
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 f03d9eba6e23..bd59d32b92ae 100644
--- a/drivers/staging/media/meson/vdec/vdec.c
+++ b/drivers/staging/media/meson/vdec/vdec.c
@@ -525,20 +525,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 ff4333074197..fc59d8801643 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.22.0
next prev parent reply other threads:[~2019-12-05 9:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 9:24 [PATCH 0/5] media: meson: vdec: Add VP9 decoding support Neil Armstrong
2019-12-05 9:24 ` Neil Armstrong [this message]
2019-12-05 9:24 ` [PATCH 2/5] media: meson: vdec: add helpers for lossless framebuffer compression buffers Neil Armstrong
2019-12-05 9:24 ` [PATCH 3/5] media: meson: vdec: add common HEVC decoder support Neil Armstrong
2019-12-05 9:26 ` [PATCH 4/5] media: meson: vdec: add VP9 input support Neil Armstrong
2019-12-05 18:40 ` Nicolas Dufresne
2019-12-13 9:06 ` Neil Armstrong
2019-12-05 9:26 ` [PATCH 5/5] media: meson: vdec: add VP9 decoder support Neil Armstrong
2019-12-05 15:42 ` [PATCH 0/5] media: meson: vdec: Add VP9 decoding support Nicolas Dufresne
2019-12-05 15:49 ` Neil Armstrong
2019-12-05 18:46 ` Nicolas Dufresne
2019-12-13 9:12 ` Neil Armstrong
2019-12-13 19:03 ` Nicolas Dufresne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191205092454.26075-2-narmstrong@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).