Mercurial > libavcodec.hg
comparison rdft.c @ 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 | 9855215d1b2f |
children | 57acce8b1380 |
comparison
equal
deleted
inserted
replaced
10401:b44eae1b1971 | 10402:06bdadf410a9 |
---|---|
62 return -1; | 62 return -1; |
63 | 63 |
64 s->tcos = ff_cos_tabs[nbits-4]; | 64 s->tcos = ff_cos_tabs[nbits-4]; |
65 s->tsin = ff_sin_tabs[nbits-4]+(trans == RDFT || trans == IRIDFT)*(n>>2); | 65 s->tsin = ff_sin_tabs[nbits-4]+(trans == RDFT || trans == IRIDFT)*(n>>2); |
66 for (i = 0; i < (n>>2); i++) { | 66 for (i = 0; i < (n>>2); i++) { |
67 s->tcos[i] = cos(i*theta); | |
68 s->tsin[i] = sin(i*theta); | 67 s->tsin[i] = sin(i*theta); |
69 } | 68 } |
70 return 0; | 69 return 0; |
71 } | 70 } |
72 | 71 |