swresample: allow double precision beta value for the Kaiser window

Kaiser windows inherently don't require beta to be an integer. This was
an arbitrary restriction. Moreover, soxr does not require it, and in
fact often estimates beta to a non-integral value.

Thus, this patch allows greater flexibility for swresample clients.
Micro version is updated.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde
2015-11-07 10:16:27 -05:00
parent 9ac61e73d0
commit 1bed09a30e
7 changed files with 9 additions and 9 deletions

View File

@@ -71,7 +71,7 @@ static double bessel(double x){
* @return 0 on success, negative on error
*/
static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale,
int filter_type, int kaiser_beta){
int filter_type, double kaiser_beta){
int ph, i;
double x, y, w, t;
double *tab = av_malloc_array(tap_count+1, sizeof(*tab));
@@ -212,7 +212,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
}
static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta,
double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta,
double precision, int cheby)
{
double cutoff = cutoff0? cutoff0 : 0.97;