mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
improve precision in mdct.c using double for some temporaries
Originally committed as revision 12457 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6a5b97732e
commit
77f11d8a4c
@ -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;\
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user