diff options
author | Li, Xiaowei A <xiaowei.a.li@intel.com> | 2012-12-12 09:16:25 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-01-23 13:00:00 +0800 |
commit | 7803fcae62c868c26f24425df04aee0405342563 (patch) | |
tree | 26a57a5934974eea6d1f6a8ece4531d431ac9d07 /src/gen7_mfd.c | |
parent | e8d3f90fc18ca3726e6b34156ba56ee92c2a2524 (diff) | |
download | libva-intel-driver-7803fcae62c868c26f24425df04aee0405342563.tar.gz libva-intel-driver-7803fcae62c868c26f24425df04aee0405342563.tar.bz2 libva-intel-driver-7803fcae62c868c26f24425df04aee0405342563.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>
(cherry picked from commit a76acf6441a414bb5dd601485ed8ed790218bb13)
Diffstat (limited to 'src/gen7_mfd.c')
-rwxr-xr-x | src/gen7_mfd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c index da4a2d3..0fb7249 100755 --- a/src/gen7_mfd.c +++ b/src/gen7_mfd.c @@ -1338,11 +1338,13 @@ gen7_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); @@ -1441,6 +1443,10 @@ gen7_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 == GEN7_VC1_SKIPPED_PICTURE){ + src_value |= 0x2; + } + dst_index = src_w / 2; dst[dst_index] = ((dst[dst_index] >> 4) | (src_value << 4)); } |