summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2010-07-05 10:09:54 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2010-07-07 14:54:48 +0800
commitdaf6ed6fd33ad68154a6ea58330f50ffef0a3e69 (patch)
treec54df5f78ba98d75102a9836600733a369249014
parent40ff5b2aa3eadf620753b3ae004b30bc55b40e92 (diff)
i965_drv_video: [H.264] fix the start of a slice for a MBAFF picture
-rw-r--r--i965_drv_video/i965_avc_bsd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/i965_drv_video/i965_avc_bsd.c b/i965_drv_video/i965_avc_bsd.c
index 4bad64f..5cc0cec 100644
--- a/i965_drv_video/i965_avc_bsd.c
+++ b/i965_drv_video/i965_avc_bsd.c
@@ -629,11 +629,9 @@ g4x_avc_bsd_object(VADriverContextP ctx,
else if (slice_type == SLICE_TYPE_B)
weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc;
- first_mb_in_slice = slice_param->first_mb_in_slice;
+ first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
slice_hor_pos = first_mb_in_slice % width_in_mbs;
slice_ver_pos = first_mb_in_slice / width_in_mbs;
- first_mb_in_slice = (slice_ver_pos << mbaff_picture) * width_in_mbs + slice_hor_pos;
- slice_hor_pos <<= mbaff_picture;
BEGIN_BCS_BATCH(ctx, cmd_len);
OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (cmd_len - 2));
@@ -755,11 +753,9 @@ ironlake_avc_bsd_object(VADriverContextP ctx,
else if (slice_type == SLICE_TYPE_B)
weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc;
- first_mb_in_slice = slice_param->first_mb_in_slice;
+ first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
slice_hor_pos = first_mb_in_slice % width_in_mbs;
slice_ver_pos = first_mb_in_slice / width_in_mbs;
- first_mb_in_slice = (slice_ver_pos << mbaff_picture) * width_in_mbs + slice_hor_pos;
- slice_hor_pos <<= mbaff_picture;
BEGIN_BCS_BATCH(ctx, 16);
OUT_BCS_BATCH(ctx, CMD_AVC_BSD_OBJECT | (16 - 2));