mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
frontends/va: Fix finding LTRs from POCs in HEVC decode
This should only consider valid entries, not loop over the entire array.
In addition the array size was wrong before.
Fixes: 779edc0759 ("frontends/va: Correctly derive HEVC StCurrBefore, StCurrAfter and LtCurr")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41016>
This commit is contained in:
parent
630a4d2249
commit
c2a4fa33b8
1 changed files with 3 additions and 1 deletions
|
|
@ -420,7 +420,9 @@ void vlVaDecoderHEVCBitstreamHeader(vlVaContext *context, vlVaBuffer *buf)
|
|||
/* We know the POCs for all LTRs from slice header, fill the LTR ref pic
|
||||
* set with them. */
|
||||
for (uint8_t i = 0; i < ltr_idx; i++) {
|
||||
for (uint8_t j = 0; j < sizeof(pic->PicOrderCntVal); ++j) {
|
||||
for (uint8_t j = 0; j < 15; ++j) {
|
||||
if (!pic->ref[j])
|
||||
continue;
|
||||
uint32_t refpoc = pic->PicOrderCntVal[j];
|
||||
if ((ltr_tmp[i].msb && ltr_tmp[i].poc == refpoc) ||
|
||||
(!ltr_tmp[i].msb && ltr_tmp[i].poc == refpoc % max_poc)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue