summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2010-11-09 13:02:49 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2010-12-06 12:50:04 +0800
commit7d46027c566a6bdbc678acca23a2d084214e143a (patch)
treefd3cc6181c7c109c55753a729e1d0bd6c985f367
parent2a000880e9b6aaa6314ff55e273eb85e3e0210c5 (diff)
i965_drv_video: fix weight/offset for H.264 decoding on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--i965_drv_video/gen6_mfd.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/i965_drv_video/gen6_mfd.c b/i965_drv_video/gen6_mfd.c
index c0852d2..039bff6 100644
--- a/i965_drv_video/gen6_mfd.c
+++ b/i965_drv_video/gen6_mfd.c
@@ -691,11 +691,11 @@ gen6_mfd_avc_slice_state(VADriverContextP ctx,
assert(slice_param->num_ref_idx_l1_active_minus1 == 0);
num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1;
num_ref_idx_l1 = 0;
- weighted_pred_idc = pic_param->pic_fields.bits.weighted_pred_flag;
+ weighted_pred_idc = (pic_param->pic_fields.bits.weighted_pred_flag == 1);
} else {
num_ref_idx_l0 = slice_param->num_ref_idx_l0_active_minus1 + 1;
num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1;
- weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc;
+ weighted_pred_idc = (pic_param->pic_fields.bits.weighted_bipred_idc == 1);
}
first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
@@ -870,21 +870,21 @@ gen6_mfd_avc_weightoffset_state(VADriverContextP ctx,
if (i == 0) {
for (j = 0; j < 32; j++) {
- weightoffsets[j * 6 + 0] = slice_param->luma_offset_l0[j];
- weightoffsets[j * 6 + 1] = slice_param->luma_weight_l0[j];
- weightoffsets[j * 6 + 2] = slice_param->chroma_offset_l0[j][0];
- weightoffsets[j * 6 + 3] = slice_param->chroma_weight_l0[j][0];
- weightoffsets[j * 6 + 4] = slice_param->chroma_offset_l0[j][1];
- weightoffsets[j * 6 + 5] = slice_param->chroma_weight_l0[j][1];
+ weightoffsets[j * 6 + 0] = slice_param->luma_weight_l0[j];
+ weightoffsets[j * 6 + 1] = slice_param->luma_offset_l0[j];
+ weightoffsets[j * 6 + 2] = slice_param->chroma_weight_l0[j][0];
+ weightoffsets[j * 6 + 3] = slice_param->chroma_offset_l0[j][0];
+ weightoffsets[j * 6 + 4] = slice_param->chroma_weight_l0[j][1];
+ weightoffsets[j * 6 + 5] = slice_param->chroma_offset_l0[j][1];
}
} else {
for (j = 0; j < 32; j++) {
- weightoffsets[j * 6 + 0] = slice_param->luma_offset_l1[j];
- weightoffsets[j * 6 + 1] = slice_param->luma_weight_l1[j];
- weightoffsets[j * 6 + 2] = slice_param->chroma_offset_l1[j][0];
- weightoffsets[j * 6 + 3] = slice_param->chroma_weight_l1[j][0];
- weightoffsets[j * 6 + 4] = slice_param->chroma_offset_l1[j][1];
- weightoffsets[j * 6 + 5] = slice_param->chroma_weight_l1[j][1];
+ weightoffsets[j * 6 + 0] = slice_param->luma_weight_l1[j];
+ weightoffsets[j * 6 + 1] = slice_param->luma_offset_l1[j];
+ weightoffsets[j * 6 + 2] = slice_param->chroma_weight_l1[j][0];
+ weightoffsets[j * 6 + 3] = slice_param->chroma_offset_l1[j][0];
+ weightoffsets[j * 6 + 4] = slice_param->chroma_weight_l1[j][1];
+ weightoffsets[j * 6 + 5] = slice_param->chroma_offset_l1[j][1];
}
}