30 dst[i] = src[i] * mul;
34 return av_clip_int16(
lrintf(*src));
45 long len,
int channels)
54 for(c=0; c<channels; c++)
55 for(i=0, j=c; i<
len; i++, j+=channels)
66 for (i = 0; i <
len; i++) {
68 dst[2*i+1] = src[1][i];
70 }
else if (channels == 1 && len < INT_MAX /
sizeof(
float)) {
71 memcpy(dst, src[0], len *
sizeof(
float));
73 for (c = 0; c < channels; c++)
74 for (i = 0, j = c; i <
len; i++, j += channels)
static void float_to_int16_c(int16_t *dst, const float *src, long len)
void(* float_interleave)(float *dst, const float **src, unsigned int len, int channels)
Convert multiple arrays of float to an array of interleaved float.
void(* float_to_int16_interleave)(int16_t *dst, const float **src, long len, int channels)
Convert multiple arrays of float to an interleaved array of int16_t.
void(* int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len)
Convert an array of int32_t to float and multiply by a float value.
static av_always_inline int float_to_int16_one(const float *src)
void ff_float_interleave_c(float *dst, const float **src, unsigned int len, int channels)
void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
void(* float_to_int16)(int16_t *dst, const float *src, long len)
Convert an array of float to an array of int16_t.
static av_always_inline av_const long int lrintf(float x)
main external API structure.
void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
static void float_to_int16_interleave_c(int16_t *dst, const float **src, long len, int channels)
common internal and external API header
void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx)
av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
static void int32_to_float_fmul_scalar_c(float *dst, const int *src, float mul, int len)