Commit 6037f179 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Rename defined constants

The change is to better reflect the nature of the constants.

Change-Id: Icabac6e9bceefbdb3f03f8218f88ef75943c30fb
parent ff1ae7f7
......@@ -28,10 +28,10 @@ void vp9_short_iwalsh4x4_add_c(int16_t *input, uint8_t *dest, int dest_stride) {
int16_t *op = output;
for (i = 0; i < 4; i++) {
a1 = ip[0] >> WHT_UPSCALE_FACTOR;
c1 = ip[1] >> WHT_UPSCALE_FACTOR;
d1 = ip[2] >> WHT_UPSCALE_FACTOR;
b1 = ip[3] >> WHT_UPSCALE_FACTOR;
a1 = ip[0] >> UNIT_QUANT_SHIFT;
c1 = ip[1] >> UNIT_QUANT_SHIFT;
d1 = ip[2] >> UNIT_QUANT_SHIFT;
b1 = ip[3] >> UNIT_QUANT_SHIFT;
a1 += c1;
d1 -= b1;
e1 = (a1 - d1) >> 1;
......@@ -77,7 +77,7 @@ void vp9_short_iwalsh4x4_1_add_c(int16_t *in, uint8_t *dest, int dest_stride) {
int16_t *ip = in;
int16_t *op = tmp;
a1 = ip[0] >> WHT_UPSCALE_FACTOR;
a1 = ip[0] >> UNIT_QUANT_SHIFT;
e1 = a1 >> 1;
a1 -= e1;
op[0] = a1;
......
......@@ -22,7 +22,8 @@
#define DCT_CONST_BITS 14
#define DCT_CONST_ROUNDING (1 << (DCT_CONST_BITS - 1))
#define WHT_UPSCALE_FACTOR 2
#define UNIT_QUANT_SHIFT 2
#define UNIT_QUANT_FACTOR (1 << UNIT_QUANT_SHIFT)
#define pair_set_epi16(a, b) \
_mm_set_epi16(b, a, b, a, b, a, b, a)
......
......@@ -637,10 +637,10 @@ void vp9_short_walsh4x4_c(short *input, short *output, int pitch) {
c1 = e1 - c1;
a1 -= c1;
d1 += b1;
op[0] = a1 << WHT_UPSCALE_FACTOR;
op[1] = c1 << WHT_UPSCALE_FACTOR;
op[2] = d1 << WHT_UPSCALE_FACTOR;
op[3] = b1 << WHT_UPSCALE_FACTOR;
op[0] = a1 * UNIT_QUANT_FACTOR;
op[1] = c1 * UNIT_QUANT_FACTOR;
op[2] = d1 * UNIT_QUANT_FACTOR;
op[3] = b1 * UNIT_QUANT_FACTOR;
ip += 4;
op += 4;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment