[flac-dev] Fix and question apodization functions

Martijn van Beurden
Fri, 01 Aug 2014 17:51:00 -0000

Hi,

I was doing some speed and compression comparisons with various
apodization/windowing functions, and found out that the
definitions for the bartlett and bartlett_hann window in the
FLAC codebase have been wrong since their introduction. The
attached patch fixes that.

Furthermore, I found some peculiar behaviour of the gauss
apodization that seems to expose bug. Using different windows
does usually not change the encoding speed (only the number of
them), but when I use -A gauss(0,05) (or gauss(0.05), it's
locale-specific), the encoding time doubles. It seems to be when
using STDDEV parameters between 0.1 and 0.01. This is also the
case when using FLAC 1.3.0.

I used gprof to check and it seems that the time spend in the
function FLAC__lpc_compute_autocorrelation_intrin_sse_lag_16
increases 20-fold while the number of calls stays the same.
Could this be a bug?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-apodization-functions.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available