diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-11-19 21:47:39 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-11-23 21:36:49 +0100 |
commit | 0eeeb9647e9c92c9edfd0b18c7cb5da7ac666f85 (patch) | |
tree | f3faf163a9e384dff056d53a272b1e912e988d27 /libavcodec/mpegaudiodec_float.c | |
parent | 48b24bd2d208ce0f124029ac4c5ac5cb1fca4175 (diff) | |
download | ffmpeg-0eeeb9647e9c92c9edfd0b18c7cb5da7ac666f85.tar.gz |
mpegaudiodec: Consistently handle fixed/float templating
Diffstat (limited to 'libavcodec/mpegaudiodec_float.c')
-rw-r--r-- | libavcodec/mpegaudiodec_float.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c index b5c82231df..3a76055522 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 = { |