hardware/intel/libva
修订版 | 21b718316b33522d1761fc3bb15b5cef31860bd9 (tree) |
---|---|
时间 | 2010-04-15 10:18:53 |
作者 | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
i965_drv_video: [H.264] fix for weight/offset state
@@ -263,18 +263,16 @@ i965_avc_bsd_slice_state(VADriverContextP ctx, | ||
263 | 263 | cmd_len += 16; |
264 | 264 | } |
265 | 265 | |
266 | - if (slice_param->luma_weight_l0_flag | slice_param->chroma_weight_l0_flag) { | |
266 | + if (pic_param->pic_fields.bits.weighted_pred_flag == 1 || | |
267 | + pic_param->pic_fields.bits.weighted_bipred_idc == 1) { | |
267 | 268 | present_flag |= PRESENT_WEIGHT_OFFSET_L0; |
268 | 269 | cmd_len += 48; |
269 | - assert((pic_param->pic_fields.bits.weighted_pred_flag == 1) || /* P slice */ | |
270 | - (pic_param->pic_fields.bits.weighted_bipred_idc == 1)); /* B slice */ | |
271 | 270 | } |
272 | 271 | |
273 | - if (slice_param->luma_weight_l1_flag | slice_param->chroma_weight_l1_flag) { | |
272 | + if (pic_param->pic_fields.bits.weighted_bipred_idc == 1) { | |
274 | 273 | present_flag |= PRESENT_WEIGHT_OFFSET_L1; |
275 | 274 | cmd_len += 48; |
276 | 275 | assert(slice_param->slice_type == SLICE_TYPE_B); |
277 | - assert(pic_param->pic_fields.bits.weighted_bipred_idc == 1); | |
278 | 276 | } |
279 | 277 | |
280 | 278 | BEGIN_BCS_BATCH(ctx, cmd_len); |