X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavresample%2Favresample.h;h=ea93952e2eeed97acf78c145790d5d444acabebe;hb=c55bebe2cc7bd444f83a678babc1b287aa7a3da1;hp=7350805e41773281962326d9fbc2d124f90c921b;hpb=4010d724e1d57858d56bff66fa245f2d5646be6e;p=ffmpeg diff --git a/libavresample/avresample.h b/libavresample/avresample.h index 7350805e417..ea93952e2ee 100644 --- a/libavresample/avresample.h +++ b/libavresample/avresample.h @@ -45,6 +45,13 @@ enum AVMixCoeffType { AV_MIX_COEFF_TYPE_NB, /** Number of coeff types. Not part of ABI */ }; +/** Resampling Filter Types */ +enum AVResampleFilterType { + AV_RESAMPLE_FILTER_TYPE_CUBIC, /**< Cubic */ + AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */ + AV_RESAMPLE_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */ +}; + /** * Return the LIBAVRESAMPLE_VERSION_INT constant. */ @@ -131,12 +138,13 @@ void avresample_free(AVAudioResampleContext **avr); * the weight of input channel i in output channel o. * @param stride distance between adjacent input channels in the * matrix array + * @param matrix_encoding matrixed stereo downmix mode (e.g. dplii) * @return 0 on success, negative AVERROR code on failure */ int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, double center_mix_level, double surround_mix_level, double lfe_mix_level, int normalize, double *matrix, - int stride); + int stride, enum AVMatrixEncoding matrix_encoding); /** * Get the current channel mixing matrix. @@ -226,8 +234,8 @@ int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, * not including converted samples added to the internal * output FIFO */ -int avresample_convert(AVAudioResampleContext *avr, void **output, - int out_plane_size, int out_samples, void **input, +int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, + int out_plane_size, int out_samples, uint8_t **input, int in_plane_size, int in_samples); /** @@ -274,10 +282,11 @@ int avresample_available(AVAudioResampleContext *avr); * @see avresample_convert() * * @param avr audio resample context - * @param output output data pointers + * @param output output data pointers. May be NULL, in which case + * nb_samples of data is discarded from output FIFO. * @param nb_samples number of samples to read from the FIFO * @return the number of samples written to output */ -int avresample_read(AVAudioResampleContext *avr, void **output, int nb_samples); +int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples); #endif /* AVRESAMPLE_AVRESAMPLE_H */