]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: jpeg: Add COM segment to JPEG header to align image scan
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 7 Jan 2022 09:34:52 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 12:24:47 +0000 (13:24 +0100)
commit4447aaf8e025b3811d11ce2ff1131c5b59e065f1
tree03cd0131ce587ae7c7a97f3bab9acc33026dc541
parent29663f2008b841db0d06680df5ee6630cd490c69
media: hantro: jpeg: Add COM segment to JPEG header to align image scan

The JPEG header size is not 64-bit aligned. This makes the driver
require a bounce buffer for the encoded JPEG image scan output.

Add a COM (comment) segment to the JPEG header so that the header size
is a multiple of 64 bits. This will then allow dropping the use of the
bounce buffer, and instead have the hardware write out to the capture
buffer directly.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_jpeg.c
drivers/staging/media/hantro/hantro_jpeg.h