diff options
author | Yunqing Wang <yunqingwang@google.com> | 2013-02-26 16:27:41 -0800 |
---|---|---|
committer | Yunqing Wang <yunqingwang@google.com> | 2013-02-26 17:16:13 -0800 |
commit | 35bc02c6eb22602997d9c8aebeb46ef588266cc4 (patch) | |
tree | 54ab06054f3f5bcef8f214b00fe448c4da19af46 /vp9/common/vp9_idct.h | |
parent | 9770d564f4984e6a0d3cfdfb7e5b8bc83f52dccf (diff) | |
download | libvpx-35bc02c6eb22602997d9c8aebeb46ef588266cc4.tar libvpx-35bc02c6eb22602997d9c8aebeb46ef588266cc4.tar.gz libvpx-35bc02c6eb22602997d9c8aebeb46ef588266cc4.tar.bz2 libvpx-35bc02c6eb22602997d9c8aebeb46ef588266cc4.zip |
Optimize vp9_dc_only_idct_add_c function
Wrote SSE2 version of vp9_dc_only_idct_add_c function. In order to
improve performance, clipped the absolute diff values to [0, 255].
This allowed us to keep the additions/subtractions in 8 bits.
Test showed an over 2% decoder performance increase.
Change-Id: Ie1a236d23d207e4ffcd1fc9f3d77462a9c7fe09d
Diffstat (limited to 'vp9/common/vp9_idct.h')
-rw-r--r-- | vp9/common/vp9_idct.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vp9/common/vp9_idct.h b/vp9/common/vp9_idct.h index 430cec083..d25d0ac2a 100644 --- a/vp9/common/vp9_idct.h +++ b/vp9/common/vp9_idct.h @@ -13,6 +13,13 @@ #include "./vpx_config.h" +#define ROUND_POWER_OF_TWO(value, n) (((value) + (1 << ((n) - 1))) >> (n)) + +/* If we don't want to use ROUND_POWER_OF_TWO macro +static INLINE int16_t round_power_of_two(int16_t value, int n) { + return (value + (1 << (n - 1))) >> n; +}*/ + // Constants and Macros used by all idct/dct functions #define DCT_CONST_BITS 14 #define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1)) |