]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita702808d19c6beebda9a3b84348709d7fc60e2f6
tree5368ab3de935f91d9a73b306d77b0ef605d040c7
parent0a996ef90470682bdb2a9b4f406ff4dba5a56261
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