aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/swresample.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-05-26 14:50:02 -0400
committerMichael Niedermayer <michaelni@gmx.at>2012-07-23 19:23:39 +0200
commit7e15df7551cf45ad1d3e39d20fdc8d6c651d4705 (patch)
treeacc7b898177ac5397ad64c0710ebedbb56ae59c2 /libswresample/swresample.c
parenta7ac05ce2f9fd94dad2326eef8110c47cdb8af57 (diff)
downloadffmpeg-7e15df7551cf45ad1d3e39d20fdc8d6c651d4705.tar.gz
swr: resampling: add filter type and Kaiser window beta to AVOptions
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r--libswresample/swresample.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 0c869f9d12..89fe0f7f7d 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -88,6 +88,11 @@ static const AVOption options[]={
, OFFSET(soft_compensation_duration),AV_OPT_TYPE_FLOAT ,{.dbl=1 }, 0 , INT_MAX , PARAM },
{"max_soft_comp" , "Maximum factor by which data is stretched/squeezed to make it match the timestamps."
, OFFSET(max_soft_compensation),AV_OPT_TYPE_FLOAT ,{.dbl=0 }, INT_MIN, INT_MAX , PARAM },
+{ "filter_type" , "Filter Type" , OFFSET(filter_type) , AV_OPT_TYPE_INT , { SWR_FILTER_TYPE_KAISER }, SWR_FILTER_TYPE_CUBIC, SWR_FILTER_TYPE_KAISER, PARAM, "filter_type" },
+ { "cubic" , "Cubic" , 0 , AV_OPT_TYPE_CONST, { SWR_FILTER_TYPE_CUBIC }, INT_MIN, INT_MAX, PARAM, "filter_type" },
+ { "blackman_nuttall", "Blackman Nuttall Windowed Sinc", 0 , AV_OPT_TYPE_CONST, { SWR_FILTER_TYPE_BLACKMAN_NUTTALL }, INT_MIN, INT_MAX, PARAM, "filter_type" },
+ { "kaiser" , "Kaiser Windowed Sinc" , 0 , AV_OPT_TYPE_CONST, { SWR_FILTER_TYPE_KAISER }, INT_MIN, INT_MAX, PARAM, "filter_type" },
+{ "kaiser_beta" , "Kaiser Window Beta" ,OFFSET(kaiser_beta) , AV_OPT_TYPE_INT , {.dbl=9 }, 2 , 16 , PARAM },
{0}
};
@@ -244,7 +249,7 @@ int swr_init(struct SwrContext *s){
set_audiodata_fmt(&s->out, s->out_sample_fmt);
if (s->out_sample_rate!=s->in_sample_rate || (s->flags & SWR_FLAG_RESAMPLE)){
- s->resample = swri_resample_init(s->resample, s->out_sample_rate, s->in_sample_rate, s->filter_size, s->phase_shift, s->linear_interp, s->cutoff, s->int_sample_fmt);
+ s->resample = swri_resample_init(s->resample, s->out_sample_rate, s->in_sample_rate, s->filter_size, s->phase_shift, s->linear_interp, s->cutoff, s->int_sample_fmt, s->filter_type, s->kaiser_beta);
}else
swri_resample_free(&s->resample);
if( s->int_sample_fmt != AV_SAMPLE_FMT_S16P