[PATCH] media: mtk-jpegenc: Fix bug in JPEG encode quality selection

Chen-Yu Tsai wenst at chromium.org
Mon Sep 11 00:18:32 PDT 2023


On Fri, Sep 8, 2023 at 9:29 PM Fei Shao <fshao at chromium.org> wrote:
>
> 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: 45f13a57d813 ("media: platform: Add jpeg enc feature")
> Signed-off-by: Fei Shao <fshao at chromium.org>

Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>



More information about the linux-arm-kernel mailing list