Commit Graph

17 Commits

Author SHA1 Message Date
Martin Storsjo 6ccecbc4b0 Merge remote-tracking branch 'aosp/master' 2014-11-07 09:32:48 +02: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 5e154c7ed1 Make LONG 32 bits for ppc64 as it is for x86_64 2014-05-26 12:14:40 -07:00
Jean-Michel Trivi 6792cf6361 AAC-Decoder: SBR delay for gapless
Revise decoder output delay determination. The output delay consisted of
  concealment and limiter delay. SBR delay was not covered but must be
  considered for gapless playback delay compensation.

Bug 9428126

Change-Id: I67483712c284de9b5378694f9db7acbed2547dd7
2014-05-20 17:39:03 -07:00
Glenn Kasten fb2e845179 am 35f30c5a: Merge "AArch64: Make LONG 4 bytes"
* commit '35f30c5ab8089f38681d2fdd416c00aebef5a7ff':
  AArch64: Make LONG 4 bytes
2014-04-09 15:57:48 +00:00
Marcus Oakland f2f96fb86d AArch64: Make LONG 4 bytes
The libSYS/include/machine_type.h header file states LONG should be
"Data type representing 4 byte signed integer on all supported
platforms" but only provided for defining LONG as INT and ULONG as
UINT when __x86_64__ was defined. This has been changed to when
__LP64__ is defined, so that it also applies to AArch64. The change
to libFDK/include/common_fix.h is then needed to get the project to
compile.

Change-Id: Iea42d7eca97dcc9da772a05b207d134cb999a72a
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2014-03-11 12:01:00 +00:00
Jean-Michel Trivi 47c680c622 AAC Decoder: support 6.1/7.1 decoded as 5.1
- Add 6.1 and 7.1 channel support including downmixer. Per default the
     decoder creates a 5.1 channel output for all streams with more than six
     encoded channels.
     Modified file(s):
        libPCMutils/include/pcmutils_lib.h
        libPCMutils/src/pcmutils_lib.cpp
        libAACdec/include/aacdecoder_lib.h
        libAACdec/src/aac_rom.h
        libAACdec/src/aacdecoder.cpp
        libAACdec/src/aac_ram.cpp
        libAACdec/src/aacdec_drc.cpp
        libAACdec/src/aacdecoder_lib.cpp
        libAACdec/src/aac_rom.cpp
        libAACdec/src/aacdecoder.h
        libSBRdec/include/sbrdecoder.h
        libSBRdec/src/sbrdec_drc.h
        libSBRdec/src/sbrdecoder.cpp
        libSBRdec/src/sbr_ram.cpp
        libSBRdec/src/sbr_ram.h
        libMpegTPDec/include/tp_data.h
        libMpegTPDec/include/tpdec_lib.h
        libMpegTPDec/src/version
        libMpegTPDec/src/tpdec_asc.cpp
        libMpegTPEnc/include/tp_data.h
        libMpegTPEnc/src/version
        libSYS/include/FDK_audio.h
        libSYS/src/genericStds.cpp

   - Fix error concealment modules fade-out/in mechanism.
     Modified file(s):
        libAACdec/src/conceal.cpp

Bug 9428126

Change-Id: I3230bd2072314b730911cd7ec1740e290cb1d254
2013-12-30 09:40:08 -08:00
Jean-Michel Trivi fa3eba1644 Encoder 7.1 support
* AAC-Encoder

   - Add 7.1 rear surround and 7.1 front center support to supported encoder
     channel modes. Change max channels from 6 to 8 and add 7.1 configuration
     to bandwidth and channel mapping functions.
     Modified file(s):
        libAACenc\include\aacenc_lib.h
        libAACenc\src\aacEnc_ram.cpp
        libAACenc\src\aacEnc_ram.h
        libAACenc\src\aacenc.cpp
        libAACenc\src\aacenc.h
        libAACenc\src\aacenc_lib.cpp
        libAACenc\src\adj_thr.cpp
        libAACenc\src\adj_thr.h
        libAACenc\src\adj_thr_data.h
        libAACenc\src\bandwidth.cpp
        libAACenc\src\bitenc.cpp
        libAACenc\src\channel_map.cpp
        libAACenc\src\interface.h
        libAACenc\src\metadata_compressor.cpp
        libAACenc\src\psy_main.cpp
        libAACenc\src\psy_main.h
        libAACenc\src\qc_data.h
        libAACenc\src\qc_main.cpp
        libAACenc\src\qc_main.h

* SBR-Encoder

   - Support up to 7.1 audio channels. Changed max channels from 6 to 8.
     Modified file(s):
        libSBRenc\include\sbr_encoder.h
        libSBRenc\src\sbr.h
        libSBRenc\src\sbr_encoder.cpp
        libSBRenc\src\sbr_ram.cpp

* Transport-Encoder
   - Add 7.1 channel configuration to audio specific config writer in
     transport encoder library.
     Modified file(s):
        libMpegTPEnc\src\tpenc_asc.cpp
        libMpegTPEnc\src\version

* SYS-Library
   - Add 7.1 channel modes to CHANNEL_MODE description.
     Modified file(s):
        libSYS\include\FDK_audio.h
        libSYS\src\genericStds.cpp

Bug 9428126

Change-Id: Ide53583aa8e03df4537b98db80740dfe0e7a9e0f
2013-09-03 14:19:38 -07:00
Jean-Michel Trivi dbf9680648 Encoder explicit signaling
* AAC-Encoder

   - Revise explicit signaling method which is required for downsampled SBR.
     The parameter is optional and default configuration is implicit signaling
     for dualrate SBR as before. In case of downsampled SBR and HE-AAC explicit
     signaling is configured as default.
     Modified file(s):
        documentation\aacEncoder.pdf
        libAACenc\include\aacenc_lib.h
        libAACenc\src\aacenc_lib.cpp
        libMpegTPEnc\src\tpenc_asc.cpp
        libMpegTPEnc\src\version
        libSYS\include\FDK_audio.h
        libSYS\src\genericStds.cpp

Bug 9428126

Change-Id: I35138140346f17384d109ee5829be9ea5bab80fc
2013-09-03 11:31:55 -07:00
Jean-Michel Trivi 5016eb7f65 Decoder stability, sanity checks improvements
* AAC-Decoder

   - Improved PCE handling for saver (re-)configuration and metadata processing.
     Modified file(s):
        libAACdec/src/aacdecoder.cpp
        libAACdec/src/aacdecoder_lib.cpp

   - Transport layer changes (config found) -> to be evaluated.
     Modified file(s):
        libMpegTPDec/include/tpdec_lib.h
        libMpegTPDec/src/tpdec_latm.h
        libMpegTPDec/src/version
        libMpegTPDec/src/tpdec_asc.cpp
        libMpegTPDec/src/tpdec_lib.cpp
        libMpegTPDec/src/tpdec_adts.cpp
        libMpegTPDec/src/tpdec_latm.cpp
        libSYS/include/FDK_audio.h
        libSYS/src/genericStds.cpp

   - Enable concealment state machine to skip states if the corresponding
     parameter is set to zero.
     Modified file(s):
        libAACdec/src/conceal.cpp

   - Add some more sanity checks to avoid segmentation faults especially when
     setting dynamic API params.
     Modified file(s):
        libAACdec/src/aacdecoder_lib.cpp

   - Fix to do a fail-safe initialization of IMDCT for all channels even with
     corrupt streams.
     Modified file(s):
        libAACdec/src/aacdecoder.cpp

   - HCR decoder fix (remove warnings).
     Modified file(s):
        libAACdec/src/block.cpp

   - Fix border calculation in SBR decoder's LPP transposer patch determination.
     Modified file(s):
        libSBRdec/src/env_dec.cpp
        libSBRdec/src/sbrdecoder.cpp
        libSBRdec/src/lpp_tran.cpp

Bug 9428126

Change-Id: Ib415b702b88a7ec8e9a55789d79cafb39296d26b
2013-08-27 16:28:09 -07:00
Jean-Michel Trivi 577fcbb570 Decode and SYS lib cleanup
* AAC-Encoder

   - Remove source snippets related to unsupported frame length of 960.
   - Adjust minBits initialization for disabled VBR configuration.
     Modified file(s):
        libAACenc/src/aacenc.h
        libAACenc/src/aacenc_lib.cpp
        libAACenc/src/aacenc_tns.cpp
        libAACenc/src/bandwidth.cpp
        libAACenc/src/psy_const.h
        libAACenc/src/transform.h

   - Revise encoder parameter restrictions: "Error Resilient(ER) AAC Low Complexity"
     is not supported. Where the AAC part of the FDK encoder threw an
     initialization error, now the aacEncoder_SetParam() returns an error
     before initialization if the application tries to configure this
     audio object type.
     Modified file(s):
        libAACenc/src/aacenc_lib.cpp

* SYS-Library

   - Portability fix for Mingw32.
     Modified file(s):
        libSYS/include/machine_type.h

   - Minor changes.
     Modified file(s):
        libSYS/include/wav_file.h
        libSYS/src/wav_file.cpp
        libSYS/src/cmdl_parser.cpp
        libSYS/src/genericStds.cpp

Bug 9428126

Change-Id: I9fa44923d34f033d0dc607f2b85abacb8a85eb61
2013-08-20 14:51:53 -07:00
Jean-Michel Trivi 4f0d97057c Disclaimer update, lib version increment
- Update disclaimer in all source files.
- Increment library version in each FDK sub-module.

Bug 9428126

Change-Id: I490b96d4ee472246b01483202b0bb4f1e9c2a5d7
2013-08-20 14:38:55 -07:00
Elliott Hughes 03a143bcb4 Remove a bionic workaround.
(Requires corresponding bionic patch 3975cec694a0c9b42e3f7e671fcd678da92836c3.)

(cherry-pick of 1d24ddc612489f57c23e78a5deaaad91f1bf6ce5.)

Change-Id: I7105b17c285ff24fb48be23cf2067aef37f36d45
2012-11-29 19:51:22 -08:00
Jean-Michel Trivi 381d69840a Bug fixes in AAC decoder, AAC encoder, FDK library
Latest code drop from Fraunhofer:

* AAC-Decoder

   - Expanded AAC-LD/ELD decoder TNS max band tables to avoid wrong data
     access for sampling rates <22kHz and >48kHz.
     Modified file(s):
        libAACdec\src\aacdec_tns.cpp
        libAACdec\src\aac_rom.h
        libAACdec\src\aac_rom.cpp

  - Fixed ELD synthesis QMF filterbank scaling for downsampled SBR.
    Modified file(s):
        libFDK\src\qmf.cpp

* AAC-Encoder

  - Fixed bit rate limiting for lower limit as introduced in the Delivery 2012-05-11.
    Modified file(s):
        libAACenc\include\aacenc_lib.h
        libAACenc\src\aacenc.h
        libAACenc\src\aacenc.cpp
        libSBRenc\src\sbr_rom.h
        libSBRenc\src\sbr_rom.cpp

  - Allow negative prediction gain as meaning that there is no coding gain.
    Make use of scaleValueSaturate in gauss window calculation.
    Modified file(s):
        libAACenc\src\aacenc_tns.cpp

  - Added energy saturation to prevent overflow in short blocks.
    Modified file(s):
        libAACenc\src\grp_data.cpp

  - Perform scalefactor adaption in case quantized lines are out of valid range.
    Modified file(s):
        libAACenc\src\quantize.cpp

  - Interrupt quantization loop when no spectral data is available.
    Adjustments in bitreservoir adaption.
    Modified file(s):
        libAACenc\src\qc_main.cpp

  - Indroduced dynamic scaling in none missing harmonic energy lowering compensation.
    Modified file(s):
        libSBRenc\src\env_est.cpp

* FDK-Library

  - Fixed saturation for negative values in scaleValueSaturate.
    Modified file(s):
        libFDK\include\scale.h

Change-Id: If830ea65caef6b5554281e4b7a77a8b2e08825ce
2012-09-09 11:52:09 -07:00
Irina Tirdea ad749575b4 Remove workaround in aac for broken toolchain
aac project forces the system not to include sys/types.h by defining
_SYS_TYPES_H_. This is a workaround for broken android toolchain.

This is no longer needed in latest android version and can be safely
removed. This will also lead to more errors if changes in bionic
headers are needed.

Change-Id: Icb76c207d6b47e811eacff9f9403177629bfb451
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
2012-09-03 02:48:01 +03:00
Martin Storsjo 52396724f8 Only use __int64 on MSVC, not on all win32 compilers
Mingw32 doesn't define the __int64 types.

Change-Id: Ia45add37be1bf85abde664fd6e382334a6bb4498
2012-07-12 17:06:45 +03:00
The Android Open Source Project 2228e36059 Snapshot 2bda038c16
Change-Id: If584e579464f28b97d50e51fc76ba654a5536c54
2012-07-11 10:15:24 -07:00