summaryrefslogtreecommitdiff
path: root/libswresample/swresample_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-10 19:52:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-10 19:54:41 +0200
commitdb2eadb2f57ad5a580c9ad5b2d288c4f6a2eeecb (patch)
tree1f2a13cd4aa60f6c16490efd2731681f2cad98c2 /libswresample/swresample_internal.h
parent5c1f312888fc0094e4755c10c9700af87c9c3a40 (diff)
swr: add dither support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample_internal.h')
-rw-r--r--libswresample/swresample_internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
index 618afc11ff..ebc275913d 100644
--- a/libswresample/swresample_internal.h
+++ b/libswresample/swresample_internal.h
@@ -49,6 +49,7 @@ struct SwrContext {
float rematrix_volume; ///< rematrixing volume coefficient
const int *channel_map; ///< channel index (or -1 if muted channel) map
int used_ch_count; ///< number of used input channels (mapped channel count if channel_map, otherwise in.ch_count)
+ enum SwrDitherType dither_method;
int int_bps; ///< internal bytes per sample
int resample_first; ///< 1 if resampling must come first, 0 if rematrixing
@@ -61,6 +62,7 @@ struct SwrContext {
AudioData preout; ///< pre-output audio data: used for rematrix/resample
AudioData out; ///< converted output audio data
AudioData in_buffer; ///< cached audio data (convert and resample purpose)
+ AudioData dither; ///< cached audio data (convert and resample purpose)
int in_buffer_index; ///< cached buffer position
int in_buffer_count; ///< cached buffer length
int resample_in_constraint; ///< 1 if the input end was reach before the output end, 0 otherwise
@@ -89,5 +91,8 @@ int swri_resample_double(struct ResampleContext *c,double *dst, const double *
int swri_rematrix_init(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(void *dst, int len, unsigned seed, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, enum SwrDitherType type);
#endif