From 042e70e45e74ad5105d1c9f35375350000b56b39 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Thu, 30 May 2013 14:24:12 -0700 Subject: Changed to use a new variant of WHT The commit changed to use a new variant of Walsh-Hadamard Transform by Tim Terriberry. This new variant has the best compression among a number of variants that developed by Tim. Change-Id: Icb3a88515463cfc644b17ca046fcd139db2557e9 --- vp9/encoder/vp9_dct.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'vp9/encoder') diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c index d22644424..8d4eec139 100644 --- a/vp9/encoder/vp9_dct.c +++ b/vp9/encoder/vp9_dct.c @@ -606,14 +606,13 @@ void vp9_short_walsh4x4_c(short *input, short *output, int pitch) { c1 = ip[2 * pitch_short]; d1 = ip[3 * pitch_short]; - b1 = a1 - b1; - c1 += d1; - e1 = (c1 - b1) >> 1; - a1 += e1; - d1 -= e1; - c1 = a1 - c1; - b1 -= d1; - + a1 += b1; + d1 = d1 - c1; + e1 = (a1 - d1) >> 1; + b1 = e1 - b1; + c1 = e1 - c1; + a1 -= c1; + d1 += b1; op[0] = a1; op[4] = c1; op[8] = d1; @@ -631,14 +630,13 @@ void vp9_short_walsh4x4_c(short *input, short *output, int pitch) { c1 = ip[2]; d1 = ip[3]; - b1 = a1 - b1; - c1 += d1; - e1 = (c1 - b1) >> 1; - a1 += e1; - d1 -= e1; - c1 = a1 - c1; - b1 -= d1; - + a1 += b1; + d1 -= c1; + e1 = (a1 - d1) >> 1; + b1 = e1 - b1; + 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; -- cgit v1.2.3