radeonsi/vcn : update enc->dpb ref_use for index 0

Currently dpb_enc referneces not updated properly when index 0, as
we are skipping clearing that ref.

This patch will fix this for index 0. So that when ever we set
non_referenced flag, that is not used as ref and not pushed to DPB.
This is helping in SVC encoding.

Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16745>
This commit is contained in:
SureshGuttula 2022-05-27 16:30:52 +05:30 committed by Marge Bot
parent 09caa8902c
commit 77a6feff89
1 changed files with 1 additions and 1 deletions

View File

@ -1348,7 +1348,7 @@ static int get_picture_storage(struct radeon_encoder *enc)
oldest_idx = i;
}
if (oldest_idx > 0)
if (oldest_idx >= 0)
enc->dpb[oldest_idx].in_use = FALSE;
return oldest_idx;