summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec_float.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-24 05:12:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-24 05:12:07 +0100
commitf67ec7f3a2698f28c17aab4bb40c9a3d9f1289f7 (patch)
tree46cf8165c145f437a19140a22ddf7f1d0a80cefc /libavcodec/mpegaudiodec_float.c
parentceaaf0d97e7fc11b850325201cf30d7b83e80fd2 (diff)
parent0eeeb9647e9c92c9edfd0b18c7cb5da7ac666f85 (diff)
Merge commit '0eeeb9647e9c92c9edfd0b18c7cb5da7ac666f85'
* commit '0eeeb9647e9c92c9edfd0b18c7cb5da7ac666f85': mpegaudiodec: Consistently handle fixed/float templating Conflicts: libavcodec/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec_float.c')
-rw-r--r--libavcodec/mpegaudiodec_float.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index 61b332ed50..7b50778979 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -19,8 +19,24 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+#include "libavutil/samplefmt.h"
+
#define CONFIG_FLOAT 1
-#include "mpegaudiodec.c"
+
+#include "mpegaudio.h"
+
+#define SHR(a,b) ((a)*(1.0f/(1<<(b))))
+#define FIXR_OLD(a) ((int)((a) * FRAC_ONE + 0.5))
+#define FIXR(x) ((float)(x))
+#define FIXHR(x) ((float)(x))
+#define MULH3(x, y, s) ((s)*(y)*(x))
+#define MULLx(x, y, s) ((y)*(x))
+#define RENAME(a) a ## _float
+#define OUT_FMT AV_SAMPLE_FMT_FLT
+#define OUT_FMT_P AV_SAMPLE_FMT_FLTP
+
+#include "mpegaudiodec_template.c"
#if CONFIG_MP1FLOAT_DECODER
AVCodec ff_mp1float_decoder = {