Old code was for the Intel compiler, had no appreciable performance benefits
and doesn't actually work with current version of that compiler.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
When decoding, read the contents of the WAVEFORMATEXTENSIBLE_CHANNEL_MASK
tag and write write the channel mask to the WAV file.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
These were most arising from -Wenum-conversion where an enum of
one type was being assigned to a variable on another.
Originally reported by Lenny Maiorani <lenny@colorado.edu> on the
flac-dev mailing list.
Includes:
* Replace 'CALLBACK' with 'WINAPI' because the signature of an unhandled
exception filter uses 'WINAPI'.
* Improvements to OS SSE testing code.
* Improvements to GCC asm code.
* Comment fixes.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Previously if a zero length string was passed in, the pointer would be
stored regardless of the copy parameter. If the original source pointer
was reassigned to something else bad things could happen.
Closes: https://sourceforge.net/p/flac/bugs/377/
This reverts commit 70b078cfd5.
The code in the patch we're reverting probably only works for one
compiler and could easily stop working with the next release of
that compiler.
The x86 FPU holds intermediate results in larger registers than what
the SSE unit uses, resulting in slighlty different encodings of audio
data. Attempt to fix this by modifying libFLAC/lpc.c to store calculation
results in a FLAC__read before adding it to a sum.
At the moment this works, but I could easily imagine a new version of
the compiler optimising this store to the FLAC__real away leaving us
in the same situation we have now.
Patch-from: Oliver Stöneberg on sourceforge.net
Closes: https://sourceforge.net/p/flac/bugs/409/
CPU detection used to depend on ASM code. Now CPU features are
also detected when only FLAC__HAS_X86INTRIN is defined.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
More thorough en-/decoding tests show that sometimes the functions
that use intrinsics are slower (or not really faster) than old
plain C functions.
After this patch the encoder doesn't use these new functions
when their usefulness is questionable.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Typo in the conditional to check the exit condition in ascii_strcasecmp.
It checks for (!*s1 || !*s1) instead of (!*s1 || !*s2). The typo did
not affect the result of the function as the loop is exited before
changing s1 or s2 anyway.
The problem was found by cppcheck which is run automatically on the
Debian sources. Results here:
http://cppcheck.sourceforge.net/devinfo/daca2-cppcheck1.63/daca2.html
Patch-from: Robert Kausch <robert.kausch@freac.org>
MSVS profiler shows that the encoder spends too much time inside format_input()
when the input is 24-bit. Increases encoding speed:
FLAC -5: from 27.1 to 24.2 seconds
FLAC -8: from 76.2 to 73.1 seconds
(MSVS 2010, 32-bit flac.exe, 24-bit stereo input file)
For GCC compiles the encoding speed remains the same. I suspect that GCC is
smart enough to use strict aliasing rule to optimize the code, and MSVS doesn't
even know about it.
Path-from: lvqcl <lvqcl.mail@gmail.com>
The new functions are analogous to FLAC__lpc_restore_signal_asm_ia32_mmx.
FLAC uses them for x86-64 arch and also for ia32 if NASM is not available.
Patch-from: lvqcl <lvqcl.mail@gmail.com>