mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
radeonsi/vcn: Fix decode target index for H264 interlaced streams
With H264 the target surface can also be in the reference list for
current frame, so it can only be inserted into the DPB list after
iterating over all references.
Fixes: 0e68a2655f ("radeonsi/vcn: Rework decode ref handling")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34527>
This commit is contained in:
parent
bde3ab4cd3
commit
b0b52d4922
1 changed files with 11 additions and 4 deletions
|
|
@ -155,11 +155,18 @@ static rvcn_dec_message_avc_t get_h264_msg(struct radeon_decoder *dec,
|
|||
if (!found)
|
||||
dec->render_pic_list[i] = NULL;
|
||||
}
|
||||
if (dec->render_pic_list[i] == target) {
|
||||
result.decoded_pic_idx = i;
|
||||
} else if (result.decoded_pic_idx == 0xff && !dec->render_pic_list[i]) {
|
||||
dec->render_pic_list[i] = target;
|
||||
if (dec->render_pic_list[i] == target)
|
||||
result.decoded_pic_idx = i;
|
||||
}
|
||||
|
||||
/* Target surface can also be a reference (other field) */
|
||||
if (result.decoded_pic_idx == 0xff) {
|
||||
for (i = 0; i < ARRAY_SIZE(pic->ref) + 1; i++) {
|
||||
if (!dec->render_pic_list[i]) {
|
||||
dec->render_pic_list[i] = target;
|
||||
result.decoded_pic_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue