diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-02-21 11:37:52 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-02-28 21:51:24 +0100 |
commit | d74a8cb7e42f703be5796eeb485f06af710ae8ca (patch) | |
tree | f07e3022ce42e14039666e7efdbfe9a93c3441da /libavcodec/fmtconvert.c | |
parent | ee964145b5d229571e00bf6883a44189d02babe2 (diff) | |
download | ffmpeg-d74a8cb7e42f703be5796eeb485f06af710ae8ca.tar.gz |
fmtconvert: drop unused functions
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 63f62c396a..2dff704aa2 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); |