mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Add partial_tukey and punchout_tukey apodization functions
Adds two new apodization functions that seem to perform better than the apodization functions currently in the codebase and fixes three existing windows as well. Its important to note that this patch only affects the encoder stage that evaluates various possible predictors. Audio encoded with these new windows will still decode with existing legacy decoders. = Theory = These functions are used to window the audio data at the predictor stage. These news functions enable the use of only part of the signal to generate a predictor. This helps because short transients can introduce noise into the predictor. The predictor becomes very good at prediciting one part of the signal, instead of mediocre for the whole block. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
committed by
Erik de Castro Lopo
parent
ffa55423e0
commit
29a28338c3
@@ -852,10 +852,11 @@
|
||||
<span class="argument">-A "function"</span>, <span class="argument">--apodization="function"</span>
|
||||
</td>
|
||||
<td>
|
||||
Window audio data with given the apodization function. The functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), welch.<br />
|
||||
Window audio data with given the apodization function. The functions are: bartlett, bartlett_hann, blackman, blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming, hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P), partial_tukey(n[/ov[/P]]), punchout_tukey(n[/ov[/P]]), welch.<br />
|
||||
For gauss(STDDEV), STDDEV is the standard deviation (0<STDDEV<=0.5).<br />
|
||||
For tukey(P), P specifies the fraction of the window that is tapered (0<=P<=1; P=0 corresponds to "rectangle" and P=1 corresponds to "hann").<br />
|
||||
Please note that for both P as well as STDDEV, the use of a point or comma as decimal separator is locale-dependent.<br />
|
||||
For partial_tukey(n) and punchout_tukey(n), n apodization functions are added that span different parts of each block. Values of 2 to 6 seem to yield sane results. If necessary, an overlap can be specified, as can be the taper parameter, for example partial_tukey(2/0.2) or partial_tukey(2/0.2/0.5). ov should be smaller than 1 and can be negative.<br />
|
||||
Please note that P, STDDEV and ov are locale specific, so a comma as decimal separator might be required instead of a dot.<br />
|
||||
More than one -A option (up to 32) may be used. Any function that is specified erroneously is silently dropped. The encoder chooses suitable defaults in the absence of any -A options; any -A option specified replaces the default(s).<br />
|
||||
When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe. Multiple functions can greatly increase the encoding time.<br />
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user