summaryrefslogtreecommitdiff
path: root/src/gen6_mfd.c
diff options
context:
space:
mode:
authorLi, Xiaowei A <xiaowei.a.li@intel.com>2012-12-12 09:16:25 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-12-17 11:20:36 +0800
commita76acf6441a414bb5dd601485ed8ed790218bb13 (patch)
tree257e15bb77a0933286b8fa6c355ca37749a5e31c /src/gen6_mfd.c
parent82a4a3915821dd2a302ca87d21dfcd945f2500af (diff)
downloadlibva-intel-driver-a76acf6441a414bb5dd601485ed8ed790218bb13.tar.gz
libva-intel-driver-a76acf6441a414bb5dd601485ed8ed790218bb13.tar.bz2
libva-intel-driver-a76acf6441a414bb5dd601485ed8ed790218bb13.zip
Fill the bitplane for VC1 skip picture decoding
This is a workaround for VC1 skip picture, the corresponding bit value in bitplane should be 1 for skip picture, but sometimes application pass down wrong value. Signed-off-by: Li,Xiaowei <xiaowei.a.li@intel.com>
Diffstat (limited to 'src/gen6_mfd.c')
-rwxr-xr-xsrc/gen6_mfd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c
index 11489dd..9afa7dd 100755
--- a/src/gen6_mfd.c
+++ b/src/gen6_mfd.c
@@ -1423,10 +1423,12 @@ gen6_mfd_vc1_decode_init(VADriverContextP ctx,
int i;
dri_bo *bo;
int width_in_mbs;
+ int picture_type;
assert(decode_state->pic_param && decode_state->pic_param->buffer);
pic_param = (VAPictureParameterBufferVC1 *)decode_state->pic_param->buffer;
width_in_mbs = ALIGN(pic_param->coded_width, 16) / 16;
+ picture_type = pic_param->picture_fields.bits.picture_type;
/* reference picture */
obj_surface = SURFACE(pic_param->forward_reference_picture);
@@ -1526,6 +1528,10 @@ gen6_mfd_vc1_decode_init(VADriverContextP ctx,
src_shift = !((src_h * width_in_mbs + src_w) & 1) * 4;
src_value = ((src[src_index] >> src_shift) & 0xf);
+ if (picture_type == GEN6_VC1_SKIPPED_PICTURE){
+ src_value |= 0x2;
+ }
+
dst_index = src_w / 2;
dst[dst_index] = ((dst[dst_index] >> 4) | (src_value << 4));
}