radeon/vcn: fix mpeg4 msg buffer settings

Submitted by Zhang, Boyuan on May 3, 2018, 9:29 p.m.

Details

Message ID 1525382951-18923-1-git-send-email-boyuan.zhang@amd.com
State New
Headers show
Series "radeon/vcn: fix mpeg4 msg buffer settings" ( rev: 3 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan May 3, 2018, 9:29 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

Previous bit-fields assignments are incorrect and will result certain mpeg4
decode failed due to wrong flag values. This patch fixes these assignments.

Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
---
 src/gallium/drivers/radeon/radeon_vcn_dec.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c
index f83e9e5..4bc922d 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_dec.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c
@@ -554,15 +554,15 @@  static rvcn_dec_message_mpeg4_asp_vld_t get_mpeg4_msg(struct radeon_decoder *dec
 
 	result.vop_time_increment_resolution = pic->vop_time_increment_resolution;
 
-	result.short_video_header |= pic->short_video_header << 0;
-	result.interlaced |= pic->interlaced << 2;
-        result.load_intra_quant_mat |= 1 << 3;
-	result.load_nonintra_quant_mat |= 1 << 4;
-	result.quarter_sample |= pic->quarter_sample << 5;
-	result.complexity_estimation_disable |= 1 << 6;
-	result.resync_marker_disable |= pic->resync_marker_disable << 7;
-	result.newpred_enable |= 0 << 10; //
-	result.reduced_resolution_vop_enable |= 0 << 11;
+	result.short_video_header = pic->short_video_header;
+	result.interlaced = pic->interlaced;
+	result.load_intra_quant_mat = 1;
+	result.load_nonintra_quant_mat = 1;
+	result.quarter_sample = pic->quarter_sample;
+	result.complexity_estimation_disable = 1;
+	result.resync_marker_disable = pic->resync_marker_disable;
+	result.newpred_enable = 0;
+	result.reduced_resolution_vop_enable = 0;
 
 	result.quant_type = pic->quant_type;
 

Comments

Am 03.05.2018 um 23:29 schrieb boyuan.zhang@amd.com:
> From: Boyuan Zhang <boyuan.zhang@amd.com>
>
> Previous bit-fields assignments are incorrect and will result certain mpeg4
> decode failed due to wrong flag values. This patch fixes these assignments.
>
> Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
>
> Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
> Reviewed-by: Leo Liu <leo.liu@amd.com>

Reviewed-by: Christian K├Ânig <christian.koenig@amd.com> as well.

> ---
>   src/gallium/drivers/radeon/radeon_vcn_dec.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/radeon_vcn_dec.c
> index f83e9e5..4bc922d 100644
> --- a/src/gallium/drivers/radeon/radeon_vcn_dec.c
> +++ b/src/gallium/drivers/radeon/radeon_vcn_dec.c
> @@ -554,15 +554,15 @@ static rvcn_dec_message_mpeg4_asp_vld_t get_mpeg4_msg(struct radeon_decoder *dec
>   
>   	result.vop_time_increment_resolution = pic->vop_time_increment_resolution;
>   
> -	result.short_video_header |= pic->short_video_header << 0;
> -	result.interlaced |= pic->interlaced << 2;
> -        result.load_intra_quant_mat |= 1 << 3;
> -	result.load_nonintra_quant_mat |= 1 << 4;
> -	result.quarter_sample |= pic->quarter_sample << 5;
> -	result.complexity_estimation_disable |= 1 << 6;
> -	result.resync_marker_disable |= pic->resync_marker_disable << 7;
> -	result.newpred_enable |= 0 << 10; //
> -	result.reduced_resolution_vop_enable |= 0 << 11;
> +	result.short_video_header = pic->short_video_header;
> +	result.interlaced = pic->interlaced;
> +	result.load_intra_quant_mat = 1;
> +	result.load_nonintra_quant_mat = 1;
> +	result.quarter_sample = pic->quarter_sample;
> +	result.complexity_estimation_disable = 1;
> +	result.resync_marker_disable = pic->resync_marker_disable;
> +	result.newpred_enable = 0;
> +	result.reduced_resolution_vop_enable = 0;
>   
>   	result.quant_type = pic->quant_type;
>