[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200323130937.3666244-3-adrian.ratiu@collabora.com>
Date: Mon, 23 Mar 2020 15:09:37 +0200
From: Adrian Ratiu <adrian.ratiu@...labora.com>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Ezequiel Garcia <ezequiel@...labora.com>, kernel@...labora.com,
kernel@...gutronix.de, Tim Harvey <tharvey@...eworks.com>
Subject: [PATCH 2/2] media: coda: be more flexible wrt jpeg dimensions
Don't require jpeg dimensions to exactly match format dimensions,
so we are able to decode and display a wider range jpegs instead
of outright rejecting the ones which don't match.
This is useful in applications which pass jpegs with arbitrary
dimensions, where buffers can be reused to decode smaller jpegs
without having to do expensive renegotiations.
Signed-off-by: Adrian Ratiu <adrian.ratiu@...labora.com>
---
drivers/media/platform/coda/coda-jpeg.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/media/platform/coda/coda-jpeg.c b/drivers/media/platform/coda/coda-jpeg.c
index 162ba28a6b95..782a78dcaf4d 100644
--- a/drivers/media/platform/coda/coda-jpeg.c
+++ b/drivers/media/platform/coda/coda-jpeg.c
@@ -302,13 +302,6 @@ int coda_jpeg_decode_header(struct coda_ctx *ctx, struct vb2_buffer *vb)
}
q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
- if (header.frame.height != q_data_src->height ||
- header.frame.width != q_data_src->width) {
- v4l2_err(&dev->v4l2_dev,
- "dimensions don't match format: %dx%d\n",
- header.frame.width, header.frame.height);
- return -EINVAL;
- }
if (header.frame.num_components != 3) {
v4l2_err(&dev->v4l2_dev,
--
2.25.2
Powered by blists - more mailing lists