35 #define OFFSET(x) offsetof(AVAudioResampleContext, x) 36 #define PARAM AV_OPT_FLAG_AUDIO_PARAM 39 {
"in_channel_layout",
"Input Channel Layout",
OFFSET(in_channel_layout),
AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX,
PARAM },
41 {
"in_sample_rate",
"Input Sample Rate",
OFFSET(in_sample_rate),
AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM },
42 {
"out_channel_layout",
"Output Channel Layout",
OFFSET(out_channel_layout),
AV_OPT_TYPE_INT64, { .i64 = 0 }, INT64_MIN, INT64_MAX, PARAM },
44 {
"out_sample_rate",
"Output Sample Rate",
OFFSET(out_sample_rate),
AV_OPT_TYPE_INT, { .i64 = 48000 }, 1, INT_MAX, PARAM },
63 {
"normalize_mix_level",
"Normalize Mix Level",
OFFSET(normalize_mix_level),
AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, PARAM },
64 {
"force_resampling",
"Force Resampling",
OFFSET(force_resampling),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM },
65 {
"filter_size",
"Resampling Filter Size",
OFFSET(filter_size),
AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 32, PARAM },
66 {
"phase_shift",
"Resampling Phase Shift",
OFFSET(phase_shift),
AV_OPT_TYPE_INT, { .i64 = 10 }, 0, 30, PARAM },
67 {
"linear_interp",
"Use Linear Interpolation",
OFFSET(linear_interp),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, PARAM },
70 {
"resample_cutoff",
"Cutoff Frequency Ratio",
OFFSET(cutoff),
AV_OPT_TYPE_DOUBLE, { .dbl = 0.8 }, 0.0, 1.0, PARAM },
79 {
"kaiser_beta",
"Kaiser Window Beta",
OFFSET(kaiser_beta),
AV_OPT_TYPE_INT, { .i64 = 9 }, 2, 16, PARAM },
AV_RESAMPLE_DITHER_TRIANGULAR_HP
Triangular Dither with High Pass.
Number of sample formats. DO NOT USE if linking dynamically.
#define LIBAVUTIL_VERSION_INT
Memory handling functions.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
const char * av_default_item_name(void *ptr)
Return the context name.
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_MIX_COEFF_TYPE_NB
floating-point
AV_RESAMPLE_DITHER_NONE
Do not use dithering.
AV_RESAMPLE_DITHER_TRIANGULAR_NS
Triangular Dither with Noise Shaping.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL
Blackman Nuttall Windowed Sinc.
AV_RESAMPLE_DITHER_NB
Number of dither types.
const AVClass * avresample_get_class(void)
const AVClass * av_class
AVClass for logging and AVOptions.
static const AVOption avresample_options[]
Describe the class of an AVClass context structure.
AV_RESAMPLE_FILTER_TYPE_CUBIC
Cubic.
AVAudioResampleContext * avresample_alloc_context(void)
static const AVClass av_resample_context_class
AV_RESAMPLE_DITHER_RECTANGULAR
Rectangular Dither.
AV_RESAMPLE_FILTER_TYPE_KAISER
Kaiser Windowed Sinc.
AV_MIX_COEFF_TYPE_FLT
32-bit 17.15 fixed-point
AV_RESAMPLE_DITHER_TRIANGULAR
Triangular Dither.
AV_MIX_COEFF_TYPE_Q15
16-bit 8.8 fixed-point