OpenBSD needs the enviroment variables `AUTOCONF_VERSION` and
`AUTOMAKE_VERSION` to be set in order to find these tools.
The script now tests (individually) if they are already set and if they
aren't sets them to something that is known to work on OpenBSD 5.8
On some setups, benchmark_residual linkage fails with an undefined
reference to clock_gettime(). Adding -lrt fixes that.
Patch-from: Ozkan Sezer <sezeroz@gmail.com>
* src/libFLAC/metadata_iterators.c:3247: (error) va_list `va` was opened
but not closed with va_end().
* src/share/grabbag/snprintf.c:66: (error) va_list `va` was opened but
not closed with va_end().
* src/utils/flactimer/main.cpp:84: (warning) Either the condition `!fout`
is redundant or there is possible null pointer dereference.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/8
This is more of a "human language versus programmer parlor" issue.
src/flac/main.c will return usage error for an argument greater
than FLAC__MAX_RICE_PARTITION_ORDER (15u).
While in programming "0..16" usually means "from zero to 15", in
natural human-to-human talk, it would rather mean "from zero to 16".
This changes the wording a bit to avoid this misunderstanding.
Closes: http://sourceforge.net/p/flac/bugs/352/
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
The old version of `FLAC__bitwriter_write_raw_uint32()` assumes that the
unused bits of the `val` argument are equal to zero, but don't check it.
This patch adds a new version of that function which does have the check
and then calls a new function `FLAC__bitwriter_write_raw_uint32_nocheck()`
which behaves like the old one.
Code updated to use these two functions as needed.
Patch-from: lvqcl <lvqcl.mail@gmail.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
* 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>
Windows can suffer quite badly from disk fragmentations. To avoid
this, on Windows, the FILE* buffer size was set to 10Meg. However,
this huge buffer is undesireable when writing to a eg a pipe.
This patch updates the behaviour to only use the huge buffer when
writing to disk.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Closes: https://sourceforge.net/p/flac/feature-requests/114/
lvqvl found that 32-bit total_error_* variables can overflow when the
right encoding parameters are used. This patch disables them.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
The function FLAC__cpu_xgetbv_x86() is declared and defined only
if FLAC__HAS_X86INTRIN is defined. However FLAC__cpu_info() was
calling it even if FLAC__HAS_X86INTRIN was undefined,
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Makefile.lite in libs/executables subdirs must include
top level's config.mk to allow variables defined there (OS, PROC)
to be used; otherwise e.g. EXPLICIT_LIBS is not set and link
fails on Darwin.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
- Use uname -m for Darwin/i386 platform
(uname -p returns i386 on Mac OS)
- Darwin does have sys/param.h; allow correct flac_min/flac_max macro
expansion
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
libFLAC limits the value of qlp_coeff_precision to make sure that
32-bit math is enough for decoding of 16-bit audio.
subframe_bps can be equal to 17 for 16-bit input (for side channel)
so the value of subframe_bps should be compared with 17, not 16.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
- build/config.mk: some OS call x86_64 amd64
- build/config.mk: FreeBSD needs -DHAVE_SYS_PARAM_H in CFLAGS
- build/exe.mk and lib.mk: default compilers on FreeBSD are cc/c++
- src/libFLAC++/Makefile.lite: $(OS) is not defined
- src/libFLAC++/Makefile.lite: Link -lstdc++ on FreeBSD
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>