summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* SIMD: Accelerate decoding of 16 bit FLACErik de Castro Lopo2017-02-193-0/+198
| | | | | | | | | | | | This patch removes FLAC__lpc_restore_signal_16_intrin_sse2(). It's faster than C code, but not faster than MMX-accelerated ASM functions. It's also slower than the new SSE4.1 functions that were added by the previous patch. So this function wasn't very useful before, and now it's even less useful. I don't see a reason to keep it. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* SIMD: Improve decoding of some 24 bit filesErik de Castro Lopo2017-02-191-36/+57
| | | | | | | | | | Accelerates decoding of non-Subset 24-bit FLAC files (where lpc_order > 12). The improved function is FLAC__lpc_restore_signal_wide_intrin_sse41(). It requires SSE4.1 and it's used only by 32-bit libFLAC. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* SIMD: Add const qualifier where appropriateErik de Castro Lopo2017-02-193-8/+8
| | | | Patch-from: lvqcl <lvqcl.mail@gmail.com>
* cpu.h: Another CPP fixupErik de Castro Lopo2017-02-191-45/+46
| | | | | CPP is minefield. We should simplify CPP wherever possible and work to minimise nesting.
* cpu.h: Fix compiler detectionErik de Castro Lopo2017-02-151-2/+2
| | | | | | GCC version 4.6 was throwing an error on `__has_attribute` which seems to be Clang specific. Solution was to un-nest the CPP code so that Clang is confirmed before the `__has_attribute` is hit.
* flac/encode.c: Fix an integer overflowErik de Castro Lopo2017-02-141-3/+3
| | | | | | | | | | | | | When encoding a 24 bit multichannel W64 file on a 32 bit system, a calculation could overflow resulting in a "got partial sample" error and early termination of the encoding process. The fix was to replace the cast to `size_t` (which is only 32 bits on a 32 bit system) with a cast to `uin64_t`. Thanks to Janne Hyvärinen for helping to track down the problem. Closes: https://sourceforge.net/p/flac/bugs/453
* cpu.h: Add #defines so Clang compiles AVX2Erik de Castro Lopo2017-02-121-4/+21
| | | | Patch-from: <lvqcl.mail@gmail.com>
* Fix compile with cygwinRosen Penev2017-02-093-13/+1
| | | | | | | | | The underscores are wrong. The comment is also correct. Also remove the configure.ac option. Otherwise it tries to compile the windows unicode stuff which POSIX(cygwin) does not understand. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* libFLAC/lpc_intrin_sse41.c: Change usage of _mm_alignr_epi8Erik de Castro Lopo2017-01-311-123/+88
| | | | | | | | | | | | Replace a = _mm_alignr_epi8(b, a, n); with a = _mm_alignr_epi8(a, b, n); The resulting code is very slightly faster and the binaries slightly smaller. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* libFLAC/lpc_intrin_sse*: Formatting cleanupErik de Castro Lopo2017-01-312-11/+9
| | | | Patch-from: lvqcl <lvqcl.mail@gmail.com>
* FLAC__stream_encoder_finish: Sanity improvementErik de Castro Lopo2017-01-301-1/+3
| | | | | | Previously this function would abort or crash if passed `NULL` for the encoder. Now it just returns without crashing or aborting which is far more sane behaviour (ie much like FLAC__stream_encoder_delete).
* Do not override CFLAGS, as CFLAGS is a user flag.David Seifert2017-01-197-29/+15
| | | | | | | | | * Furthermore, use NDEBUG globally to detect the presence of building with more debug output information. AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays Gnome has also switched to it from its own custom solution. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Fix cppcheck warningsRosen Penev2017-01-196-15/+15
| | | | Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* share/utf8/charset.c: Cleanup realloc() usageErik de Castro Lopo2017-01-191-3/+5
| | | | | | This version should be logically identical to the previous version but prevents a false-positive from the cppcheck static analysis tool.
* stdint.h fixes for MSVS 2005/2008Erik de Castro Lopo2017-01-1922-0/+44
| | | | | | | This adds a new msvc2005_int.h header file which is "force included" as needed by the MSVS project file. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* getopt.c: Pointer comparison fixErik de Castro Lopo2017-01-171-4/+2
| | | | | | | * Remove <stdint.h> because MSVC 2005 (and probably 2008) don't have it. * Fix pointer difference caclulation between `nameend` and `nextchar`. Patch-from: lvqcl <lvqcl.mail@gmail.com>
* Only compile and run tests when running 'make check'David Seifert2017-01-176-6/+6
| | | | Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Final unsigned fixesErik de Castro Lopo2017-01-161-4/+4
| | | | Found using the Makefile.lite build system.
* Yet more unsigned fixesErik de Castro Lopo2017-01-162-3/+3
|
* bitmath.h: MSVS unsigned fixErik de Castro Lopo2017-01-151-4/+4
| | | | | | | The orignal code had `unsigned long` inside `#ifdef MSVC`. It was then changed to `uint64_t` which was incorrect because on Windows `sizze long == 4`. Change it now to `uint32_t` which is always correct regardless of OS, compiler or architecture.
* libFLAC/cpu.c: Replace memory.h include with string.hsezero2017-01-151-1/+1
| | | | | | cpu.c was the only source to use memory.h instead of string.h. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* When using libtool, use LTLIBICONV instead.David Seifert2017-01-152-2/+2
| | | | | | * This is required, as otherwise -Wl,--as-needed could fail. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* bitmath.h: More unsigned fixesErik de Castro Lopo2017-01-151-4/+4
|
* Yet more purging of `unsigned` typeErik de Castro Lopo2017-01-1517-395/+395
|
* flac/utils.c: Workaround for DJGPP missing wcswidth()sezero2017-01-141-0/+2
| | | | Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Support nasm coff obj format for djgppsezero2017-01-141-0/+5
| | | | Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
* Purge usage of `unsigned` typeErik de Castro Lopo2017-01-1475-1350/+1351
| | | | | | | As pointed out by Ozkan Sezer, on some platforms `int32_t` is actually a typedef for `long` so `unsigned` cannot be used interchangably with `FLAC__uint32`. Fix is to switch from `unsigned` to explicit sized ISO C types defined in <stdint.h>.
* libFLAC/cpu.c: Fix build issue on OpenBSD/i386Erik de Castro Lopo2017-01-131-1/+1
| | | | Patch-from: Christian Weisgerber <naddy@mips.inka.de>
* stream_encoder.c: Make compression_levels_ array constErik de Castro Lopo2017-01-061-1/+1
| | | | | | | As pointed out by github user @randomascii, the `compression_levels_` struct could and should be const. Closes: https://github.com/xiph/flac/issues/26
* Fix build with MSVC if UNICODE is enabledErik de Castro Lopo2017-01-042-4/+4
| | | | | Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com> Closes: https://sourceforge.net/p/flac/bugs/447/
* libFLAC/cpu.c: Fix CPU detectonErik de Castro Lopo2017-01-031-2/+2
| | | | Patch-from: Janne Hyvärinen <cse@sci.fi>
* Version 1.3.21.3.2Erik de Castro Lopo2017-01-011-3/+3
|
* libFLAC: Remove commented out assertErik de Castro Lopo2016-12-241-2/+0
| | | | | Pointed out by c.helmrich@ecodis.de. It was added during debugging in commit c06a44969, but was never meant to stay.
* libFLAC/cpu.c: Add CPP guardErik de Castro Lopo2016-12-211-0/+2
|
* More Makefile.lite fixesErik de Castro Lopo2016-12-212-0/+2
| | | | Patch-from: Robert Kausch <robert.kausch@freac.org>
* Makefile.lite fixesErik de Castro Lopo2016-12-111-2/+2
| | | | Patch-from: Robert Kausch <robert.kausch@freac.org>
* Fix PACKAGE_VERSION in MSVC filesErik de Castro Lopo2016-12-115-15/+17
| | | | Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
* libFLAC/metadata_object.c: Fix typo in numberErik de Castro Lopo2016-12-061-1/+1
| | | | | As pointed out by Evan Ramos there was typo, `32786` instead of `32768`.
* libFLAC/cpu.c: Improve logicErik de Castro Lopo2016-12-061-1/+1
| | | | | | | Only call `FLAC__cpu_have_cpuid_asm_ia32` if `FLAC__HAS_NASM` is defined. Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
* Update version in MSVS project filesErik de Castro Lopo2016-12-054-12/+12
|
* Another bulk update of copyright datesErik de Castro Lopo2016-12-0511-11/+11
|
* Bulk update copyright datesErik de Castro Lopo2016-12-05168-170/+170
|
* vcxproj: Remove unused config flagsErik de Castro Lopo2016-12-052-4/+4
| | | | | | Specifically, FLAC__NO_SSE_OS and FLAC__SSE_OS. Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
* libFLAC/cpu.c: Whitespace fixesErik de Castro Lopo2016-12-041-4/+4
| | | | Patch-from : lvqcl.mail <lvqcl.mail@gmail.com>
* libFLAC/cpu.c: Remove OS SSE detectionErik de Castro Lopo2016-12-041-166/+0
| | | | | | Assume that all OSes that are usable today support SSE. Patch-from: lvqcl.mail <lvqcl.mail@gmail.com>
* src/share/grabbag/seektable.c: Fix typo inside assertErik de Castro Lopo2016-12-021-1/+1
| | | | Patch-from: "lvqcl.mail" <lvqcl.mail@gmail.com>
* cpu.c: Really fix compiler warningsErik de Castro Lopo2016-09-121-1/+1
|
* cpu.c: Fix compiler warning on PowerPCErik de Castro Lopo2016-09-111-1/+3
|
* Fix compiler warning from gcc-6.1.1Erik de Castro Lopo2016-09-082-1/+4
|
* stream_decoder: reset has_seek_table before read_metadata_seektable_()Max Kellermann2016-07-141-0/+3
| | | | | | | | | | | | | | | If a seek table has already been read successfully, then the has_seek_table flag is true. Now imagine the file comes with another seek table, which doesn't make sense, but libFLAC accepts it happily. If reading this second seek table fails (for example allocation failure), read_metadata_seektable_() returns false, but the has_seek_table flag is still true. If the calling application happens to ignore this failure, and at some point tries to seek, the process will crash due to NULL pointer dereference. This would sure be an application bug that needs to be fixed, but libFLAC's internal state is inconsistent, so let's fix this up. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>