Commit Graph

3238 Commits

Author SHA1 Message Date
Erik de Castro Lopo 0752740d8d src/libFLAC/lpc.c : Fix compiler warning. 2013-09-15 10:29:19 +10:00
Erik de Castro Lopo e07bd181b1 lpc_x86intrin.c : Tweaks.
Include <config.h> before trying to use values defined in that file.
Fix compiler warnings.
2013-09-15 10:29:19 +10:00
Erik de Castro Lopo 5e5ee2720c Adds SSE-accelerated lpc functions.
New functions are:
    FLAC__lpc_compute_autocorrelation_intrin_sse_lag_4()
    FLAC__lpc_compute_autocorrelation_intrin_sse_lag_8()
    FLAC__lpc_compute_autocorrelation_intrin_sse_lag_12()
    FLAC__lpc_compute_autocorrelation_intrin_sse_lag_16()
    FLAC__lpc_compute_residual_from_qlp_coefficients_16_intrin_sse2()

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-15 10:29:19 +10:00
Erik de Castro Lopo 84c3e3d52c Add CPU features (sse3, ssse3) detection code for x86-64.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-15 09:46:20 +10:00
Erik de Castro Lopo b72540b43c configure.ac : Prepare for x86_64 initrinsics based optimisations.
Detect presence of <x86intrin.h> and set FLAC__HAS_X86INTRIN.
Define FLAC__CPU_X86_64 when CPU is x96_64.
2013-09-15 09:42:36 +10:00
Erik de Castro Lopo d11c66ffce bitmath.h : Minor improvements.
This is part of a larger patch from lvqcl.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-08 12:15:57 +10:00
Erik de Castro Lopo ce6832bb62 Move defintion of M_LN2 to include/share/compat.h. 2013-09-07 22:00:23 +10:00
Erik de Castro Lopo c532d34c11 MSVS : Define _USE_MATH_DEFINES.
MSVS does defined the M_LN2 constant in <math.h> but only makes it
visible if _USE_MATH_DEFINES is defined.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-07 22:00:23 +10:00
Erik de Castro Lopo 2e165ec569 Rename win_utf8_io.lib -> win_utf8_io_static.lib.
All MSVS projects that generate .lib files have '_static' suffix in their
names; all but win_utf8_io.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-07 22:00:13 +10:00
Erik de Castro Lopo 58ecf3ae35 MSVS : Fix library output directory.
Fix the output directory for plugin_common_static.vcproj and
test_libs_common_static.vcproj.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-07 21:58:29 +10:00
Erik de Castro Lopo 9e392706c9 MSVS : Add FLAC__ALIGN_MALLOC_DATA definition for MSVS projects.
A preprocessor macro FLAC__ALIGN_MALLOC_DATA is defined in the Makefiles
but absent in *.vcproj files. This patch adds it to libFLAC_static.vcproj
and libFLAC_dynamic.vcproj.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-07 21:58:11 +10:00
Erik de Castro Lopo b250132aa1 src/flac/iffscan.c : Fix typo.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-09-05 19:50:40 +10:00
Erik de Castro Lopo 3ece67d71f include/share/compat.h : Remove deinition of restrict.
Wasn't being used anywhere in the code and clashes with a symbol in
MSVC.

Suggested-by: lvqcl <lvqcl.mail@gmail.com>
2013-09-01 10:32:52 +10:00
Erik de Castro Lopo deb209906c Add ASM function FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_16.
For the 32 bit x86 ASM functions there were already versions of this
function for lags (N = 4, 8, 12). They require lpc_order less than N.
The best compression preset (flac -8) uses lpc_order up to 12; it
means that during encoding FLAC also uses unaccelerated C function.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-08-31 13:53:37 +10:00
Erik de Castro Lopo 740eb68f53 src/libFLAC/cpu.c : Remove MSVC6 only code.
Patch from: lvqcl <lvqcl.mail@gmail.com>
2013-08-26 21:45:19 +10:00
Erik de Castro Lopo 3cea079a2f Fix a couple of NASM warnings.
Suggested by Ozkan Sezer <sezeroz@gmail.com>.
2013-08-13 19:30:24 +10:00
Erik de Castro Lopo 7050033b8f src/libFLAC/ia32/nasm.h : Fix nasm warning on windows.
Patch from Ozkan Sezer <sezeroz@gmail.com>.
2013-08-13 19:30:21 +10:00
Erik de Castro Lopo 1ec41a97da configure.ac : Improve asm optimisation detection.
When compiling for ia32 on an x86_64 kernel, the configure script
was not detecting the ability to do asm optimisations because the
configure script was detecting the x86_64 kernel not the ia32
user space.
2013-08-11 21:46:22 +10:00
Erik de Castro Lopo 5797009fa2 test/test_replaygain.sh : Prefer mawk over gawk.
The AWK script used to generate tones for this test fails with gawk
version 4.0.1, but used to work for earlier versions. Use mawk instead
if it exists.
2013-08-02 06:32:29 +10:00
Erik de Castro Lopo 187e596e4c stream_encoder.c : Improve fix for arithmetic overflow.
Only use the 32 bit accumulator if the input data is 16 bits or less.
2013-08-02 06:21:02 +10:00
Erik de Castro Lopo b01e568698 Split regain play tests into separate script. 2013-08-02 06:19:56 +10:00
Erik de Castro Lopo d06d985487 test/ : Use new --no-error-on-compression-fail option as needed. 2013-08-01 23:02:26 +10:00
Erik de Castro Lopo f742b93bb0 flac: Implement --no-error-on-compression-fail command line option.
This is designed for the test suite where a number of artificially created
files end up bigger than the original.
2013-08-01 22:06:18 +10:00
Erik de Castro Lopo 3418acc1f6 flac : Check compression ratio at end of encode process.
Stash the compression ratio in the EncoderSession struct and at the
end of the encode process, check if its > 1.0. Print an error message
if it is.
2013-07-21 22:10:27 +10:00
Erik de Castro Lopo f34f31dac0 stream_encoder.c : Improve fix for arithmetic overflow.
The previous fix (patch 6f7ec60c) had the undesireable effect of slowing
down encoding speed on 16 bit files where the arithmetic overflow was
less likely to happen.

This fix forces the use of a FLAC__uint64 accumulator for 24 bit files
and restores the use of a FLAC_uint32 accumulator for 16 (and less) bit
files.

Unfortunately, I have not been able to prove to myself that this overflow
*cannot* happen with 16 bit files.
2013-07-21 21:05:31 +10:00
Erik de Castro Lopo dd9460e7a5 Update .gitignore. 2013-07-21 20:12:41 +10:00
Erik de Castro Lopo 552917d9c1 src/share/grabbag/replaygain.c : Fix compiler warnings.
Gcc 4.8 has a new warning about use of un-initialized data. In particular
this new warning can detect if an automatic variable is defined in one function
and then passed to another and used before it is initialized.
2013-07-21 19:58:22 +10:00
Cristian Rodríguez 355f4aae47 Link with -no-undefined regardless of the OS
libFLAC* must never have undefined symbols no matter
what is the target platform.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-07-21 19:51:08 +10:00
Erik de Castro Lopo 33c23b3dfa src/libFLAC/bitwriter.c : Remove dead code. 2013-07-17 20:18:46 +10:00
Erik de Castro Lopo 6f7ec60c7e stream_encoder.c : Fix an arithmetic overflow in the RICE2 partitioner.
For a specific 24 bit WAV file provided by Leigh Dyer

    http://lists.xiph.org/pipermail/flac-dev/2013-July/004284.html

encoding with compression level 7 was generating a file a couple of
orders of magintude larger than the original.

Debugging showed that variable abs_residual_partition_sum (a FLAC__uint32)
in function precompute_partition_info_sums_() was suffering from an
arithmetic overflowing on some 24 bit input files although this value
overflowing did not always cause larger output files.

Since the value abs_residual_partition_sum is eventually stored in an
array of FLAC__uint64, it makes sense to make abs_residual_partition_sum
a FLAC__uint64 anyway.

Debugging this problem was made easier by use of the Clang compiler's
-fsanitize=integer option.
2013-07-17 19:42:12 +10:00
Erik de Castro Lopo cf0277bde9 src/flac/utils.c : Add fflush after printing to stderr.
Patch from: MuldeR <mulder2@gmx.de>
2013-06-17 17:57:09 +10:00
Miroslav Lichvar 4eab6313cd Disable FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap.
Don't use the assembly function since it seems to be slower than
the current version of FLAC__bitreader_read_rice_signed_block.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-06-06 19:57:21 +10:00
Miroslav Lichvar 606fdfcaec metaflac : Fix local_strcat() to terminate string correctly.
The NUL char is written at incorrect place when the destination string
is longer than 0, which causes memory corruption. It was broken by
commit 2d6354ff2a.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-06-05 18:50:42 +10:00
Cristian Rodríguez d42c04260b Add missing config.h includes
All C and C++ files must include config.h

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-06-05 18:50:17 +10:00
Erik de Castro Lopo 21a70169f8 XMMS plugin : Fix symbol visibility.
FLAC now defaults to building with -fvisibility=hidden on GCC4-ELF
platforms.  This breaks the XMMS plugin.  At least get_iplugin_info()
needs to be externally visible.

Patch from Christian Weisgerber <naddy@mips.inka.de>
2013-06-05 18:48:25 +10:00
Erik de Castro Lopo c7957b2b54 test/*.sh : Fix MALLOC_PERTURB initialization.
Was using '$(date +%N)', but that doesn't work on OSX or *BSD. Switched
to using '$(date +%s)'.
2013-05-27 19:23:42 +10:00
Ulrich Klauer bd4af7e57b README : Update version number
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 18:10:31 +10:00
Ulrich Klauer cd4ddabe0f Language fix: "difference licenses"
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 18:08:57 +10:00
Dagobert Michelsen 5999d81f0e Use location of TIOCGWINSZ from autoconf manual
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 18:06:56 +10:00
Dagobert Michelsen 349c6adcf7 Sun Studio can not include static function from extern inline
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 18:06:51 +10:00
Ulrich Klauer 0196c0f44c Properly close HTML comments
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 06:42:43 +10:00
Ulrich Klauer 5a01bf17dd src/flac/main.c : Fix copyright notice
There is no copyright for 2010, so "2000-2013" should not be used.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 06:42:16 +10:00
Ulrich Klauer 2bce0d60fe Declare UTF-8 encoding for changelog
The changelog declared "charset=ISO-8859-1", but used a UTF-8 encoded
name. Change the declaration to UTF-8 to fix this.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 06:41:17 +10:00
Xiyue Deng b09ee0177c Fix bootstrap on Mac OS X
* Mac OS X has incomplete installations of gettext/iconv. So stop
  checking for gettext command on Darwin, and install some additional m4
  scripts so it can be bootstrapped on Mac OS X.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-27 06:20:08 +10:00
Erik de Castro Lopo b1982fbc5f Set version to 1.3.0 and update coyprights throughout. 2013-05-26 19:17:53 +10:00
Ulrich Klauer d672efaa05 Fix gcc version check for private macros
Use Benjamin Stiglitz' MIN macros from gcc 4.3 (according to the
changelog, __COUNTER__ was introduced in this version). Previously,
the macros weren't used on any existing gcc version; the first one
would have been 5.5.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-26 08:26:45 +10:00
Robert Kausch 411ba53c7b bitwriter.c : Add missing "extern" declaration
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-26 07:42:22 +10:00
Robert Kausch bb79a59a9f Fix mistyped variable name
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-26 07:42:19 +10:00
Ulrich Klauer c9f05ed210 Correctly initialize FLAC_API_SUPPORTS_OGG_FLAC
Commits a7e3705d05 and
a4c321e492, while trying to simplify how
the FLAC_API_SUPPORTS_OGG_FLAC global variable was initialized,
inadvertently caused it to be always set to false, whether Ogg support
was compiled in or not.

This commit reverts the relevant part to how it looked in the 1.2.1
release, which is verbose but correct.

The problem was found by Robert Kausch <robert.kausch@freac.org>.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-05-26 07:42:13 +10:00
Erik de Castro Lopo d2122a0725 changelog.html : Added entries about RICE2 residue coding method. 2013-05-25 17:51:17 +10:00