* rocDecode/HEVC: Fixed a few issues in reference list setup. Also looks like we need to use VA surface IDs on all buffers including the reference (need to confirm with VA driver team). (#61)

[ROCm/rocdecode commit: 3357aba104]
이 커밋은 다음에 포함됨:
jeffqjiangNew
2023-11-14 11:42:13 -05:00
커밋한 사람 GitHub
부모 64441167c4
커밋 9d9ac34a91
2개의 변경된 파일과 26개의 추가작업 그리고 21개의 파일을 삭제
+21 -21
파일 보기
@@ -337,7 +337,7 @@ int HEVCVideoParser::SendPicForDecode() {
}
for (i = ref_idx; i < 15; i++) {
pic_param_ptr->ref_frames[ref_idx].PicIdx = 0xFF;
pic_param_ptr->ref_frames[i].PicIdx = 0xFF;
}
pic_param_ptr->picture_width_in_luma_samples = sps_ptr->pic_width_in_luma_samples;
@@ -432,34 +432,34 @@ int HEVCVideoParser::SendPicForDecode() {
// Ref lists
memset(slice_params_ptr->RefPicList, 0xFF, sizeof(slice_params_ptr->RefPicList));
for (i = 0; i < m_sh_->num_ref_idx_l0_active_minus1; i++) {
for (i = 0; i <= m_sh_->num_ref_idx_l0_active_minus1; i++) {
int idx = ref_pic_list_0_[i]; // pic_idx of the ref pic
for (j = 0; j < 15; j++) {
if (pic_param_ptr->ref_frames[ref_idx].PicIdx == idx) {
if (pic_param_ptr->ref_frames[j].PicIdx == idx) {
break;
}
}
if (j == 15) {
ERR("Could not find matching pic in ref_frames list.");
}
else {
slice_params_ptr->RefPicList[0][i] = j;
}
}
if (m_sh_->slice_type == HEVC_SLICE_TYPE_B) {
for (i = 0; i <= m_sh_->num_ref_idx_l1_active_minus1; i++) {
int idx = ref_pic_list_1_[i]; // pic_idx of the ref pic
for (j = 0; j < 15; j++) {
if (pic_param_ptr->ref_frames[j].PicIdx == idx) {
break;
}
}
if (j == 15) {
ERR("Could not find matching pic in ref_frames list.");
}
else {
slice_params_ptr->RefPicList[0][i] = j;
}
}
}
if (m_sh_->slice_type == HEVC_SLICE_TYPE_B) {
for (i = 0; i < m_sh_->num_ref_idx_l1_active_minus1; i++) {
int idx = ref_pic_list_1_[i]; // pic_idx of the ref pic
for (j = 0; j < 15; j++) {
if (pic_param_ptr->ref_frames[ref_idx].PicIdx == idx) {
break;
}
if (j == 15) {
ERR("Could not find matching pic in ref_frames list.");
}
else {
slice_params_ptr->RefPicList[1][i] = j;
}
slice_params_ptr->RefPicList[1][i] = j;
}
}
}