Compare commits

..

105 Commits

Author SHA1 Message Date
Martin Storsjo
5fd7e6537d Merge remote-tracking branch 'aosp/master' 2016-10-28 10:26:20 +03:00
Martin Storsjo
2b1e8db04d Don't force C++98 mode any longer
The code builds fine in C++11 mode now.
2016-10-18 08:29:04 +03:00
Martin Storsjo
55554d0b2d Merge remote-tracking branch 'aosp/master' 2016-10-18 08:28:51 +03:00
Martin Storsjo
cb57d89522 Add new files to "make dist" 2016-09-24 13:36:43 +03:00
Martin Storsjo
72037da0ba Fix building with MSVC for ARM
cmnintrin.h only existed for Windows CE, and doesn't seem to actually
be necessary for building this.
2016-09-11 13:28:47 +03:00
Martin Storsjo
45915b67e4 Detect MSVC x64 2016-09-11 13:28:44 +03:00
opcodevoid
6ac0611b07 Windows MSVC Makefile 2016-09-11 13:28:30 +03:00
Martin Storsjo
5eb3c9be88 Merge remote-tracking branch 'aosp/master' 2016-09-10 14:38:15 +03:00
Lexyan
1d686c3a23 Add aarch64 assembly optimization (ARMv8a 64 bits)
The fixmuldiv functions don't need inline assembly to be fast
in this architecture; the compiler (both clang and GCC) figure
out to use the optimal instructions for this (which is 2 instruction
sequence), and when letting the compiler emit the instructions
instead of using inline assembly, the compiler is able to
interleave those instructions with other instructions,
improving scheduling, making it even faster than when using
inline assembly.

Overall, this gives about 50% speedup.
2016-09-10 14:33:39 +03:00
Martin Storsjo
a0bd8aa3b6 Bump the package version to 0.1.5 2016-08-25 22:20:09 +03:00
Martin Storsjo
932fc12396 Update Makefile.am with newly added and removed files 2016-08-25 22:14:25 +03:00
Martin Storsjo
1ce312b1dc Bump the library versions in the headers 2016-08-25 22:13:16 +03:00
Martin Storsjo
f9d0f65e65 Merge remote-tracking branch 'aosp/master' 2016-08-25 22:12:15 +03:00
Martin Storsjo
15b128dd82 Explicitly force building in C++98 mode
GCC 6 defaults to C++14 (or more precisely, gnu++14) instead of C++98
(or gnu++98).

The fdk-aac source doesn't support being built in this mode at the
moment, since it relies on narrowing conversion from unsigned 32 bit
integers to FIXP_DBL (which is a signed data type of the same size).

The same approach is used upstream in Android as well, since
d52f3747683.

This fixes buliding with GCC 6.
2016-05-18 10:13:31 +03:00
Martin Storsjo
8fe6faf261 Merge remote-tracking branch 'aosp/master' 2016-05-18 09:36:12 +03:00
Guillaume Smaha
f132ac5f3d Invert inline and void to be compatible with gcc 3.3.4 2016-05-18 08:07:32 +02:00
Guillaume Smaha
112fe2c68d Fix issue with gcc 3.4.3 which doesn't support always_inline without inline 2016-05-17 15:39:10 +02:00
Martin Storsjo
50a98d1fd2 Merge remote-tracking branch 'aosp/master' 2016-03-09 08:49:40 +02:00
Martin Storsjo
0943e715f7 Remove android specific diagnostic logging 2016-01-26 22:42:09 +02:00
Timothy Gu
c8ad7a2ef9 Merge remote-tracking branch 'aosp/master' into update 2016-01-26 11:57:49 -08:00
Vicente Olivert Riera
047376af8c libFDK/include/mips/cplx_mul.h: use C code instead of ASM
Replace the assembler code by the equivalent in C. This way it will work
for every MIPS ISA. Now the check for __mips_isa_rev < 6 is no longer
necessary, so remove it.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
2015-09-21 11:59:02 +01:00
Jasper Lievisse Adriaanse
2585f10da2 Fix the preprocessor statements controlling the use of mips{32,64}r1 instructions.
Only enable code using mips32/mips64 instructions if the compiler is targetting
this ISA. (integer madd and msub instructions aren't available in the
``canonical'' mips ISAs)
2015-08-13 10:53:07 +02:00
Martin Storsjo
83ac4a9860 Merge remote-tracking branch 'aosp/master' 2015-03-11 16:49:43 +02:00
Martin Storsjo
2ded8da912 Update the changelog for the upcoming 0.1.4 release 2015-03-05 10:26:54 +02:00
Martin Storsjo
d7fca408b4 Merge remote-tracking branch 'aosp/master' 2015-03-03 10:52:42 +02:00
Andrew Stone
97b382cd3f Ignore file compile that is generated by autogen 2014-11-24 16:13:15 -05:00
Martin Storsjo
06ee7ef4e7 Bump the package version number to 0.1.4 2014-11-07 09:33:28 +02:00
Martin Storsjo
a0bfb7ee7c Bump the shared library major number
The AAC_PCM_OUTPUT_CHANNELS option no longer exists under the
same name nor enum value any longer, and the AUDIO_CHANNEL_TYPE
enum has been changed in a way which may break users.
2014-11-07 09:33:28 +02:00
Martin Storsjo
63447a9993 Include the decoder API version in the public header 2014-11-07 09:33:28 +02:00
Martin Storsjo
69a488faf2 Include the new file limiter.cpp in the build 2014-11-07 09:33:28 +02:00
Martin Storsjo
6ccecbc4b0 Merge remote-tracking branch 'aosp/master' 2014-11-07 09:32:48 +02:00
Martin Storsjo
ce1863444a Include libFDK ppc headers in make dist 2014-11-04 23:48:42 +02:00
Martin Storsjo
9a3234055a Extend the GetInvInt table to 80 elements
This is a bug fix patch from Fraunhofer, amending/replacing/extending
the previous commit which only extended the table to 55 elements.
(In my previous fix, 55 seemed to be enough for the issue at hand at
least. A few of the coefficients had slightly different rounding than
what Fraunhofer had used though).

This will show up in AOSP in the next code drop as well.
2014-08-01 10:36:54 +03:00
Martin Storsjo
6522e87ad6 Extend GetInvInt to support values up to 54
For sample rates >= 64 kHz with short blocks, the largest sfb
width is 36, which after grouping can be multiplied with 3,
ending up as 108. GetInvInt needs to be able to support
the largest grouped sfb width, divided by two (3 * 36 / 2 = 54).

This fixes VBR encoding with sample rates >= 64 kHz.
2014-07-29 15:00:56 +03:00
Martin Storsjo
f82510410d Add support for waveformatex files
This is used for multichannel wave files.
2014-06-23 10:45:50 +03:00
Martin Storsjo
16f75a570e Support reading sox style piped wav files
Sox writes the RIFF header size as a very large number, instead
of as 0 as in libavformat.
2014-06-23 10:45:50 +03:00
Martin Storsjo
43cb942cd4 Use skip instead of fseek
fseek(SEEK_CUR) doesn't work for nonseekable streams (such
as pipes).

Only do this for skipping past small chunks; don't use it for
skipping past the actual data for non-streamed input.
2014-06-23 10:45:50 +03:00
Martin Storsjo
cb19aa7c12 Allow reading wav files with a 0 bytes RIFF chunk
This is required in order to read streamed wav files produced by
the libavformat wav muxer.
2014-06-23 10:45:50 +03:00
Martin Storsjo
3951d0a4e5 Allow opening stdin when "-" is specified 2014-06-23 10:45:50 +03:00
Martin Storsjo
e7348e7a5d Support streamed wav files with a 0 bytes data chunk 2014-06-23 10:45:50 +03:00
Martin Storsjo
1652691ee9 Use AC_SEARCH_LIBS to search for a library containing math functions
Even though the previous mechanism worked, this should be more
correct.
2014-06-23 10:44:02 +03:00
Mark Harris
b8f6c140ce Fix AIX build
Fix AIX build failure with IBM xlC compiler due to conflicting
definition of M_PI.  The libSYS/include/genericStds.h definition is
guarded with #ifndef M_PI, but was included before <math.h> which
defines M_PI with more significant digits.
2014-05-26 12:31:40 -07:00
Mark Harris
c15b653b99 Add ppc optimization for clz and fixmul
Optimize ppc/ppc64 similar to i386/x86_64, approximately doubling
encoding speed on a Power Mac G5 running OS X 10.5.8.
2014-05-26 12:23:56 -07:00
Mark Harris
5e154c7ed1 Make LONG 32 bits for ppc64 as it is for x86_64 2014-05-26 12:14:40 -07:00
Mark Harris
72fd73dbdd Fix PowerPC Mac build 2014-05-26 12:12:03 -07:00
Martin Storsjo
2f29dd48d0 Bump the version number, add a changelog entry 2013-11-25 12:25:55 +02:00
Martin Storsjo
c3f7404aab Include autogen.sh when building distribution packages 2013-11-25 12:25:55 +02:00
Martin Storsjo
164fc98be1 Include the encoder library version in the publicly installed header
This allows callers to conditionally use new API features without
breaking compatibility with the earlier versions of the library.
2013-11-01 12:11:30 +02:00
Martin Storsjo
c8002b04ff Avoid casting arbitrary values to an enum
The enum only contains the constant values 0, 1 and 2. This produces
the warning "comparison of constant 6 with expression of type
'PS_RESOLUTION' is always false" in clang for the first check
in the getNoBands function (but apparently not for the second one
even though mode>=3 shouldn't ever happen for a valid PS_RESOLUTION
value either). This could allow the compiler to completely remove
the conditions that shouldn't be able to occur even though they
actually are used and are necessary.

By passing the value as UINT instead, it is clear to the compiler
that all the checks are necessary.
2013-11-01 11:28:59 +02:00
Martin Storsjo
b41a6f9e81 Revert "Avoid too big changes in isScale"
This reverts commit 226601a8d9bce81455e161a0e26051d2f22c5d7a.

This change doesn't seem to be necessary any longer, a proper
fix seems to be included upstream now in
60a27b7fe5bf2c3b07ae7f679ca67c0c5cba3b00.
2013-11-01 10:58:46 +02:00
Martin Storsjo
321233ee92 Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts:
	libAACenc/src/quantize.cpp
2013-11-01 10:46:40 +02:00
Martin Storsjo
fcb5f1b692 Ignore .dirstamp files 2013-10-03 09:02:22 +02:00
Terrance
0feb581efb Add an autogen shellscript 2013-09-07 18:32:50 +03:00
Martin Storsjo
f6aebfd487 Bump the version number, add a changelog entry 2013-07-27 18:54:00 +03:00
Martin Storsjo
59ff381ee4 Include dependency libs (-lm) in the pkg-config file 2013-07-27 02:01:33 +03:00
Martin Storsjo
a63897ce4e Check the right element in isBook
This makes sure we read the right array element, corresponding
to all other array accesses in the same function, and all other
use of the isBook array elsewhere in the library.

This makes the fix in the previous commit ("Avoid too big changes
in isScale") work as intended, fixing other samples that triggered
assertions.
2013-07-10 17:21:42 +03:00
Martin Storsjo
226601a8d9 Avoid too big changes in isScale
These values are delta encoded, but only steps [-60,60] are
possible to encode. If the difference between two values are
bigger than that, we end up with a sequence we are unable to
encode.

This fixes crashes on certain stereo samples at higher
bitrates.
2013-03-18 16:28:50 +02:00
Martin Storsjo
bae4553d42 Merge remote-tracking branch 'aosp/master' 2013-02-27 22:06:16 +02:00
Martin Storsjo
8f9f42c104 Don't try to shift more bits than the variable length
Shifting by more than (or equal to) the variable length is
undefined in C.

This caused the quantized spectrum values to remain unshifted,
causing loud beeps in some samples.

The exact same change was originally applied in
657456949 (for AOSP) and in 24021f190 (in the separate fdk-aac
repo), but was overwritten and silently reverted by the new
upstream code drop for Android 4.2 in 381d69840a. After the code
drop, I chose not to reapply this change since the crashes that
it fixed had been fixed in other ways upstream and I was unable to
reproduce them after the new code drop.
2013-02-17 02:21:26 +02:00
Martin Storsjo
b966edf7fc Add a changelog entry for 0.1.1, bump the version numbers 2012-11-13 23:47:12 +02:00
Martin Storsjo
ec5d922893 Rename sbr_rom/ram files back to the original names
This minimizes the differences to upstream.
2012-11-02 13:30:45 +02:00
Martin Storsjo
53b442d8af build: Build object files in subdirectories
This allows producing more than one object file with the same name.
2012-11-02 12:47:43 +02:00
Martin Storsjo
dc409c50e6 build: Don't use make variables in the declaration of source files
This is required for working dependency generation with
the subdir-objects option enabled.
2012-11-02 12:45:29 +02:00
Martin Storsjo
9285c096fe Revert "Use __builtin_clz instead of default implementation of fixnormz on GCC"
This reverts commit e036dbc8eb7d5fdd02dc70faff20e9ac3e2989ca.

Upstream took __builtin_clz in use (in the new header
libFDK/include/x86/clz_x86.h, together with an alternative
implementation for MSVC), so this change can be dropped to
minimize the differences.
2012-11-01 11:30:58 +02:00
Martin Storsjo
48cfc02cbf Revert parts of "Use saturating adds to avoid overflow"
This reverts commit 839ae290c1f5a263613bea1a5fde863e757a8849.

This change is no longer necessary on top of the new upstream,
I cannot reproduce the crash that this fixed with the new upstream.
2012-11-01 11:30:40 +02:00
Martin Storsjo
dc0de33e86 Only use __int64 on MSVC, not on all win32 compilers
Mingw32 doesn't define the __int64 types.

This was implicitly reverted in AOSP (where this change was
already merged before) by the new code drop from Fraunhofer.
2012-11-01 11:30:40 +02:00
Martin Storsjo
961d5598d3 Update Makefile.am to account for a removed file in the latest upstream 2012-11-01 11:17:22 +02:00
Martin Storsjo
54dfe1ec69 Merge remote-tracking branch 'aosp/jb-mr1-release' into master
Conflicts:
	libAACenc/src/band_nrg.cpp
	libAACenc/src/grp_data.cpp
	libSBRenc/src/env_est.cpp
2012-11-01 11:08:03 +02:00
Jeffrey Knockel
fea3c1d0ff Make sure AACdynamic_RAM gets allocated aligned to 8 bytes
This fixes assert failures on platforms where malloc doesn't provide
8 byte alignment, such as Win9x.
2012-10-25 12:14:05 +03:00
Sergio Ammirata
790bf9f088 Add support for Workgroup 4 (WG4) channel mapping
This is the channel ordering used in DVD Audio, and is the standard
used internally in the VLC media player.
2012-10-05 12:17:37 +03:00
Martin Storsjo
e79b172ba6 Revert "Do schur_div with a direct 64 bit division instead of a loop on x86"
This reverts commit 923f3e95f3e332d26f03cf6782f0ab61596ceef2.

The optimized version differed from the original in a few cases
(in some cases where the return value turned out to be negative
while the original implementation returned a positive value),
so revert it for now until it has been analyzed completely.
2012-09-14 11:10:29 +03:00
Martin Storsjo
bf0d9ddc43 Add an encoder example 2012-09-13 23:27:27 +03:00
Jakub Stachowski
923f3e95f3 Do schur_div with a direct 64 bit division instead of a loop on x86
This speeds up HE-AACv2 encoding from 3.85 s to 3.42 s on a Core i7.
2012-09-09 22:18:09 +03:00
Martin Storsjo
50b1de17ac Merge remote-tracking branch 'aosp/master' 2012-09-05 11:32:25 +03:00
Martin Storsjo
8e4d5d9d2f Use a saturating shift to avoid overflow
When the shift overflowed, asserts were triggered later, where
the values were assumed to be non-negative.
2012-09-02 22:27:52 +02:00
Jakub Stachowski
e036dbc8eb Use __builtin_clz instead of default implementation of fixnormz on GCC
The library contains architecture specific versions of the clz functions
for arm and mips, but the fallback C version for other architectures is
pretty slow.

By using __builtin_clz on GCC (available since GCC 3.4), we get a
significant (20-40 %) speedup of the total running time on x86.

Speed difference: 5.1 s instead of 8.6 s for AAC-LC 128 kbit/s and
3.8 s instead of 4.9 s for HE-AACv2 32 kbit/s, on an i7.
2012-08-14 23:48:55 +03:00
Martin Storsjo
6999980d67 Use saturating adds to avoid overflow
When the addition overflowed, asserts were triggered later, where
the values were assumed to be non-negative.
2012-08-11 22:28:54 +03:00
Martin Storsjo
010c75901e Use saturating adds in all other similar loops in groupShortData as well 2012-08-10 11:21:10 +03:00
Martin Storsjo
24021f1909 Don't try to shift more bits than the variable length
Shifting by more than (or equal to) the variable length is
undefined in C.
2012-08-10 11:01:37 +03:00
Martin Storsjo
839ae290c1 Use saturating adds to avoid overflow
These additions can overflow, triggering assertions later.
2012-08-10 11:01:36 +03:00
Martin Storsjo
d8e8f1ac46 Merge remote-tracking branch 'aosp/master' 2012-08-08 22:19:49 +03:00
Martin Storsjo
c44084453d Check whether we need to link to -lm for math functions 2012-07-14 01:58:51 +03:00
Diego Elio Pettenò
bb34df82cf build: update libtool reference to version 2. 2012-07-11 22:13:08 +03:00
Diego Elio Pettenò
b9c682b9d3 build: declare the project foreign to automake
By default automake thinks the project is part of GNU and enforces the
presence of some files. By declaring the project foreign, we can
remove the 0-sized files.
2012-07-11 22:13:08 +03:00
Diego Elio Pettenò
be5ecc95c4 build: ignore autotools support files, and remove them from the repository.
Change-Id: Icc9c9ded1142232b5030183f2a653ee7cef632b5
2012-07-11 22:13:08 +03:00
Diego Elio Pettenò
a0b3294e55 build: do not use config.h 2012-07-11 07:48:52 -07:00
Diego Elio Pettenò
40f4e738e4 build: use dnl for comments in configure.ac
This simply means the comments are not copied into the executed
configure script.
2012-07-11 07:45:09 -07:00
Diego Elio Pettenò
df77638da1 build: do not call AC_CANONICAL_HOST.
Unless configure uses $host there is no reason to call it directly.
2012-07-11 07:44:13 -07:00
Martin Storsjo
78443185d4 Export the external symbols via the libtool -export-symbols option
Change-Id: If139d0d1cf6f9fdfb0ebc477d2152b9f5f49f566
2012-07-11 14:37:36 +03:00
Martin Storsjo
7ed64e79d4 Only use __int64 on MSVC, not on all win32 compilers
Mingw32 doesn't define the __int64 types.
2012-07-11 14:28:03 +03:00
Martin Storsjo
c8776d228b Update the changelog 2012-07-11 14:28:03 +03:00
Martin Storsjo
4f7355002c Don't link to libstdc++
While the source is C++, it doesn't use anything from the C++
runtime, so by building with -fno-exceptions -fno-rtti, the
dynamic library doesn't have to be linked to libstdc++. This
also simplifies things for users of the static library.
2012-07-11 14:28:03 +03:00
Martin Storsjo
b431d100a3 Allow setting bitrate modes 1-5 too
These correspond to different VBR modes.
2012-07-11 14:28:03 +03:00
Martin Storsjo
7e5a3465a8 Ignore generated files 2012-07-11 14:28:03 +03:00
Martin Storsjo
27360036f6 Add files added by "automake --add-missing -c" 2012-07-11 14:28:03 +03:00
Martin Storsjo
28ca63087f Add an _enc suffix to the sbr_ram/rom files in libSBRenc
This avoids name clashes with the similarly named files in
libSBRdec, when building all libraries with one single
automake file.
2012-07-11 14:28:03 +03:00
Martin Storsjo
ce9492073b Add COPYING as a symlink to NOTICE 2012-07-11 14:28:03 +03:00
Martin Storsjo
6cae68113f Add stub documents required by autotools 2012-07-11 14:28:02 +03:00
Martin Storsjo
f4fc1a43e4 Run "libtoolize -c" 2012-07-11 14:28:02 +03:00
Martin Storsjo
cd1c375de0 Add automake/autoconf source files
Change-Id: If97c7482bffaab4a21cd2fb8341f2939f19d3bbd
2012-07-11 14:28:02 +03:00
Dave Burke
2bda038c16 Add NOTICE file. Rework make file so it appears in settings.
Change-Id: I9d9ab17121e2db58f8a4ba4b40e14cab629b1a7e
2012-06-12 10:34:26 -07:00
Dave Burke
18a4af02f9 Added license boilerplate to all source files.
Change-Id: I42a702487e6db4953dca0027710ea4fe266052fd
Also:
 - Removed dead code in several source files.
 - Minor changes in comments.
 - No functional changes. No changes in executed code.
 - Added documentation PDFs.
2012-06-11 20:07:04 -07:00
Dave Burke
698b536f3b Update to 2012_05_11 version.
Fixes:
- Don't throw error for invalid bitrate but limit to functional value
- More robust ASC parsing
- More robust handling of corrupt bitstreams
- Handle multiple raw access units

Change-Id: Ib49fe2545ff4185fe924126da702fe84ac5c2d87
2012-05-12 13:47:46 -07:00
Dave Burke
9bf37cc971 Fraunhofer AAC codec.
License boilerplate update to follow.

Change-Id: I2810460c11a58b6d148d84673cc031f3685e79b5
2012-04-17 23:04:43 -07:00
Anatol Pomazau
a37315fe10 Initial empty repository 2012-04-06 11:04:36 -07:00

Diff Content Not Available