media: hantro: jpeg: Add JFIF APP0 segment to JPEG encoder output
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 7 Jan 2022 09:34:51 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 12:24:11 +0000 (13:24 +0100)
commite90410d1304e93c74ac4f87338f665e44129a79c
tree5368ab3de935f91d9a73b306d77b0ef605d040c7
parent0ce575d432910374f7abd4748da0a1f5483c15ec
media: hantro: jpeg: Add JFIF APP0 segment to JPEG encoder output

While the V4L2_PIX_FMT_JPEG format doesn't specify any requirements for
the APP0 or APP1 segments, it would be nice if the output is JFIF
compliant. While some programs can read JPEG streams that aren't, some
guess work is involved.

Add the standard JFIF APP0 segment to the JPEG header, so that the JPEG
encoder output is JFIF compliant.

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