aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/swresample_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-01 20:20:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-01 20:20:21 +0200
commitaab5a4521c4034c218cbd72325b5d1946a3ec3c2 (patch)
treed250c1d9fc0454047df5ce59f3e55007b4b0a337 /libswresample/swresample_internal.h
parent00fea26faf8df22b7c686ceb36a7eecdc3d44b10 (diff)
downloadffmpeg-aab5a4521c4034c218cbd72325b5d1946a3ec3c2.tar.gz
swr: add and use function pointers for rematrix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample_internal.h')
-rw-r--r--libswresample/swresample_internal.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
index d34a75285c..550d7f0eb2 100644
--- a/libswresample/swresample_internal.h
+++ b/libswresample/swresample_internal.h
@@ -23,6 +23,9 @@
#include "swresample.h"
+typedef void (mix_1_1_func_type)(void *out, const void *in, void *coeffp, int index, int len);
+typedef void (mix_2_1_func_type)(void *out, const void *in1, const void *in2, void *coeffp, int index1, int index2, int len);
+
typedef struct AudioData{
uint8_t *ch[SWR_CH_MAX]; ///< samples buffer per channel
uint8_t *data; ///< samples buffer
@@ -84,6 +87,8 @@ struct SwrContext {
uint8_t *native_one;
int32_t matrix32[SWR_CH_MAX][SWR_CH_MAX]; ///< 17.15 fixed point rematrixing coefficients
uint8_t matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1]; ///< Lists of input channels per output channel that have non zero rematrixing coefficients
+ mix_1_1_func_type *mix_1_1_f;
+ mix_2_1_func_type *mix_2_1_f;
/* TODO: callbacks for ASM optimizations */
};
@@ -100,7 +105,6 @@ int swri_resample_double(struct ResampleContext *c,double *dst, const double *
int swri_rematrix_init(SwrContext *s);
void swri_rematrix_free(SwrContext *s);
int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy);
-void swri_sum2(enum AVSampleFormat format, void *dst, const void *src0, const void *src1, float coef0, float coef1, int len);
void swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt);