mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
media: coda: Simplify H.264 small buffer padding logic
The H.264 small buffer padding is done under the (ctx->qsequence == 0 && payload < 512) condition. Given this is the exact same condition immediately above, we can move it right there, making the code slightly clearer. This change shouldn't affect functionality as it's just cosmetics. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
f23e5f407f
commit
ba928bbd07
@ -293,12 +293,11 @@ static bool coda_bitstream_try_queue(struct coda_ctx *ctx,
|
||||
coda_dbg(1, ctx,
|
||||
"could not parse header, sequence initialization might fail\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Add padding before the first buffer, if it is too small */
|
||||
if (ctx->qsequence == 0 && payload < 512 &&
|
||||
ctx->codec->src_fourcc == V4L2_PIX_FMT_H264)
|
||||
coda_h264_bitstream_pad(ctx, 512 - payload);
|
||||
/* Add padding before the first buffer, if it is too small */
|
||||
if (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264)
|
||||
coda_h264_bitstream_pad(ctx, 512 - payload);
|
||||
}
|
||||
|
||||
ret = coda_bitstream_queue(ctx, vaddr, payload);
|
||||
if (ret < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user