Mesa (main): radeon/vcn: use st_rps_bits only when it's set
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 17:48:23 UTC 2021
Module: Mesa
Branch: main
Commit: c6da3827d031bf4d345d3048a149bcddd52a9a11
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6da3827d031bf4d345d3048a149bcddd52a9a11
Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date: Wed Jun 16 16:07:31 2021 -0400
radeon/vcn: use st_rps_bits only when it's set
Fixes: c9baccb5
For certain player which doesn't implement st_rps_bits, or when st_rps_bits
is set to 0 (e.g. it doesn't have rps explicitly defined in slice header),
we don't set st_rps_bits and the related flag, since we don't skip parsing
the rps structure in these cases.
Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11432>
---
src/gallium/drivers/radeon/radeon_vcn_dec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c
index 2fd61bf37e2..454b79800a7 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c
@@ -198,8 +198,10 @@ static rvcn_dec_message_hevc_t get_h265_msg(struct radeon_decoder *dec,
result.sps_info_flags |= 1 << 9;
if (pic->UseRefPicList == true)
result.sps_info_flags |= 1 << 10;
- if (pic->UseStRpsBits == true)
+ if (pic->UseStRpsBits == true && pic->pps->st_rps_bits != 0) {
result.sps_info_flags |= 1 << 11;
+ result.st_rps_bits = pic->pps->st_rps_bits;
+ }
result.chroma_format = pic->pps->sps->chroma_format_idc;
result.bit_depth_luma_minus8 = pic->pps->sps->bit_depth_luma_minus8;
@@ -259,7 +261,6 @@ static rvcn_dec_message_hevc_t get_h265_msg(struct radeon_decoder *dec,
result.num_tile_rows_minus1 = pic->pps->num_tile_rows_minus1;
result.log2_parallel_merge_level_minus2 = pic->pps->log2_parallel_merge_level_minus2;
result.init_qp_minus26 = pic->pps->init_qp_minus26;
- result.st_rps_bits = pic->pps->st_rps_bits;
for (i = 0; i < 19; ++i)
result.column_width_minus1[i] = pic->pps->column_width_minus1[i];
More information about the mesa-commit
mailing list