mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 14:25:25 +00:00
media: venus: Correct P010 buffer alignment
According to msm_media_info.h the correct alignment for the stride of P010 buffers is 128. Signed-off-by: Fritz Koenig <frkoenig@chromium.org> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
7493db46e4
commit
a47a3ae5fc
@ -988,8 +988,8 @@ static u32 get_framesize_raw_p010(u32 width, u32 height)
|
||||
{
|
||||
u32 y_plane, uv_plane, y_stride, uv_stride, y_sclines, uv_sclines;
|
||||
|
||||
y_stride = ALIGN(width * 2, 256);
|
||||
uv_stride = ALIGN(width * 2, 256);
|
||||
y_stride = ALIGN(width * 2, 128);
|
||||
uv_stride = ALIGN(width * 2, 128);
|
||||
y_sclines = ALIGN(height, 32);
|
||||
uv_sclines = ALIGN((height + 1) >> 1, 16);
|
||||
y_plane = y_stride * y_sclines;
|
||||
|
@ -204,8 +204,13 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
|
||||
pixmp->height);
|
||||
|
||||
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
|
||||
unsigned int stride = pixmp->width;
|
||||
|
||||
if (pixmp->pixelformat == V4L2_PIX_FMT_P010)
|
||||
stride *= 2;
|
||||
|
||||
pfmt[0].sizeimage = szimage;
|
||||
pfmt[0].bytesperline = ALIGN(pixmp->width, 128);
|
||||
pfmt[0].bytesperline = ALIGN(stride, 128);
|
||||
} else {
|
||||
pfmt[0].sizeimage = clamp_t(u32, pfmt[0].sizeimage, 0, SZ_8M);
|
||||
pfmt[0].sizeimage = max(pfmt[0].sizeimage, szimage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user