mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
libavresample: add mix level normalization option
Provides an option to disable mix level normalization Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
parent
11928d24fe
commit
4cf4028331
@ -335,7 +335,9 @@ int ff_audio_mix_init(AVAudioResampleContext *avr)
|
||||
avr->out_channel_layout,
|
||||
avr->center_mix_level,
|
||||
avr->surround_mix_level,
|
||||
avr->lfe_mix_level, 1, matrix_dbl,
|
||||
avr->lfe_mix_level,
|
||||
avr->normalize_mix_level,
|
||||
matrix_dbl,
|
||||
avr->in_channels,
|
||||
avr->matrix_encoding);
|
||||
if (ret < 0) {
|
||||
|
@ -45,6 +45,7 @@ struct AVAudioResampleContext {
|
||||
double center_mix_level; /**< center mix level */
|
||||
double surround_mix_level; /**< surround mix level */
|
||||
double lfe_mix_level; /**< lfe mix level */
|
||||
int normalize_mix_level; /**< enable mix level normalization */
|
||||
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 */
|
||||
|
@ -47,6 +47,7 @@ static const AVOption options[] = {
|
||||
{ "center_mix_level", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM },
|
||||
{ "surround_mix_level", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM },
|
||||
{ "lfe_mix_level", "LFE Mix Level", OFFSET(lfe_mix_level), AV_OPT_TYPE_DOUBLE, { 0.0 }, -32.0, 32.0, PARAM },
|
||||
{ "normalize_mix_level", "Normalize Mix Level", OFFSET(normalize_mix_level), AV_OPT_TYPE_INT, { 1 }, 0, 1, PARAM },
|
||||
{ "force_resampling", "Force Resampling", OFFSET(force_resampling), AV_OPT_TYPE_INT, { 0 }, 0, 1, PARAM },
|
||||
{ "filter_size", "Resampling Filter Size", OFFSET(filter_size), AV_OPT_TYPE_INT, { 16 }, 0, 32, /* ??? */ PARAM },
|
||||
{ "phase_shift", "Resampling Phase Shift", OFFSET(phase_shift), AV_OPT_TYPE_INT, { 10 }, 0, 30, /* ??? */ PARAM },
|
||||
|
Loading…
Reference in New Issue
Block a user