From 1c21caff4046cff9f453eb8e42d8a6d31b22a96f Mon Sep 17 00:00:00 2001 From: "Li, Xiaowei A" Date: Wed, 12 Dec 2012 10:04:37 +0800 Subject: workaround to set VC1 overlap filter flag Signed-off-by: Li,Xiaowei (cherry picked from commit a6dfb8f7fb601f102b414ac0c9088b5b8e88060f) --- src/gen6_mfd.c | 23 ++++++++++++++++++++--- src/gen75_mfd.c | 23 ++++++++++++++++++++--- src/gen7_mfd.c | 23 ++++++++++++++++++++--- 3 files changed, 60 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c index 986b38b..741a97e 100755 --- a/src/gen6_mfd.c +++ b/src/gen6_mfd.c @@ -1662,9 +1662,26 @@ gen6_mfd_vc1_pic_state(VADriverContextP ctx, brfd = 0; } - overlap = pic_param->sequence_fields.bits.overlap; - if (profile != GEN6_VC1_ADVANCED_PROFILE && pic_param->pic_quantizer_fields.bits.pic_quantizer_scale < 9) - overlap = 0; + overlap = 0; + if (profile != GEN6_VC1_ADVANCED_PROFILE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + }else { + if (pic_param->picture_fields.bits.picture_type == GEN6_VC1_P_PICTURE && + pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + if (pic_param->picture_fields.bits.picture_type == GEN6_VC1_I_PICTURE || + pic_param->picture_fields.bits.picture_type == GEN6_VC1_BI_PICTURE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + }else if(pic_param->conditional_overlap_flag == 2 || + pic_param->conditional_overlap_flag == 3){ + overlap = 1; + } + } + } assert(pic_param->conditional_overlap_flag < 3); assert(pic_param->mv_fields.bits.mv_table < 4); /* FIXME: interlace mode */ diff --git a/src/gen75_mfd.c b/src/gen75_mfd.c index e53139a..1800ac5 100644 --- a/src/gen75_mfd.c +++ b/src/gen75_mfd.c @@ -1958,9 +1958,26 @@ gen75_mfd_vc1_pic_state(VADriverContextP ctx, brfd = 0; } - overlap = pic_param->sequence_fields.bits.overlap; - if (profile != GEN7_VC1_ADVANCED_PROFILE && pic_param->pic_quantizer_fields.bits.pic_quantizer_scale < 9) - overlap = 0; + overlap = 0; + if (profile != GEN7_VC1_ADVANCED_PROFILE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + }else { + if (pic_param->picture_fields.bits.picture_type == GEN7_VC1_P_PICTURE && + pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + if (pic_param->picture_fields.bits.picture_type == GEN7_VC1_I_PICTURE || + pic_param->picture_fields.bits.picture_type == GEN7_VC1_BI_PICTURE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + }else if(pic_param->conditional_overlap_flag == 2 || + pic_param->conditional_overlap_flag == 3){ + overlap = 1; + } + } + } assert(pic_param->conditional_overlap_flag < 3); assert(pic_param->mv_fields.bits.mv_table < 4); /* FIXME: interlace mode */ diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c index 0a0e44f..8c51017 100755 --- a/src/gen7_mfd.c +++ b/src/gen7_mfd.c @@ -1617,9 +1617,26 @@ gen7_mfd_vc1_pic_state(VADriverContextP ctx, brfd = 0; } - overlap = pic_param->sequence_fields.bits.overlap; - if (profile != GEN7_VC1_ADVANCED_PROFILE && pic_param->pic_quantizer_fields.bits.pic_quantizer_scale < 9) - overlap = 0; + overlap = 0; + if (profile != GEN7_VC1_ADVANCED_PROFILE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + }else { + if (pic_param->picture_fields.bits.picture_type == GEN7_VC1_P_PICTURE && + pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + } + if (pic_param->picture_fields.bits.picture_type == GEN7_VC1_I_PICTURE || + pic_param->picture_fields.bits.picture_type == GEN7_VC1_BI_PICTURE){ + if (pic_param->pic_quantizer_fields.bits.pic_quantizer_scale >= 9){ + overlap = 1; + }else if(pic_param->conditional_overlap_flag == 2 || + pic_param->conditional_overlap_flag == 3){ + overlap = 1; + } + } + } assert(pic_param->conditional_overlap_flag < 3); assert(pic_param->mv_fields.bits.mv_table < 4); /* FIXME: interlace mode */ -- cgit v1.2.3