diff options
author | Zhong Li <zhong.li@intel.com> | 2013-12-23 16:30:25 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-12-25 16:30:13 +0800 |
commit | 2649e6898c67ebc516f94e14b38238221717b064 (patch) | |
tree | 7cb137705fcbee8162eef6f841c9607edd8d0654 | |
parent | 5b211d3e2f2e4eab95b8697d9109fb7ea29fbfb3 (diff) | |
download | libva-intel-driver-2649e6898c67ebc516f94e14b38238221717b064.tar.gz libva-intel-driver-2649e6898c67ebc516f94e14b38238221717b064.tar.bz2 libva-intel-driver-2649e6898c67ebc516f94e14b38238221717b064.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 |