diff options
author | Ruijing Dong <ruijing.dong@amd.com> | 2022-01-10 16:26:03 -0500 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-01-12 20:16:50 +0000 |
commit | 50d4e44fa4906ad48008a4191c03d1deda582b41 (patch) | |
tree | 8bbca11de34839960ee316c70bb0c13a5c36528e /src/gallium/drivers/radeon | |
parent | be28a475c7b2e835f7dcff747c4fb6f16fb1434e (diff) |
radeon/vcn: enable dynamic dpb Tier2 for hevc dec vaapi path
keep omx hevc decoding using the current mode, set dpb Tier2 for
vaapi hevc decoding mode as default.
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14484>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_vcn_dec.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c index f80758bc756..a119eef9628 100644 --- a/src/gallium/drivers/radeon/radeon_vcn_dec.c +++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c @@ -460,6 +460,14 @@ static rvcn_dec_message_hevc_t get_h265_msg(struct radeon_decoder *dec, } } + if (dec->dpb_type == DPB_DYNAMIC_TIER_2) { + dec->ref_codec.bts = (pic->base.profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) ? + CODEC_10_BITS : CODEC_8_BITS; + dec->ref_codec.index = result.curr_idx; + dec->ref_codec.ref_size = 15; + memset(dec->ref_codec.ref_list, 0x7f, sizeof(dec->ref_codec.ref_list)); + memcpy(dec->ref_codec.ref_list, result.ref_pic_list, sizeof(result.ref_pic_list)); + } return result; } @@ -2563,7 +2571,9 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context, } if (sctx->family >= CHIP_SIENNA_CICHLID && - (stream_type == RDECODE_CODEC_VP9 || stream_type == RDECODE_CODEC_AV1 || + (stream_type == RDECODE_CODEC_VP9 || + stream_type == RDECODE_CODEC_AV1 || + ((stream_type == RDECODE_CODEC_H265) && templ->expect_chunked_decode) || ((stream_type == RDECODE_CODEC_H264_PERF) && templ->expect_chunked_decode))) dec->dpb_type = DPB_DYNAMIC_TIER_2; else if (sctx->family <= CHIP_NAVI14 && stream_type == RDECODE_CODEC_VP9) |