diff options
Diffstat (limited to 'vp8/common/idctllm.c')
-rw-r--r-- | vp8/common/idctllm.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/vp8/common/idctllm.c b/vp8/common/idctllm.c index 196062df6..c65d35adc 100644 --- a/vp8/common/idctllm.c +++ b/vp8/common/idctllm.c @@ -22,6 +22,8 @@ * so * x * sqrt(2) * cos (pi/8) = x + x * (sqrt(2) *cos(pi/8)-1). **************************************************************************/ +#include "vpx_ports/config.h" + static const int cospi8sqrt2minus1 = 20091; static const int sinpi8sqrt2 = 35468; static const int rounding = 0; @@ -75,11 +77,19 @@ void vp8_short_idct4x4llm_c(short *input, short *output, int pitch) d1 = temp1 + temp2; +#if !CONFIG_EXTEND_QRANGE op[0] = (a1 + d1 + 4) >> 3; op[3] = (a1 - d1 + 4) >> 3; op[1] = (b1 + c1 + 4) >> 3; op[2] = (b1 - c1 + 4) >> 3; +#else + op[0] = (a1 + d1 + 16) >> 5; + op[3] = (a1 - d1 + 16) >> 5; + + op[1] = (b1 + c1 + 16) >> 5; + op[2] = (b1 - c1 + 16) >> 5; +#endif ip += shortpitch; op += shortpitch; @@ -92,8 +102,11 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch) int a1; short *op = output; int shortpitch = pitch >> 1; +#if !CONFIG_EXTEND_QRANGE a1 = ((input[0] + 4) >> 3); - +#else + a1 = ((input[0] + 16) >> 5); +#endif for (i = 0; i < 4; i++) { op[0] = a1; @@ -106,7 +119,11 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch) void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) { +#if !CONFIG_EXTEND_QRANGE int a1 = ((input_dc + 4) >> 3); +#else + int a1 = ((input_dc + 16) >> 5); +#endif int r, c; for (r = 0; r < 4; r++) @@ -168,11 +185,17 @@ void vp8_short_inv_walsh4x4_c(short *input, short *output) c2 = a1 - b1; d2 = d1 - c1; +#if !CONFIG_EXTEND_QRANGE op[0] = (a2 + 3) >> 3; op[1] = (b2 + 3) >> 3; op[2] = (c2 + 3) >> 3; op[3] = (d2 + 3) >> 3; - +#else + op[0] = (a2 + 1) >> 2; + op[1] = (b2 + 1) >> 2; + op[2] = (c2 + 1) >> 2; + op[3] = (d2 + 1) >> 2; +#endif ip += 4; op += 4; } @@ -184,7 +207,11 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output) int a1; short *op = output; - a1 = ((input[0] + 3) >> 3); +#if !CONFIG_EXTEND_QRANGE + a1 = (input[0] + 3 )>> 3; +#else + a1 = (input[0] + 1 )>> 2; +#endif for (i = 0; i < 4; i++) { |