From 74561037485b6676c681a426b6b9d96b67255208 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 15 Oct 2009 11:50:32 +0000 Subject: [PATCH] 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. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20237 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/dsputil.h | 2 +- libavcodec/rdft.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h index 3656d1c3b5..50889bb1d1 100644 --- a/libavcodec/dsputil.h +++ b/libavcodec/dsputil.h @@ -840,7 +840,7 @@ typedef struct { int sign_convention; /* pre/post rotation tables */ - FFTSample *tcos; + const FFTSample *tcos; FFTSample *tsin; FFTContext fft; } RDFTContext; diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c index 0fe26ab01a..ed4e39aa08 100644 --- a/libavcodec/rdft.c +++ b/libavcodec/rdft.c @@ -64,7 +64,6 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans) 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; -- 2.11.4.GIT