Re: [PATCH v2 2/3] media: qcom: iris: venc: detect scaling against the visible resolution
From: bod
Date: Mon Nov 30 2026 - 07:29:27 EST
On 2026-11-17 11:46 +0100, Loic Poulain wrote:
> iris_venc_s_fmt_output() decides whether the session scales by comparing
> the requested coded size against inst->fmt_src, the padded buffer
> geometry, while enc_scale_* is relative to the visible resolution in
> enc_raw_*. A 1280x720 session that sets the same 1280x720 on the CAPTURE
> queue is therefore taken for a 736 -> 720 downscale.
>
> Compare against enc_raw_* instead. iris_venc_s_fmt_input() has to seed
> fmt_dst from the visible size too, otherwise the internal S_FMT it issues
> on the CAPTURE queue hits the same mismatch. The encoder does not use
> fmt_dst for stride programming.
>
> Seeding fmt_dst from the visible size also means the codec alignment has
> to be applied on every path and not only when scaling, so that the
> CAPTURE queue keeps reporting the coded size. For 1920x1080 that is 1088,
> and the firmware signals the visible 1080 with SPS frame cropping.
>
> Fixes: d9967fa37ca9 ("media: qcom: iris: Improve format alignment for encoder")
> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
---
bod