[xiph-commits] r12992 - trunk/theora/lib/enc
conrad at svn.xiph.org
conrad at svn.xiph.org
Mon May 28 00:54:23 PDT 2007
Author: conrad
Date: 2007-05-28 00:54:22 -0700 (Mon, 28 May 2007)
New Revision: 12992
Modified:
trunk/theora/lib/enc/encoder_idct.c
Log:
Correction to (commented out) reference version of 1D iDCT, following section
7.9.3 of the Theora specification. In this example code, the array values
t[2-7] were initialized in terms of themselves (uninitialized stack region),
rather than the input DCT coefficients y. Closes ticket:1168
Modified: trunk/theora/lib/enc/encoder_idct.c
===================================================================
--- trunk/theora/lib/enc/encoder_idct.c 2007-05-27 13:50:45 UTC (rev 12991)
+++ trunk/theora/lib/enc/encoder_idct.c 2007-05-28 07:54:22 UTC (rev 12992)
@@ -45,12 +45,12 @@
t[1] &= 0xffff;
t[1] = (xC4S4 * t[1]) >> 16;
- t[2] = ((xC6S2 * t[2]) >> 16) - ((xC2S6 * y[6]) >> 16);
- t[3] = ((xC2S6 * t[2]) >> 16) + ((xC6S2 * y[6]) >> 16);
- t[4] = ((xC7S1 * t[1]) >> 16) - ((xC1S7 * y[7]) >> 16);
- t[5] = ((xC3S5 * t[5]) >> 16) - ((xC5S3 * y[3]) >> 16);
- t[6] = ((xC5S3 * t[5]) >> 16) + ((xC3S5 * y[3]) >> 16);
- t[7] = ((xC1S7 * t[1]) >> 16) + ((xC7S1 * y[7]) >> 16);
+ t[2] = ((xC6S2 * y[2]) >> 16) - ((xC2S6 * y[6]) >> 16);
+ t[3] = ((xC2S6 * y[2]) >> 16) + ((xC6S2 * y[6]) >> 16);
+ t[4] = ((xC7S1 * y[1]) >> 16) - ((xC1S7 * y[7]) >> 16);
+ t[5] = ((xC3S5 * y[5]) >> 16) - ((xC5S3 * y[3]) >> 16);
+ t[6] = ((xC5S3 * y[5]) >> 16) + ((xC3S5 * y[3]) >> 16);
+ t[7] = ((xC1S7 * y[1]) >> 16) + ((xC7S1 * y[7]) >> 16);
r = t[4] + t[5];
t[5] = t[4] - t[5];
More information about the commits
mailing list