changeset 6498:d9c48a85fd23 libavcodec

improve precision in mdct.c using double for some temporaries
author mru
date Sun, 16 Mar 2008 13:15:42 +0000
parents e44443c512b1
children c9416ce3c09f
files mdct.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mdct.c	Sat Mar 15 16:15:47 2008 +0000
+++ b/mdct.c	Sun Mar 16 13:15:42 2008 +0000
@@ -54,7 +54,7 @@
 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 @@
 /* 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;\
 }