diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-30 18:06:46 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-04 05:08:09 +0300 |
commit | fe2ff6d24745f0739bfde9061092c1268557310b (patch) | |
tree | 9cbcf8b2472dd7612dd84c8b6b237d9d02b4daf9 /libavcodec/dsputil.c | |
parent | a35d782d28ef0497f2b65eb300c2e6a6028fc165 (diff) |
Separate format conversion DSP functions from DSPContext.
This will be beneficial for use with the audio conversion API without
requiring it to depend on all of dsputil.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit c73d99e672329c8f2df290736ffc474c360ac4ae)
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 2d4ec72026..84714def41 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3867,12 +3867,6 @@ static float scalarproduct_float_c(const float *v1, const float *v2, int len) return p; } -static void int32_to_float_fmul_scalar_c(float *dst, const int *src, float mul, int len){ - int i; - for(i=0; i<len; i++) - dst[i] = src[i] * mul; -} - static inline uint32_t clipf_c_one(uint32_t a, uint32_t mini, uint32_t maxi, uint32_t maxisign) { @@ -3918,30 +3912,6 @@ static void vector_clipf_c(float *dst, const float *src, float min, float max, i } } -static av_always_inline int float_to_int16_one(const float *src){ - return av_clip_int16(lrintf(*src)); -} - -static void ff_float_to_int16_c(int16_t *dst, const float *src, long len){ - int i; - for(i=0; i<len; i++) - dst[i] = float_to_int16_one(src+i); -} - -static void ff_float_to_int16_interleave_c(int16_t *dst, const float **src, long len, int channels){ - int i,j,c; - if(channels==2){ - for(i=0; i<len; i++){ - dst[2*i] = float_to_int16_one(src[0]+i); - dst[2*i+1] = float_to_int16_one(src[1]+i); - } - }else{ - for(c=0; c<channels; c++) - for(i=0, j=c; i<len; i++, j+=channels) - dst[j] = float_to_int16_one(src[c]+i); - } -} - static int32_t scalarproduct_int16_c(const int16_t * v1, const int16_t * v2, int order, int shift) { int res = 0; @@ -4437,10 +4407,7 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) c->vector_fmul_reverse = vector_fmul_reverse_c; c->vector_fmul_add = vector_fmul_add_c; c->vector_fmul_window = vector_fmul_window_c; - c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c; c->vector_clipf = vector_clipf_c; - c->float_to_int16 = ff_float_to_int16_c; - c->float_to_int16_interleave = ff_float_to_int16_interleave_c; c->scalarproduct_int16 = scalarproduct_int16_c; c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c; c->scalarproduct_float = scalarproduct_float_c; |