diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-28 23:56:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-28 23:58:29 +0100 |
commit | 5c17377e28e818d3074a608d42821d66f1d26e8d (patch) | |
tree | 20d4cdffb7b87b8122e0e0a9ceb6b2089d75da53 /libavcodec/fmtconvert.c | |
parent | e82b0e612607d652c1519ee31d30272113775679 (diff) | |
parent | d74a8cb7e42f703be5796eeb485f06af710ae8ca (diff) |
Merge commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca'
* commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca':
fmtconvert: drop unused functions
Conflicts:
libavcodec/arm/fmtconvert_vfp_armv6.S
libavcodec/x86/fmtconvert.asm
libavcodec/x86/fmtconvert_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/fmtconvert.c')
-rw-r--r-- | libavcodec/fmtconvert.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c index fb4302c6fa..e6fc509a96 100644 --- a/libavcodec/fmtconvert.c +++ b/libavcodec/fmtconvert.c @@ -41,59 +41,10 @@ static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst, c->int32_to_float_fmul_scalar(&dst[i], &src[i], *mul++, 8); } -static av_always_inline int float_to_int16_one(const float *src){ - return av_clip_int16(lrintf(*src)); -} - -static void 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 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); - } -} - -void ff_float_interleave_c(float *dst, const float **src, unsigned int len, - int channels) -{ - int j, c; - unsigned int i; - if (channels == 2) { - for (i = 0; i < len; i++) { - dst[2*i] = src[0][i]; - dst[2*i+1] = src[1][i]; - } - } else if (channels == 1 && len < INT_MAX / sizeof(float)) { - memcpy(dst, src[0], len * sizeof(float)); - } else { - for (c = 0; c < channels; c++) - for (i = 0, j = c; i < len; i++, j += channels) - dst[j] = src[c][i]; - } -} - av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx) { c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c; c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c; - c->float_to_int16 = float_to_int16_c; - c->float_to_int16_interleave = float_to_int16_interleave_c; - c->float_interleave = ff_float_interleave_c; if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx); if (ARCH_PPC) ff_fmt_convert_init_ppc(c, avctx); |