[FFmpeg-cvslog] r20237 - in trunk/libavcodec: dsputil.h rdft.c

reimar subversion
Thu Oct 15 13:50:33 CEST 2009


Author: reimar
Date: Thu Oct 15 13:50:32 2009
New Revision: 20237

Log:
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.

Modified:
   trunk/libavcodec/dsputil.h
   trunk/libavcodec/rdft.c

Modified: trunk/libavcodec/dsputil.h
==============================================================================
--- trunk/libavcodec/dsputil.h	Thu Oct 15 11:49:06 2009	(r20236)
+++ trunk/libavcodec/dsputil.h	Thu Oct 15 13:50:32 2009	(r20237)
@@ -840,7 +840,7 @@ typedef struct {
     int sign_convention;
 
     /* pre/post rotation tables */
-    FFTSample *tcos;
+    const FFTSample *tcos;
     FFTSample *tsin;
     FFTContext fft;
 } RDFTContext;

Modified: trunk/libavcodec/rdft.c
==============================================================================
--- trunk/libavcodec/rdft.c	Thu Oct 15 11:49:06 2009	(r20236)
+++ trunk/libavcodec/rdft.c	Thu Oct 15 13:50:32 2009	(r20237)
@@ -64,7 +64,6 @@ av_cold int ff_rdft_init(RDFTContext *s,
     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;



More information about the ffmpeg-cvslog mailing list