]> 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)
commit2c83853b629172fdaba203c26681851ddc0b9635
tree03cd0131ce587ae7c7a97f3bab9acc33026dc541
parenta702808d19c6beebda9a3b84348709d7fc60e2f6
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