frontend/va: add support for multi slices reflist

According to codec spec, hevc supports different reference picture lists
for multi slices case. For example, each slice can have it's own ref pic
list. Add this support to pipe, and modify both frontend/va and radeonsi
accordingly.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26081>
This commit is contained in:
Boyuan Zhang 2023-11-06 13:29:57 -05:00
parent 26237b9807
commit ffdc83e9dd
4 changed files with 5 additions and 5 deletions

View file

@ -733,7 +733,7 @@ static struct ruvd_h265 get_h265_msg(struct ruvd_decoder *dec, struct pipe_video
for (i = 0; i < 2; i++) {
for (j = 0; j < 15; j++)
result.direct_reflist[i][j] = pic->RefPicList[i][j];
result.direct_reflist[i][j] = pic->RefPicList[0][i][j];
}
if (pic->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) {

View file

@ -446,7 +446,7 @@ static rvcn_dec_message_hevc_t get_h265_msg(struct radeon_decoder *dec,
for (i = 0; i < 2; i++) {
for (j = 0; j < 15; j++)
result.direct_reflist[i][j] = pic->RefPicList[i][j];
result.direct_reflist[i][j] = pic->RefPicList[0][i][j];
}
if (pic->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) {

View file

@ -233,11 +233,11 @@ void vlVaHandleSliceParameterBufferHEVC(vlVaContext *context, vlVaBuffer *buf)
/* Depending on slice_type, only update relevant reference */
case 0: /* HEVC_SLICE_B */
for (int j = 0 ; j < 15 ; j++)
context->desc.h265.RefPicList[1][j] = h265->RefPicList[1][j];
context->desc.h265.RefPicList[context->desc.h265.slice_parameter.slice_count][1][j] = h265->RefPicList[1][j];
FALLTHROUGH;
case 1: /* HEVC_SLICE_P */
for (int j = 0 ; j < 15 ; j++)
context->desc.h265.RefPicList[0][j] = h265->RefPicList[0][j];
context->desc.h265.RefPicList[context->desc.h265.slice_parameter.slice_count][0][j] = h265->RefPicList[0][j];
FALLTHROUGH;
default:
break;

View file

@ -1160,7 +1160,7 @@ struct pipe_h265_picture_desc
uint8_t RefPicSetStCurrBefore[8];
uint8_t RefPicSetStCurrAfter[8];
uint8_t RefPicSetLtCurr[8];
uint8_t RefPicList[2][15];
uint8_t RefPicList[PIPE_H265_MAX_SLICES][2][15];
bool UseRefPicList;
bool UseStRpsBits;