From 21b718316b33522d1761fc3bb15b5cef31860bd9 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Thu, 15 Apr 2010 09:18:53 +0800 Subject: [PATCH] i965_drv_video: [H.264] fix for weight/offset state --- i965_drv_video/i965_avc_bsd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c index 3017bb2..157bf16 100644 --- a/i965_drv_video/i965_avc_bsd.c +++ b/i965_drv_video/i965_avc_bsd.c @@ -263,18 +263,16 @@ i965_avc_bsd_slice_state(VADriverContextP ctx, cmd_len += 16; } - if (slice_param->luma_weight_l0_flag | slice_param->chroma_weight_l0_flag) { + if (pic_param->pic_fields.bits.weighted_pred_flag == 1 || + pic_param->pic_fields.bits.weighted_bipred_idc == 1) { present_flag |= PRESENT_WEIGHT_OFFSET_L0; cmd_len += 48; - assert((pic_param->pic_fields.bits.weighted_pred_flag == 1) || /* P slice */ - (pic_param->pic_fields.bits.weighted_bipred_idc == 1)); /* B slice */ } - if (slice_param->luma_weight_l1_flag | slice_param->chroma_weight_l1_flag) { + if (pic_param->pic_fields.bits.weighted_bipred_idc == 1) { present_flag |= PRESENT_WEIGHT_OFFSET_L1; cmd_len += 48; assert(slice_param->slice_type == SLICE_TYPE_B); - assert(pic_param->pic_fields.bits.weighted_bipred_idc == 1); } BEGIN_BCS_BATCH(ctx, cmd_len); -- 2.7.4