Commit Graph

95 Commits

Author SHA1 Message Date
Thomas Zander
e5498e87ea Retire FLAC__float and FLAC__double types
Usage of internal aliases for float and double do not provide
substantial value. For integer-only libs, the macro
FLAC__INTEGER_ONLY_LIBRARY is used in the appropriate places
already.

Also, adapt copyright messages to include 2016.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/10
2016-02-09 06:50:27 +11:00
Erik de Castro Lopo
2902974830 libFLAC/lpc.c: Fix comments
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-24 08:12:59 +11:00
Thomas Zander
93c3a3897e Cleanup FLAC__bitmath_silog2()
- Retire 32bit variant of silog2(), since only the _wide variant is used
- Rename FLAC__bitmath_silog2_wide() to FLAC__bitmath_silog2()
- Replace existing implementation by shorter, clearer implementation
  using optimised routines from bitmath.h
- Update Copyright string to 2016 in changed files

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/6
2016-01-04 13:22:34 +11:00
Erik de Castro Lopo
0a0e5363ad libFLAC: Tweak MSVC support
Visual Studio 2013 and newer has better support for C99.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2016-01-04 10:31:18 +11:00
Erik de Castro Lopo
e4399a02ae Whitespace only
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2015-12-25 09:39:34 +11:00
Erik de Castro Lopo
ef9f7998fd src/libFLAC/lpc.c : Restore missing conditional.
Git commit 9c2290ade5 in-correctly removed a conditional around
an fprintf. Thanks to mark4o on #xiph (freenode) for reporting
this.
2015-03-31 10:14:17 +11:00
Martijn van Beurden
c97e057ee5 Improve LPC order guess
The recent compression preset retuning improved upon most material
but it the few tracks that show regression are usually classical
music. This patch improves compression by improving the LPC order
guess, of which classical music benefits most.

Improvement is 0.007% on average but up to 0.1%. I haven't seen
regressions for any of my test samples.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2014-12-05 05:50:24 +11:00
Erik de Castro Lopo
1437391577 Update copyright years to include 2014. 2014-11-25 13:04:30 +11:00
Erik de Castro Lopo
46bedb58d3 Update URLs as nedeed.
Sourceforge.net links updated as nedeed with some of them
being changed to point to xiph.org/flac.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-06-28 09:12:45 +10:00
Erik de Castro Lopo
987f74ae7a Correections for comments.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-06-28 09:10:32 +10:00
Erik de Castro Lopo
d456cdd28a Suppress MSVS warnings when compiling for x86-64.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
2014-04-11 06:18:52 +10:00
Erik de Castro Lopo
006b8356d5 Fix all instances of '#if HAVE_CONFIG_H'.
Should be '#ifdef HAVE_CONFIG_H'.

Closes: https://sourceforge.net/p/flac/bugs/410/
2014-03-24 12:06:49 +11:00
Erik de Castro Lopo
697dbdee8f Revert "Attempt to fix differences between x86 FPU and SSE calculations."
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.
2014-03-23 19:58:44 +11:00
Erik de Castro Lopo
70b078cfd5 Attempt to fix differences between x86 FPU and SSE calculations.
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/
2014-03-21 19:26:08 +11:00
Erik de Castro Lopo
cf28c0144b Adds use of restrict keyword to improve encoding speed.
Restrict works very poorly in Visual Studio (much slower than without)
so defined flac_restrict in share/compat.h and use that in:

    lpc_compute_residual...()
    lpc_restore_signal...()

As a result, FLAC__lpc_compute_residual_from_qlp_coefficients_wide_intrin_sse41()
offers no advantage for 64-bit compiles and was removed from x86-64 part
of stream_encoder.c

Patch-from: lvqcl <lvqcl.mail@gmail.com>
2013-10-10 18:24:19 +11:00
Erik de Castro Lopo
0752740d8d src/libFLAC/lpc.c : Fix compiler warning. 2013-09-15 10:29:19 +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
b1982fbc5f Set version to 1.3.0 and update coyprights throughout. 2013-05-26 19:17:53 +10:00
Erik de Castro Lopo
ae7eda1815 Rename all parameters and locals from 'index' to 'indx'. 2013-04-05 20:21:22 +11:00
Erik de Castro Lopo
a4c321e492 Large patch from Ben Allison fixing the MSVC build.
Patch tweaked a little to fix Linux build and clean up minor problems.
2013-03-06 22:17:51 +11:00
Erik de Castro Lopo
fb13acc457 Revert parts of 96d081c1 that touched source code or autotools files. 2013-01-03 06:25:21 +11:00
Hendricks266
96d081c1c9 Fix building with MSYS and MinGW(-w64); Improve Makefile.lite build system
This is a patch to allow building of the project using MSYS, MinGW, and MinGW-w64 with the following invocation:

make -f Makefile.lite libFLAC libFLAC++ flac metaflac test_libs_common test_libFLAC test_libFLAC++ test_grabbag test_seeking test_streams utils examples

This patch addresses eight points:
1. `uname -p` in MSYS returns "unknown" so we must use `gcc -dumpmachine` to gain information about the target, 32-bit or 64-bit.
2. MinGW-w64 does not ship with a working iconv.h, so we must disable it under this specific compiler.
3. The code requires <inttypes.h> in a handful of C files, but config.mk did not contain -DHAVE_INTTYPES_H, which under the full build process (I assume) is added by autoconf.
4. The compiler complained when lround() in lpc.c was static, so it is no longer static.
5. Additional scattered linking directives (and reordering) (particularly FLAC, grabbag, and replaygain_analysis) were necessary to build some of the components.
6. The Makefile.lite build system benefited from some cleanup, particularly by rigorously defining all entries, factoring redundancy, and establishing dependencies. (Some typos were fixed too.)
7. Shared objects on Windows use .dll, not .so. (Added *.dll, *.dylib, and *.exe to .gitignore.)
8. To allow more freedom using Makefile.lite without configure, I added the variables USE_OGG and USE_ICONV which can toggle these two components in the build process.
ex: make -f Makefile.lite examples USE_OGG=0 USE_ICONV=0

These improvements make use of some use-time Makefile variable expansion.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2013-01-02 21:35:47 +11:00
Erik de Castro Lopo
fc360735ce Fix a regression that severely impacted compression levels.
Regression was introducted in commit 8bbbf56403
(Feb 1 19:58:09 2012) when fixing compiler warnings. In src/libFLAC/lpc.c the
line:

        ref[i] = (r/=err);

was erroniously removed because the left hand side, ref[i] was never used.
Obviously, the correct thing to do was to replace that line with:

        r /= err;

This code has not been officially released. The only people who would have
been affected are people who compiled FLAC from git between February and
now.

The only adverse affect of this error was that compression ratio would have
been severely compromised. No audio is lost, and if anyone has a file that
compressed with a bad version of FLAC can decompress it to WAV and then
re-compress with a fixed version.
2012-10-12 22:02:49 +11:00
Erik de Castro Lopo
155719b470 src/libFLAC/lpc.c : Include <inttypes.h> so compiling debug version works. 2012-05-08 19:23:08 +10:00
Cristian Rodríguez
9b7cb22f84 Update and improve autotools build
- INCLUDES is deprecated, and CPPFLAGS is an user-defined
  variable, use the proper AM_CPPFLAGS instead

- Remove FLAC__INLINE definition, providing proper
  replacement for MSVC compilers.

- Detect if we have C99 's lround and provide a replacement
  for windows...
2012-04-08 09:03:03 +10:00
Erik de Castro Lopo
9c2290ade5 Fix more printf formatting issues and remove un-necessary casts. 2012-02-01 21:46:35 +11:00
Erik de Castro Lopo
8bbbf56403 Fix compiler warnings. 2012-02-01 19:58:09 +11:00
Josh Coalson
dea0f5a044 add 2009 copyright 2009-01-07 07:31:28 +00:00
Josh Coalson
c9ed238c3d Allow MM:SS:FF and MM:SS.SS time formats in non-CD-DA cuesheets (SF#1947353, SF#2182432: https://sourceforge.net/tracker2/?func=detail&aid=1947353&group_id=13478&atid=363478 https://sourceforge.net/tracker2/index.php?func=detail&aid=2182432&group_id=13478&atid=113478) 2009-01-07 07:03:17 +00:00
Josh Coalson
82b128050e update copyright for 2008 2008-02-28 05:34:21 +00:00
Josh Coalson
ab4bef6a8a 64-bit fixes (SF#1790872: https://sourceforge.net/tracker/index.php?func=detail&aid=1790872&group_id=13478&atid=113478) 2007-09-08 22:28:09 +00:00
Josh Coalson
d04ddf8b26 add #define FLAC__LPC_UNROLLED_FILTER_LOOPS for easier selection of filter implementation 2007-07-11 04:15:18 +00:00
Josh Coalson
5f11406281 fix bug with negative indexing 2007-06-14 06:21:44 +00:00
Josh Coalson
4a040f6b8a window the integer_signal instead of real_signal, remove unused real_signal from datapath 2007-04-04 00:59:28 +00:00
Josh Coalson
55e2f0b661 unroll loops in filter and inverse filter routines 2007-03-13 06:33:52 +00:00
Josh Coalson
715e63cb5f stop using lround() for now 2007-02-09 16:12:20 +00:00
Josh Coalson
9047139ee3 MSVC workarounds 2007-02-04 19:45:44 +00:00
Josh Coalson
ddd0d51137 in FLAC__lpc_quantize_coefficients(), clip shift to max_shiftlimit 2007-02-04 04:18:55 +00:00
Josh Coalson
db3a0e78e3 add workaround for lack of lround() on MSVC 2007-02-04 02:58:22 +00:00
Josh Coalson
67e5d6d41b minor syntax 2007-02-03 02:53:29 +00:00
Josh Coalson
e74bd9516c add 2007 copyright 2007-02-02 06:58:19 +00:00
Josh Coalson
0486d4352a add dithering to lp coeff quantization 2007-02-02 06:14:41 +00:00
Josh Coalson
76ba93a4ee minor comments 2007-01-28 17:37:55 +00:00
Josh Coalson
32b9baedb4 quick fix for SF#1601812 where an error of exactly 0 (very rare) in FLAC__lpc_compute_lp_coefficients() could cause an infinite loop later in FLAC__lpc_quantize_coefficients() 2006-11-27 16:27:41 +00:00
Josh Coalson
7581d121c1 patch: support for borland c++ compile (SF#1599018: http://sourceforge.net/tracker/index.php?func=detail&aid=1599018&group_id=13478&atid=313478) 2006-11-20 07:19:15 +00:00
Josh Coalson
ab56ef11b8 fixes from 64-bit compile 2006-11-17 06:52:19 +00:00
Josh Coalson
b1ec796bda complete largefile support 2006-05-24 04:41:36 +00:00
Josh Coalson
6e2b5659c1 fix a calcuation bug in FLAC__lpc_compute_best_order() 2006-04-28 00:11:31 +00:00
Josh Coalson
0395dac13f add 2206 to copyright notice 2006-04-25 06:59:33 +00:00