diff options
author | Zhong Li <zhong.li@intel.com> | 2013-12-23 16:30:25 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-02-27 10:26:25 +0800 |
commit | 6b574e471d132ee6d30157c7da26425a54fd9c81 (patch) | |
tree | a7942b7a7cbd8473f32b92df00ff57bb5b5d3929 | |
parent | 70c232a7fb6e58d2ac3e124784ed4c0316b860c3 (diff) | |
download | libva-intel-driver-6b574e471d132ee6d30157c7da26425a54fd9c81.tar.gz libva-intel-driver-6b574e471d132ee6d30157c7da26425a54fd9c81.tar.bz2 libva-intel-driver-6b574e471d132ee6d30157c7da26425a54fd9c81.zip |
Fix a bug of vp8 quant index calculation error
Signed-off-by: Zhong Li <zhong.li@intel.com>
-rw-r--r-- | src/gen8_mfd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c index 3429693..3ce8ebe 100644 --- a/src/gen8_mfd.c +++ b/src/gen8_mfd.c @@ -2745,12 +2745,14 @@ static const int vp8_ac_qlookup[128] = 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284, }; -static inline unsigned int vp8_clip_quantization_index(unsigned int index) +static inline unsigned int vp8_clip_quantization_index(int index) { if(index > 127) return 127; else if(index <0) return 0; + + return index; } static void |