linux/drivers/media/platform/mediatek/jpeg
Fei Shao 0aeccc63f3 media: mtk-jpegenc: Fix bug in JPEG encode quality selection
The driver uses the upper-bound approach to decide the target JPEG
encode quality, but there's a logic bug that if the desired quality is
higher than what the driver can support, the driver falls back to using
the worst quality.

Fix the bug by assuming using the best quality in the beginning, and
with trivial refactor to avoid long lines.

Fixes: 45f13a57d8 ("media: platform: Add jpeg enc feature")
Signed-off-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-10-07 10:55:45 +02:00
..
Kconfig
Makefile media: mtk-jpegdec: support jpegdec multi-hardware 2022-09-30 16:39:29 +02:00
mtk_jpeg_core.c media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
mtk_jpeg_core.h media: mtk-jpeg: refactor hw dev initializaiton 2023-04-10 13:12:26 +01:00
mtk_jpeg_dec_hw.c media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
mtk_jpeg_dec_hw.h media: mtk-jpegdec: refactor jpegdec func interface 2022-09-30 16:39:29 +02:00
mtk_jpeg_dec_parse.c media: Add common header file with JPEG marker definitions 2023-05-25 16:21:21 +02:00
mtk_jpeg_dec_parse.h
mtk_jpeg_dec_reg.h media: mtk-jpegdec: refactor jpegdec func interface 2022-09-30 16:39:29 +02:00
mtk_jpeg_enc_hw.c media: mtk-jpegenc: Fix bug in JPEG encode quality selection 2023-10-07 10:55:45 +02:00
mtk_jpeg_enc_hw.h