summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-11 22:57:10 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-11 22:57:10 +0000
commitd1e3c6fd404fc401de26457af294e21852ffdd8f (patch)
tree877855e8083ed59a999857f3646cc8321ea76ae0 /libavcodec/avcodec.h
parentb5fdaebb44f9d2351a4678183eee6d38f2709d1e (diff)
extend resampling API, add S16 internal conversion
Originally committed as revision 17163 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index edc3adeef1..41d3c0e6f0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 14
+#define LIBAVCODEC_VERSION_MINOR 15
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -2443,8 +2443,36 @@ struct AVResampleContext;
typedef struct ReSampleContext ReSampleContext;
-ReSampleContext *audio_resample_init(int output_channels, int input_channels,
- int output_rate, int input_rate);
+#if LIBAVCODEC_VERSION_MAJOR < 53
+/**
+ * @deprecated Use av_audio_resample_init() instead.
+ */
+attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
+ int output_rate, int input_rate);
+#endif
+/**
+ * Initializes audio resampling context
+ *
+ * @param output_channels number of output channels
+ * @param input_channels number of input channels
+ * @param output_rate output sample rate
+ * @param input_rate input sample rate
+ * @param sample_fmt_out requested output sample format
+ * @param sample_fmt_in input sample format
+ * @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq
+ * @param log2_phase_count log2 of the number of entries in the polyphase filterbank
+ * @param linear If 1 then the used FIR filter will be linearly interpolated
+ between the 2 closest, if 0 the closest will be used
+ * @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate
+ * @return allocated ReSampleContext, NULL if error occured
+ */
+ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
+ int output_rate, int input_rate,
+ enum SampleFormat sample_fmt_out,
+ enum SampleFormat sample_fmt_in,
+ int filter_length, int log2_phase_count,
+ int linear, double cutoff);
+
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
void audio_resample_close(ReSampleContext *s);