27 #define C15DB 1.189207115 29 #define C_15DB 0.840896415 30 #define C_30DB M_SQRT1_2 31 #define C_45DB 0.594603558 34 #define OFFSET(x) offsetof(SwrContext,x) 35 #define PARAM AV_OPT_FLAG_AUDIO_PARAM 44 {
"isr" ,
"set input sample rate" ,
OFFSET( in_sample_rate),
AV_OPT_TYPE_INT , {.i64=0 }, 0 , INT_MAX , PARAM},
45 {
"in_sample_rate" ,
"set input sample rate" ,
OFFSET( in_sample_rate),
AV_OPT_TYPE_INT , {.i64=0 }, 0 , INT_MAX , PARAM},
46 {
"osr" ,
"set output sample rate" ,
OFFSET(out_sample_rate),
AV_OPT_TYPE_INT , {.i64=0 }, 0 , INT_MAX , PARAM},
47 {
"out_sample_rate" ,
"set output sample rate" ,
OFFSET(out_sample_rate),
AV_OPT_TYPE_INT , {.i64=0 }, 0 , INT_MAX , PARAM},
62 {
"lfe_mix_level" ,
"set LFE mix level" ,
OFFSET(lfe_mix_level ),
AV_OPT_TYPE_FLOAT, {.dbl=0 }, -32 , 32 , PARAM},
63 {
"rmvol" ,
"set rematrix volume" ,
OFFSET(rematrix_volume),
AV_OPT_TYPE_FLOAT, {.dbl=1.0 }, -1000 , 1000 , PARAM},
64 {
"rematrix_volume" ,
"set rematrix volume" ,
OFFSET(rematrix_volume),
AV_OPT_TYPE_FLOAT, {.dbl=1.0 }, -1000 , 1000 , PARAM},
65 {
"rematrix_maxval" ,
"set rematrix maxval" ,
OFFSET(rematrix_maxval),
AV_OPT_TYPE_FLOAT, {.dbl=0.0 }, 0 , 1000 , PARAM},
85 {
"filter_size" ,
"set swr resampling filter size",
OFFSET(filter_size) ,
AV_OPT_TYPE_INT , {.i64=32 }, 0 , INT_MAX , PARAM },
86 {
"phase_shift" ,
"set swr resampling phase shift",
OFFSET(phase_shift) ,
AV_OPT_TYPE_INT , {.i64=10 }, 0 , 24 , PARAM },
87 {
"linear_interp" ,
"enable linear interpolation" ,
OFFSET(linear_interp) ,
AV_OPT_TYPE_BOOL , {.i64=1 }, 0 , 1 , PARAM },
88 {
"exact_rational" ,
"enable exact rational" ,
OFFSET(exact_rational) ,
AV_OPT_TYPE_BOOL , {.i64=1 }, 0 , 1 , PARAM },
97 {
"precision" ,
"set soxr resampling precision (in bits)" 99 {
"cheby" ,
"enable soxr Chebyshev passband & higher-precision irrational ratio approximation" 101 {
"min_comp" ,
"set minimum difference between timestamps and audio data (in seconds) below which no timestamp compensation of either kind is applied" 103 {
"min_hard_comp" ,
"set minimum difference between timestamps and audio data (in seconds) to trigger padding/trimming the data." 105 {
"comp_duration" ,
"set duration (in seconds) over which data is stretched/squeezed to make it match the timestamps." 107 {
"max_soft_comp" ,
"set maximum factor by which data is stretched/squeezed to make it match the timestamps." 109 {
"async" ,
"simplified 1 parameter audio timestamp matching, 0(disabled), 1(filling and trimming), >1(maximum stretch/squeeze in samples per second)" 111 {
"first_pts" ,
"Assume the first pts should be this value (in samples)." 124 {
"kaiser_beta" ,
"set swr Kaiser window beta" ,
OFFSET(kaiser_beta) ,
AV_OPT_TYPE_DOUBLE , {.dbl=9 }, 2 , 16 , PARAM },
126 {
"output_sample_bits" ,
"set swr number of output sample bits",
OFFSET(
dither.output_sample_bits),
AV_OPT_TYPE_INT , {.i64=0 }, 0 , 64 , PARAM },
139 .log_level_offset_offset =
OFFSET(log_level_offset),
140 .parent_log_context_offset =
OFFSET(log_ctx),
const AVClass * av_class
AVClass used for AVOption and av_log()
static const char * context_to_name(void *ptr)
#define LIBAVUTIL_VERSION_INT
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
av_cold struct SwrContext * swr_alloc(void)
Allocate SwrContext.
Blackman Nuttall windowed sinc.
The libswresample context.
static const uint8_t dither[8][8]
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
#define SWR_FLAG_RESAMPLE
Force resampling even if equal sample rate.
static const AVOption options[]
const AVClass * swr_get_class(void)
Get the AVClass for SwrContext.
static const AVClass av_class
Describe the class of an AVClass context structure.
#define AV_NOPTS_VALUE
Undefined timestamp value.