diff options
author | Måns Rullgård <mans@mansr.com> | 2008-03-16 13:15:42 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-03-16 13:15:42 +0000 |
commit | 77f11d8a4ca22d897c01d4b592e92cff2f16334f (patch) | |
tree | e46dc69ee3660a116e86c84f49b60398b17639f6 /libavcodec/mdct.c | |
parent | 6a5b97732e558c9726a9f0118d7198aaab79d226 (diff) | |
download | ffmpeg-77f11d8a4ca22d897c01d4b592e92cff2f16334f.tar.gz |
improve precision in mdct.c using double for some temporaries
Originally committed as revision 12457 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mdct.c')
-rw-r--r-- | libavcodec/mdct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c index e809fcdcbc..c51f809714 100644 --- a/libavcodec/mdct.c +++ b/libavcodec/mdct.c @@ -54,7 +54,7 @@ void ff_kbd_window_init(float *window, float alpha, int n) int ff_mdct_init(MDCTContext *s, int nbits, int inverse) { int n, n4, i; - float alpha; + double alpha; memset(s, 0, sizeof(*s)); n = 1 << nbits; @@ -85,10 +85,10 @@ int ff_mdct_init(MDCTContext *s, int nbits, int inverse) /* complex multiplication: p = a * b */ #define CMUL(pre, pim, are, aim, bre, bim) \ {\ - float _are = (are);\ - float _aim = (aim);\ - float _bre = (bre);\ - float _bim = (bim);\ + double _are = (are);\ + double _aim = (aim);\ + double _bre = (bre);\ + double _bim = (bim);\ (pre) = _are * _bre - _aim * _bim;\ (pim) = _are * _bim + _aim * _bre;\ } |