diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-14 14:39:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-18 11:43:01 +0100 |
commit | a54a51cc9bdd0596fd205db1db826d7e9d509541 (patch) | |
tree | 11becc6898fa13126f7502aacf928299a777a970 /libavutil/float_dsp.c | |
parent | bb5e1482992ddcbdae5f4aee8e62fafbf37a239f (diff) | |
download | ffmpeg-streaming-a54a51cc9bdd0596fd205db1db826d7e9d509541.zip ffmpeg-streaming-a54a51cc9bdd0596fd205db1db826d7e9d509541.tar.gz |
avutil/float_dsp: add avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/float_dsp.c')
-rw-r--r-- | libavutil/float_dsp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c index 78de1a1..467d7a7 100644 --- a/libavutil/float_dsp.c +++ b/libavutil/float_dsp.c @@ -22,6 +22,7 @@ #include "config.h" #include "attributes.h" #include "float_dsp.h" +#include "mem.h" static void vector_fmul_c(float *dst, const float *src0, const float *src1, int len) @@ -139,6 +140,15 @@ av_cold void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) ff_float_dsp_init_mips(fdsp); } +av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact) +{ + AVFloatDSPContext *ret = av_mallocz(sizeof(AVFloatDSPContext)); + if (ret) + avpriv_float_dsp_init(ret, bit_exact); + return ret; +} + + #ifdef TEST #include <float.h> @@ -158,7 +168,6 @@ av_cold void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) #include "internal.h" #include "lfg.h" #include "log.h" -#include "mem.h" #include "random_seed.h" #define LEN 240 |