changeset 10402:06bdadf410a9 libavcodec

Do not initialize ff_cos_* tables again in rdft_init, they are already initialized by ff_fft_init and using different code can result in slightly different values, in addition it crashes when the tables are hardcoded. On amd64 this slightly changes qdm2 output.
author reimar
date Thu, 15 Oct 2009 11:50:32 +0000
parents b44eae1b1971
children dfe00158fca6
files dsputil.h rdft.c
diffstat 2 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dsputil.h	Thu Oct 15 06:59:23 2009 +0000
+++ b/dsputil.h	Thu Oct 15 11:50:32 2009 +0000
@@ -840,7 +840,7 @@
     int sign_convention;
 
     /* pre/post rotation tables */
-    FFTSample *tcos;
+    const FFTSample *tcos;
     FFTSample *tsin;
     FFTContext fft;
 } RDFTContext;
--- a/rdft.c	Thu Oct 15 06:59:23 2009 +0000
+++ b/rdft.c	Thu Oct 15 11:50:32 2009 +0000
@@ -64,7 +64,6 @@
     s->tcos = ff_cos_tabs[nbits-4];
     s->tsin = ff_sin_tabs[nbits-4]+(trans == RDFT || trans == IRIDFT)*(n>>2);
     for (i = 0; i < (n>>2); i++) {
-        s->tcos[i] = cos(i*theta);
         s->tsin[i] = sin(i*theta);
     }
     return 0;