Re: [PATCH] media: rkvdec: hevc: cap EXT SPS RPS control counts before descriptor assembly

From: Michael Bommarito

Date: Wed May 20 2026 - 21:00:35 EST


On Tue, May 19, 2026 at 9:04 AM Detlev Casanova
<detlev.casanova@xxxxxxxxxxxxx> wrote:
> Still, did you try just changing the cap to 64 (.cfg.dims = { 64 },) ?
> You'd need a test that sets the control from userspace though.
>
> It should refuse setting the control if there are more than 64 elements,
> therefore the hevc decoder will not run any function using the count
> values from the SPS (See rkvdec-vdpu381-hevc.c:601)

Sure, I can test that and send a v2 for ST. My understanding is that
we have four spots we need to check across the flow though:

1. ST count > 64
2. LT count > 32
3. num_negative_pics / num_positive_pics > 16
4. delta_idx_minus1 + 1 > i

So would you also want the same .cfg approach for the LT cap?

Thanks,
Mike