diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-25 22:01:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-25 23:17:41 +0200 |
commit | 3ead79eaa3f77451bc93cb842ed7b38c94858045 (patch) | |
tree | 4c90cceb47c62f96eaa518cd9ad109b539e9f1ad /libavresample/internal.h | |
parent | cab15f9db4ba6e390b25dd80d7305bb51b5583c4 (diff) | |
parent | 394dbde5484507f213768019623d016196ddad5f (diff) | |
download | ffmpeg-3ead79eaa3f77451bc93cb842ed7b38c94858045.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
FATE: use updated reference for aac-latm_stereo_to_51
avconv: use libavresample
Add libavresample
FATE: avoid channel mixing in lavf-dv_fmt
Conflicts:
Changelog
Makefile
cmdutils.c
configure
doc/APIchanges
ffmpeg.c
tests/lavf-regression.sh
tests/ref/lavf/dv_fmt
tests/ref/seek/lavf_dv
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample/internal.h')
-rw-r--r-- | libavresample/internal.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/libavresample/internal.h b/libavresample/internal.h new file mode 100644 index 0000000000..49ea6a668e --- /dev/null +++ b/libavresample/internal.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com> + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_INTERNAL_H +#define AVRESAMPLE_INTERNAL_H + +#include "libavutil/audio_fifo.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/samplefmt.h" +#include "avresample.h" +#include "audio_convert.h" +#include "audio_data.h" +#include "audio_mix.h" +#include "resample.h" + +struct AVAudioResampleContext { + const AVClass *av_class; /**< AVClass for logging and AVOptions */ + + uint64_t in_channel_layout; /**< input channel layout */ + enum AVSampleFormat in_sample_fmt; /**< input sample format */ + int in_sample_rate; /**< input sample rate */ + uint64_t out_channel_layout; /**< output channel layout */ + enum AVSampleFormat out_sample_fmt; /**< output sample format */ + int out_sample_rate; /**< output sample rate */ + enum AVSampleFormat internal_sample_fmt; /**< internal sample format */ + enum AVMixCoeffType mix_coeff_type; /**< mixing coefficient type */ + double center_mix_level; /**< center mix level */ + double surround_mix_level; /**< surround mix level */ + double lfe_mix_level; /**< lfe mix level */ + int force_resampling; /**< force resampling */ + int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ + int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ + int linear_interp; /**< if 1 then the resampling FIR filter will be linearly interpolated */ + double cutoff; /**< resampling cutoff frequency. 1.0 corresponds to half the output sample rate */ + + int in_channels; /**< number of input channels */ + int out_channels; /**< number of output channels */ + int resample_channels; /**< number of channels used for resampling */ + int downmix_needed; /**< downmixing is needed */ + int upmix_needed; /**< upmixing is needed */ + int mixing_needed; /**< either upmixing or downmixing is needed */ + int resample_needed; /**< resampling is needed */ + int in_convert_needed; /**< input sample format conversion is needed */ + int out_convert_needed; /**< output sample format conversion is needed */ + + AudioData *in_buffer; /**< buffer for converted input */ + AudioData *resample_out_buffer; /**< buffer for output from resampler */ + AudioData *out_buffer; /**< buffer for converted output */ + AVAudioFifo *out_fifo; /**< FIFO for output samples */ + + AudioConvert *ac_in; /**< input sample format conversion context */ + AudioConvert *ac_out; /**< output sample format conversion context */ + ResampleContext *resample; /**< resampling context */ + AudioMix *am; /**< channel mixing context */ +}; + +#endif /* AVRESAMPLE_INTERNAL_H */ |