| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Because of issue https://github.com/xiph/flac/issues/437 compiler
flags are prepended instead of appended, so the user can override
them without altering the CMakeLists.txt.
Also, Clang doesn't support per-function optimize options, so in
CMake the fma file gets that option per-file. This is not supported
by automake.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subdivide_tukey is intended to replace partial_tukey and
punchout_tukey. It works in rougly the same way, but uses a more
efficient algorithm, recyling more data.
subdivide_tukey has 2 arguments, of which 1 is optional. The
first states the maximum number of parts the signal has to be
split up in, the second is the tukey parameter, divided by the
max num of parts.
subdivide_tukey(3) analyses audio with an unsplit block, with the
block split in 2 and split in 3. Here the default p of 0.5 applies
to the smallest parts, so the unsplit block effectively has a p of
0.5/3. subdivide_tukey(3/2e-1) does the same but with p of 0.2.
|
| |
|
|
|
| |
See https://github.com/xiph/flac/pull/387 for details
|
|
|
|
|
|
|
| |
This reverts commit 7e0a0e572305e9004a6fa9bba3dd6be936553b03,
following the change to the FLAC format proposed here:
https://github.com/ietf-wg-cellar/flac-specification/pull/148
It turns out supporting use of INT32_MIN is quite a hassle.
|
|
|
|
|
|
| |
As abs(INT32_MIN) is undefined, it took some extra work to enable
the encoder to do this. While expected gains are zero, this is
done to ensure full spec coverage in this regard
|
| |
|
|
|
|
|
|
| |
Decoding for 32-bit files is added, including the ability to decode
a 33-bit side subframe. However, residuals are assumed to be limited
to a 32-bit signed int, the encoder must make sure of this
|
|
|
|
|
| |
This bases the selection of the datapath on the actual predictor
coefficients instead of on the predictor coefficient precision
|
|
|
|
|
|
|
| |
This commit drops all use of assembler and intrinsics from the libFLAC
decoder. This is because they are only for 32-bit x86, hard to debug,
maintain and fuzz properly, and because the decoder has much greater
security risks than the encoder.
|
| |
|
|
|
|
| |
Add NEON intrinsics routines for lpc_compute_residual_from_qlp_coefficients
and lpc_compute_residual_from_qlp_coefficients_wide
|
|
|
|
|
|
| |
This commit reworks the code decoding a frame, to add silence when
frames are missing and output silence when something other than the
frame header seems corrupted. Tests are added to the test suite for
this functionality. Also, decoded values are checked to be within bps
|
|
|
|
| |
Fixes https://github.com/xiph/flac/issues/286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In parsing certain types of metadata blocks, it was not checked
whether certain length fields were at all possible. A small file
of 64 byte was enough to let the decoder allocate 4GiB of memory
by simply stating a field was 4GiB in length, while metadata
blocks in FLAC cannot be larger than 16MiB.
This commit adds a mechanism to the bitreader to set a length
limit upon reading. This limit is checked at each read, at each
memory allocation and after reading the block. In case anything
is deemed wrong, parsing metadata is aborted, as 'resyncing' is
only possible on audio frames, not on metadata blocks.
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37865
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the calculation of autocorrelation from single precision
float to double precision. With this, compression improves on average
by about 0.5% with compression level 4, with some tracks (espcially
material with high samplerates) seeing improvements of 10% or more.
This commit removes SSE intrinsics and MMX assembler routins, adds
SSE2 and changes VSX autoc[] routines and changes the regular C
code.
|
|
|
|
|
|
|
|
| |
Previously the FLAC__AVX2_SUPPORTED macro is defined, but actually
AVX2 functions are not used when built with clang because flac only
uses them when FLAC__AVX_SUPPORTED macro is set.
Signed-off-by: NotTsunami
|
|
|
|
| |
One such example is sys/param.h from MinGW.
|
|
|
|
|
|
|
|
| |
Add a POWER8 and POWER9 version of the autocorrelation functions.
flac --best is about 3.3x faster on POWER9 with this patch.
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
|
|
|
|
|
|
|
| |
Use getauxval() to determine if we are on POWER8 or POWER9 or newer.
POWER8 is represented by version 2.07 and POWER9 by version 3.00.
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
|
|
|
|
|
|
| |
Visual Studio can use GCC (for Android) and Clang (supported toolset) so they must be checked before native compiler.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit b52fa0ec6dc83ec0f430ff7bd7c80485c45728b0.
See: https://github.com/xiph/flac/commit/b52fa0ec6dc83ec0f430ff7bd7c80485c45728b0
|
|
|
|
| |
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
|
|
|
| |
There were a number of specialized versions, but the default case
defined `MAX` and `MIN` instead of `flac_max` and `flac_min`.
|
|
|
|
|
|
|
|
| |
After the removal of the OS SSE detection stuff ia32_cpu_info()
and x86_64_cpu_info() became very similar. Merging them makes
sense.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Removes FLAC__lpc_restore_signal_16_intrin_sse2() which was faster
than 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.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
CPP is minefield. We should simplify CPP wherever possible and work
to minimise nesting.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Patch-from: <lvqcl.mail@gmail.com>
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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>.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Split `FLAC__cpu_info` into CPU specific functions. We now have
`ia32_cpi_info` and `x86_64_cpu_info` and a simple obvious way
to add support for other CPUs.
* Improve handling of Android OS.
* Remove more #ifdefs where possible.
* Compile (syntax and type check) DEBUG output code even when debugging
is disabled.
* Remove build support for ancient NetBSD version 1.5 (version 1.6 was
released in 2002).
|
| |
|
|
|
|
|
|
|
|
| |
* Make `FLAC__cpu_xgetbv_x86` private to cpu.c (and rename it to
`cpu_xgetbv_x86` (it wasn't being used anywhere else).
* Remove `FLAC__cpu_have_cpuid_x86` altogether as it wasn't actually
being used but that was difficult to tell because of all the #ifdef
nonsense.
|
| |
|
|
|
|
| |
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Handy for toolchains or operating systems that don't support AVX or AVX2
like OS/2.
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
This patch allows FLAC__BYTES_PER_WORD to be set to 8, but is disabled by
default.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* Drop support from MSVC earlier than 2005.
* Make types of FLAC__clz_uint32() and FLAC__clz_soft_uint32() the same.
* Remove un-needed parens.
* Cleanup FLAC__bitmath_ilog2_wide().
Patch-from: lvqcl <lvqcl.mail@gmail.com>
|