History

avfilter/af_dynaudnorm: add more descriptive aliases for options

Paul B Mahol committed 7 years ago

Commit 73afea31 parent a081a6d2 files · +27 −18Browse files

Unified · Split

2 files
  1. doc/filters.texi +9 −9
  2. libavfilter/af_dynaudnorm.c +18 −9
doc/filters.texi+9−9
@@ -3135,7 +3135,7 @@ this goal *without* applying "dynamic range compressing". It will retain 100% · 3134 unmodified lines
31353135 of the dynamic range *within* each section of the audio file.
31363136
31373137 @table @option
3138−@item f
3138+@item framelen, f
31393139 Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
31403140 Default is 500 milliseconds.
31413141 The Dynamic Audio Normalizer processes the input audio in small chunks,
@@ -3150,7 +3150,7 @@ been found to give good results with most files. · 8 unmodified lines
31503150 Note that the exact frame length, in number of samples, will be determined
31513151 automatically, based on the sampling rate of the individual input audio file.
31523152
3153−@item g
3153+@item gausssize, g
31543154 Set the Gaussian filter window size. In range from 3 to 301, must be odd
31553155 number. Default is 31.
31563156 Probably the most important parameter of the Dynamic Audio Normalizer is the
@@ -3167,7 +3167,7 @@ Normalizer will behave like a "traditional" normalization filter. On the · 10 unmodified lines
31673167 contrary, the more you decrease this value, the more the Dynamic Audio
31683168 Normalizer will behave like a dynamic range compressor.
31693169
3170−@item p
3170+@item peak, p
31713171 Set the target peak value. This specifies the highest permissible magnitude
31723172 level for the normalized audio input. This filter will try to approach the
31733173 target peak magnitude as closely as possible, but at the same time it also
@@ -3176,7 +3176,7 @@ A frame's maximum local gain factor is imposed directly by the target peak · 2 unmodified lines
31763176 magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
31773177 It is not recommended to go above this value.
31783178
3179−@item m
3179+@item maxgain, m
31803180 Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
31813181 The Dynamic Audio Normalizer determines the maximum possible (local) gain
31823182 factor for each input frame, i.e. the maximum gain factor that does not
@@ -3194,7 +3194,7 @@ Instead, a "sigmoid" threshold function will be applied. This way, the · 11 unmodified lines
31943194 gain factors will smoothly approach the threshold value, but never exceed that
31953195 value.
31963196
3197−@item r
3197+@item targetrms, r
31983198 Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
31993199 By default, the Dynamic Audio Normalizer performs "peak" normalization.
32003200 This means that the maximum local gain factor for each frame is defined
@@ -3212,7 +3212,7 @@ factor is defined as the factor that would result in exactly that RMS value. · 11 unmodified lines
32123212 Note, however, that the maximum local gain factor is still restricted by the
32133213 frame's highest magnitude sample, in order to prevent clipping.
32143214
3215−@item n
3215+@item coupling, n
32163216 Enable channels coupling. By default is enabled.
32173217 By default, the Dynamic Audio Normalizer will amplify all channels by the same
32183218 amount. This means the same gain factor will be applied to all channels, i.e.
@@ -3224,7 +3224,7 @@ the gain factor will be determined independently for each channel, depending · 5 unmodified lines
32243224 only on the individual channel's highest magnitude sample. This allows for
32253225 harmonizing the volume of the different channels.
32263226
3227−@item c
3227+@item correctdc, c
32283228 Enable DC bias correction. By default is disabled.
32293229 An audio signal (in the time domain) is a sequence of sample values.
32303230 In the Dynamic Audio Normalizer these sample values are represented in the
@@ -3243,7 +3243,7 @@ are centered around 0.0 again. Also, in order to avoid "gaps" at the frame · 12 unmodified lines
32433243 boundaries, the DC correction offset values will be interpolated smoothly
32443244 between neighbouring frames.
32453245
3246−@item b
3246+@item altboundary, b
32473247 Enable alternative boundary mode. By default is disabled.
32483248 The Dynamic Audio Normalizer takes into account a certain neighbourhood
32493249 around each frame. This includes the preceding frames as well as the
@@ -3258,7 +3258,7 @@ to deal with this situation. The default boundary mode assumes a gain factor · 8 unmodified lines
32583258 of exactly 1.0 for the missing frames, resulting in a smooth "fade in" and
32593259 "fade out" at the beginning and at the end of the input, respectively.
32603260
3261−@item s
3261+@item compress, s
32623262 Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
32633263 By default, the Dynamic Audio Normalizer does not apply "traditional"
32643264 compression. This means that signal peaks will not be pruned and thus the
libavfilter/af_dynaudnorm.c+18−9
@@ -82,15 +82,24 @@ typedef struct DynamicAudioNormalizerContext { · 81 unmodified lines
8282 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
8383
8484 static const AVOption dynaudnorm_options[] = {
85− { "f", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },
86− { "g", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },
87− { "p", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },
88− { "m", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },
89− { "r", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },
90− { "n", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
91− { "c", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
92− { "b", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
93− { "s", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },
85+ { "framelen", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },
86+ { "f", "set the frame length in msec", OFFSET(frame_len_msec), AV_OPT_TYPE_INT, {.i64 = 500}, 10, 8000, FLAGS },
87+ { "gausssize", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },
88+ { "g", "set the filter size", OFFSET(filter_size), AV_OPT_TYPE_INT, {.i64 = 31}, 3, 301, FLAGS },
89+ { "peak", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },
90+ { "p", "set the peak value", OFFSET(peak_value), AV_OPT_TYPE_DOUBLE, {.dbl = 0.95}, 0.0, 1.0, FLAGS },
91+ { "maxgain", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },
92+ { "m", "set the max amplification", OFFSET(max_amplification), AV_OPT_TYPE_DOUBLE, {.dbl = 10.0}, 1.0, 100.0, FLAGS },
93+ { "targetrms", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },
94+ { "r", "set the target RMS", OFFSET(target_rms), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 1.0, FLAGS },
95+ { "coupling", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
96+ { "n", "set channel coupling", OFFSET(channels_coupled), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
97+ { "correctdc", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
98+ { "c", "set DC correction", OFFSET(dc_correction), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
99+ { "altboundary", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
100+ { "b", "set alternative boundary mode", OFFSET(alt_boundary_mode), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS },
101+ { "compress", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },
102+ { "s", "set the compress factor", OFFSET(compress_factor), AV_OPT_TYPE_DOUBLE, {.dbl = 0.0}, 0.0, 30.0, FLAGS },
94103 { NULL }
95104 };
96105

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t