diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-07-11 09:36:39 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-22 15:13:08 (GMT) |
commit | 451dfe5d85cc5f5c6cb196dc9ebae4458a59dc21 (patch) | |
tree | aacd99ef7f8a878090a255ac3d3110baac0e91a7 | |
parent | 7c3df78953ca62c0713eae3d6b7cbc55b58cd9d5 (diff) | |
download | linux-451dfe5d85cc5f5c6cb196dc9ebae4458a59dc21.tar.xz |
[media] coda: increase frame stride to 16 for h.264
When encoding into h.264, the input frame stride needs to be a multiple of 16.
During allocation of the input buffers, it may not be known yet whether the
encoder should create h.264 or not. Assume the worst and always use a frame
stride that is a multiple of 16.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/platform/coda.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index aa80020..5ec6819 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -685,8 +685,8 @@ static int coda_try_fmt(struct coda_ctx *ctx, struct coda_codec *codec, switch (f->fmt.pix.pixelformat) { case V4L2_PIX_FMT_YUV420: case V4L2_PIX_FMT_YVU420: - /* Frame stride must be multiple of 8 */ - f->fmt.pix.bytesperline = round_up(f->fmt.pix.width, 8); + /* Frame stride must be multiple of 8, but 16 for h.264 */ + f->fmt.pix.bytesperline = round_up(f->fmt.pix.width, 16); f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * f->fmt.pix.height * 3 / 2; break; |