diff options
Diffstat (limited to 'libFDK/src')
-rw-r--r-- | libFDK/src/FDK_bitbuffer.cpp | 107 | ||||
-rw-r--r-- | libFDK/src/FDK_core.cpp | 98 | ||||
-rw-r--r-- | libFDK/src/FDK_crc.cpp | 94 | ||||
-rw-r--r-- | libFDK/src/FDK_hybrid.cpp | 215 | ||||
-rw-r--r-- | libFDK/src/FDK_tools_rom.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/FDK_trigFcts.cpp | 435 | ||||
-rw-r--r-- | libFDK/src/arm/autocorr2nd.cpp | 91 | ||||
-rw-r--r-- | libFDK/src/arm/dct_arm.cpp | 123 | ||||
-rw-r--r-- | libFDK/src/arm/fft_rad2_arm.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/arm/qmf_arm.cpp | 92 | ||||
-rw-r--r-- | libFDK/src/arm/scale_arm.cpp | 97 | ||||
-rw-r--r-- | libFDK/src/autocorr2nd.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/dct.cpp | 139 | ||||
-rw-r--r-- | libFDK/src/fft.cpp | 150 | ||||
-rw-r--r-- | libFDK/src/fft_rad2.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/fixpoint_math.cpp | 469 | ||||
-rw-r--r-- | libFDK/src/mdct.cpp | 112 | ||||
-rw-r--r-- | libFDK/src/mips/fft_rad2_mips.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/mips/mips_fft_twiddles.cpp | 93 | ||||
-rw-r--r-- | libFDK/src/mips/scale.cpp | 96 | ||||
-rw-r--r-- | libFDK/src/qmf.cpp | 99 | ||||
-rw-r--r-- | libFDK/src/scale.cpp | 98 |
22 files changed, 1749 insertions, 1339 deletions
diff --git a/libFDK/src/FDK_bitbuffer.cpp b/libFDK/src/FDK_bitbuffer.cpp index 75a0375..113c819 100644 --- a/libFDK/src/FDK_bitbuffer.cpp +++ b/libFDK/src/FDK_bitbuffer.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools *********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +3. NO PATENT LICENSE +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools *********************** - $Id$ Author(s): M. Lohwasser Description: common bitbuffer read/write routines - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "FDK_bitbuffer.h" @@ -53,14 +115,12 @@ const UINT *const RESTRICT pBitMask = BitMask; void FDK_CreateBitBuffer (HANDLE_FDK_BITBUF *hBitBuf, UCHAR *pBuffer, UINT bufSize) { - //*hBitBuf = (HANDLE_FDK_BITBUF) FDKcalloc(sizeof(FDK_BITBUF),1); - FDK_InitBitBuffer (*hBitBuf, pBuffer, bufSize, 0); FDKmemclear((*hBitBuf)->Buffer, bufSize*sizeof(UCHAR)); } -void FDK_DeleteBitBuffer (HANDLE_FDK_BITBUF hBitBuf) { /*FDKfree((HANDLE_FDK_BITBUF)hBitBuf) */; } +void FDK_DeleteBitBuffer (HANDLE_FDK_BITBUF hBitBuf) { ; } void FDK_InitBitBuffer (HANDLE_FDK_BITBUF hBitBuf, UCHAR *pBuffer, UINT bufSize, UINT validBits) @@ -120,13 +180,6 @@ INT FDK_get (HANDLE_FDK_BITBUF hBitBuf, const UINT numberOfBits) return (tx >> (32 - numberOfBits)) ; } -/* 01-DEC_2009 A. Tritthart - New routine added that reads 32 bits in order to allow a simple update of the 32-bit cache. - Due to push-back features, the read operations are not byte-aligned, nor 32-bit aligned, - all bytes need to be shifted according to the current read bit position. - Usage: bitstream->cache = FDK_get32 (bitstream); -*/ - INT FDK_get32 (HANDLE_FDK_BITBUF hBitBuf) { UINT BitNdx = hBitBuf->BitNdx + 32; diff --git a/libFDK/src/FDK_core.cpp b/libFDK/src/FDK_core.cpp index 3f5e8fb..37d88ee 100644 --- a/libFDK/src/FDK_core.cpp +++ b/libFDK/src/FDK_core.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools *********************** - (C) Copyright Fraunhofer IIS (2006) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools *********************** - $Id$ Author(s): Manuel Jander Description: FDK tools versioning support - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "FDK_core.h" @@ -31,7 +93,7 @@ /* FDK tools library info */ #define FDK_TOOLS_LIB_VL0 2 #define FDK_TOOLS_LIB_VL1 2 -#define FDK_TOOLS_LIB_VL2 5 +#define FDK_TOOLS_LIB_VL2 6 #define FDK_TOOLS_LIB_TITLE "FDK Tools" #define FDK_TOOLS_LIB_BUILD_DATE __DATE__ #define FDK_TOOLS_LIB_BUILD_TIME __TIME__ diff --git a/libFDK/src/FDK_crc.cpp b/libFDK/src/FDK_crc.cpp index 0049807..1b03903 100644 --- a/libFDK/src/FDK_crc.cpp +++ b/libFDK/src/FDK_crc.cpp @@ -1,26 +1,88 @@ -/******************************** MPEG Audio Encoder ************************** - (C) Copyright Fraunhofer IIS (1999) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/******************************** MPEG Audio Encoder ************************** - $Id$ Initial author: contents/description: CRC calculation diff --git a/libFDK/src/FDK_hybrid.cpp b/libFDK/src/FDK_hybrid.cpp index d66e534..3d3ab7b 100644 --- a/libFDK/src/FDK_hybrid.cpp +++ b/libFDK/src/FDK_hybrid.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2011) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +3. NO PATENT LICENSE +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Markus Lohwasser Description: FDK Tools Hybrid Filterbank - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "FDK_hybrid.h" @@ -386,33 +448,6 @@ INT FDKhybridSynthesisApply( return err; } -/*****************************************************************************/ -/* **** FILTERBANK **** */ - -/* - 2 channel filter - Filter Coefs: - 0.0, - 0.01899487526049, - 0.0, - -0.07293139167538, - 0.0, - 0.30596630545168, - 0.5, - 0.30596630545168, - 0.0, - -0.07293139167538, - 0.0, - 0.01899487526049, - 0.0 - - - Filter design: - h[q,n] = g[n] * cos(2pi/2 * q * (n-6) ); n = 0..12, q = 0,1; - - -> h[0,n] = g[n] * 1; - -> h[1,n] = g[n] * pow(-1,n); -*/ static void dualChannelFiltering( const FIXP_DBL *const pQmfReal, const FIXP_DBL *const pQmfImag, @@ -554,98 +589,6 @@ static void fourChannelFiltering( } - -/* - 8 channel filter - - Implementation using a FFT of length 8 - - prototype filter coefficients: - 0.00746082949812 0.02270420949825 0.04546865930473 0.07266113929591 0.09885108575264 0.11793710567217 - 0.125 - 0.11793710567217 0.09885108575264 0.07266113929591 0.04546865930473 0.02270420949825 0.00746082949812 - - Filter design: - N = 13; Q = 8; - h[q,n] = g[n] * exp(j * 2 * pi / Q * (q + .5) * (n - 6)); n = 0..(N-1), q = 0..(Q-1); - - Time Signal: x[t]; - Filter Bank Output - y[q,t] = conv(x[t],h[q,t]) = conv(h[q,t],x[t]) = sum(x[k] * h[q, t - k] ) = sum(h[q, k] * x[t - k] ); k = 0..(N-1); - - y[q,t] = x[t - 12]*h[q, 12] + x[t - 11]*h[q, 11] + x[t - 10]*h[q, 10] + x[t - 9]*h[q, 9] - + x[t - 8]*h[q, 8] + x[t - 7]*h[q, 7] - + x[t - 6]*h[q, 6] - + x[t - 5]*h[q, 5] + x[t - 4]*h[q, 4] - + x[t - 3]*h[q, 3] + x[t - 2]*h[q, 2] + x[t - 1]*h[q, 1] + x[t - 0]*h[q, 0]; - - h'[q, n] = h[q,(N-1)-n] = g[n] * exp(j * 2 * pi / Q * (q + .5) * (6 - n)); n = 0..(N-1), q = 0..(Q-1); - - y[q,t] = x[t - 12]*h'[q, 0] + x[t - 11]*h'[q, 1] + x[t - 10]*h'[q, 2] + x[t - 9]*h'[q, 3] - + x[t - 8]*h'[q, 4] + x[t - 7]*h'[q, 5] - + x[t - 6]*h'[q, 6] - + x[t - 5]*h'[q, 7] + x[t - 4]*h'[q, 8] - + x[t - 3]*h'[q, 9] + x[t - 2]*h'[q, 10] + x[t - 1]*h'[q, 11] + x[t - 0]*h'[q, 12]; - - Try to split off FFT Modulation Term: - FFT(x[t], q) = sum(x[t+k]*exp(-j*2*pi/N *q * k)) - c m - Step 1: h'[q,n] = g[n] * ( exp(j * 2 * pi / 8 * .5 * (6 - n)) ) * ( exp (j * 2 * pi / 8 * q * (6 - n)) ); - - h'[q,n] = g[n] *c[n] * m[q,n]; (see above) - c[n] = exp( j * 2 * pi / 8 * .5 * (6 - n) ); - m[q,n] = exp( j * 2 * pi / 8 * q * (6 - n) ); - - y[q,t] = x[t - 0]*g[0]*c[0]*m[q,0] + x[t - 1]*g[1]*c[ 1]*m[q, 1] + ... - ... + x[t - 12]*g[2]*c[12]*m[q,12]; - - | - n m *exp(-j*2*pi) | n' fft -------------------------------------------------------------------------------------------------------------------------- - 0 exp( j * 2 * pi / 8 * q * 6) -> exp(-j * 2 * pi / 8 * q * 2) | 2 exp(-j * 2 * pi / 8 * q * 0) - 1 exp( j * 2 * pi / 8 * q * 5) -> exp(-j * 2 * pi / 8 * q * 3) | 3 exp(-j * 2 * pi / 8 * q * 1) - 2 exp( j * 2 * pi / 8 * q * 4) -> exp(-j * 2 * pi / 8 * q * 4) | 4 exp(-j * 2 * pi / 8 * q * 2) - 3 exp( j * 2 * pi / 8 * q * 3) -> exp(-j * 2 * pi / 8 * q * 5) | 5 exp(-j * 2 * pi / 8 * q * 3) - 4 exp( j * 2 * pi / 8 * q * 2) -> exp(-j * 2 * pi / 8 * q * 6) | 6 exp(-j * 2 * pi / 8 * q * 4) - 5 exp( j * 2 * pi / 8 * q * 1) -> exp(-j * 2 * pi / 8 * q * 7) | 7 exp(-j * 2 * pi / 8 * q * 5) - 6 exp( j * 2 * pi / 8 * q * 0) | 0 exp(-j * 2 * pi / 8 * q * 6) - 7 exp(-j * 2 * pi / 8 * q * 1) | 1 exp(-j * 2 * pi / 8 * q * 7) - 8 exp(-j * 2 * pi / 8 * q * 2) | 2 - 9 exp(-j * 2 * pi / 8 * q * 3) | 3 - 10 exp(-j * 2 * pi / 8 * q * 4) | 4 - 11 exp(-j * 2 * pi / 8 * q * 5) | 5 - 12 exp(-j * 2 * pi / 8 * q * 6) | 6 - - - now use fft modulation coefficients - m[6] = = fft[0] - m[7] = = fft[1] - m[8] = m[ 0] = fft[2] - m[9] = m[ 1] = fft[3] - m[10] = m[ 2] = fft[4] - m[11] = m[ 3] = fft[5] - m[12] = m[ 4] = fft[6] - m[ 5] = fft[7] - - y[q,t] = ( x[t- 6]*g[ 6]*c[ 6] ) * fft[q,0] + - ( x[t- 7]*g[ 7]*c[ 7] ) * fft[q,1] + - ( x[t- 0]*g[ 0]*c[ 0] + x[t- 8]*g[ 8]*c[ 8] ) * fft[q,2] + - ( x[t- 1]*g[ 1]*c[ 1] + x[t- 9]*g[ 9]*c[ 9] ) * fft[q,3] + - ( x[t- 2]*g[ 2]*c[ 2] + x[t-10]*g[10]*c[10] ) * fft[q,4] + - ( x[t- 3]*g[ 3]*c[ 3] + x[t-11]*g[11]*c[11] ) * fft[q,5] + - ( x[t- 4]*g[ 4]*c[ 4] + x[t-12]*g[12]*c[12] ) * fft[q,6] + - ( x[t- 5]*g[ 5]*c[ 5] ) * fft[q,7]; - - pre twiddle factors c[n] = exp(j * 2 * pi / 8 * .5 * (6 - n)); - n c] | n c[n] | n c[n] ---------------------------------------------------------------------------------------------------- - 0 exp( j * 6 * pi / 8) | 1 exp( j * 5 * pi / 8) | 2 exp( j * 4 * pi / 8) - 3 exp( j * 3 * pi / 8) | 4 exp( j * 2 * pi / 8) | 5 exp( j * 1 * pi / 8) - 6 exp( j * 0 * pi / 8) | 7 exp(-j * 1 * pi / 8) | 8 exp(-j * 2 * pi / 8) - 9 exp(-j * 3 * pi / 8) | 10 exp(-j * 4 * pi / 8) | 11 exp(-j * 5 * pi / 8) - 12 exp(-j * 6 * pi / 8) | | - -*/ static void eightChannelFiltering( const FIXP_DBL *const pQmfReal, const FIXP_DBL *const pQmfImag, diff --git a/libFDK/src/FDK_tools_rom.cpp b/libFDK/src/FDK_tools_rom.cpp index d3c768b..4fc80ce 100644 --- a/libFDK/src/FDK_tools_rom.cpp +++ b/libFDK/src/FDK_tools_rom.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools *********************** - (C) Copyright Fraunhofer IIS (2008) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools *********************** - $Id$ Author(s): Oliver Moser Description: ROM tables used by FDK tools - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "FDK_tools_rom.h" diff --git a/libFDK/src/FDK_trigFcts.cpp b/libFDK/src/FDK_trigFcts.cpp index a198dc6..2f8655c 100644 --- a/libFDK/src/FDK_trigFcts.cpp +++ b/libFDK/src/FDK_trigFcts.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +4. DISCLAIMER - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +5. CONTACT INFORMATION +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Haricharan Lakshman, Manuel Jander Description: Trigonometric functions fixed point fractional implementation. - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "FDK_trigFcts.h" @@ -31,7 +93,6 @@ #include "fixpoint_math.h" -// #define CORDIC_SINCOS #define IMPROVE_ATAN2_ACCURACY 1 // 0 --> 59 dB SNR 1 --> 65 dB SNR @@ -109,8 +170,6 @@ FIXP_DBL fixp_atan2(FIXP_DBL y, FIXP_DBL x) sf = 0; } sfo = sf; - //write2file(fpF__h,(float)y/(float)x); - //write2file(fpC__h,(float) q * (float)FDKpow(2,sfo)); // SNR 86 dB But range not limited to [-64..64] which is the input range of fixp_atan() // --- atan() @@ -145,12 +204,8 @@ FIXP_DBL fixp_atan2(FIXP_DBL y, FIXP_DBL x) stf = sfo - ATI_SF; if (stf > 0) q = q << (INT)fMin( stf,DFRACT_BITS-1); else q = q >> (INT)fMin(-stf,DFRACT_BITS-1); - //write2file(fpF__e,(float)y/(float)x); - //write2file(fpC__e,(float)q * (float)FDKpow(2,ATI_SF)); // 88.9 dB at = fixp_atan(q); // ATO_SF } - //write2file(fpF__g,(float)FDKatan( (float)y/(float)x )); - //write2file(fpC__g,(float) at * (float)FDKpow(2,ATO_SF) ); // todo dB // --- atan2() @@ -177,8 +232,6 @@ FIXP_DBL fixp_atan2(FIXP_DBL y, FIXP_DBL x) ret = FL2FXCONST_DBL(0.0f); } } - //write2file(fpC__f,(float)ret * (float)FDKpow(2,AT2O_SF)); // 65 dB - //write2file(fpF__f,(float)FDKatan2(y,x)); return ret; } @@ -237,7 +290,6 @@ FIXP_DBL fixp_atan(FIXP_DBL x) } -#ifndef CORDIC_SINCOS #include "FDK_tools_rom.h" @@ -272,335 +324,6 @@ void fixp_cos_sin (FIXP_DBL x, int scale, FIXP_DBL *cos, FIXP_DBL *sin) *sin = sine + error1; } -#else /* #ifndef CORDIC_SINCOS */ - -/* - // Matlab - function v = cordic(beta,n) - % This function computes v = [cos(beta), sin(beta)] (beta in radians) - % using n iterations. Increasing n will increase the precision. - - if beta < -pi/2 | beta > pi/2 - if beta < 0 - v = cordic(beta + pi, n); - else - v = cordic(beta - pi, n); - end - v = -v; % flip the sign for second or third quadrant - return - end - - % Initialization of tables of constants used by CORDIC - % need a table of arctangents of negative powers of two, in radians: - % angles = atan(2.^-(0:27)); - angles = [ ... - 0.78539816339745 0.46364760900081 0.24497866312686 0.12435499454676 ... - 0.06241880999596 0.03123983343027 0.01562372862048 0.00781234106010 ... - 0.00390623013197 0.00195312251648 0.00097656218956 0.00048828121119 ... - 0.00024414062015 0.00012207031189 0.00006103515617 0.00003051757812 ... - 0.00001525878906 0.00000762939453 0.00000381469727 0.00000190734863 ... - 0.00000095367432 0.00000047683716 0.00000023841858 0.00000011920929 ... - 0.00000005960464 0.00000002980232 0.00000001490116 0.00000000745058 ]; - % and a table of products of reciprocal lengths of vectors [1, 2^-j]: - Kvalues = [ ... - 0.70710678118655 0.63245553203368 0.61357199107790 0.60883391251775 ... - 0.60764825625617 0.60735177014130 0.60727764409353 0.60725911229889 ... - 0.60725447933256 0.60725332108988 0.60725303152913 0.60725295913894 ... - 0.60725294104140 0.60725293651701 0.60725293538591 0.60725293510314 ... - 0.60725293503245 0.60725293501477 0.60725293501035 0.60725293500925 ... - 0.60725293500897 0.60725293500890 0.60725293500889 0.60725293500888 ]; - Kn = Kvalues(min(n, length(Kvalues))); - - % Initialize loop variables: - v = [1;0]; % start with 2-vector cosine and sine of zero - poweroftwo = 1; - angle = angles(1); - - % Iterations - for j = 0:n-1; - if beta < 0 - sigma = -1; - else - sigma = 1; - end - factor = sigma * poweroftwo; - R = [1, -factor; factor, 1]; - v = R * v; % 2-by-2 matrix multiply - beta = beta - sigma * angle; % update the remaining angle - poweroftwo = poweroftwo / 2; - % update the angle from table, or eventually by just dividing by two - if j+2 > length(angles) - angle = angle / 2; - else - angle = angles(j+2); - end - end - - % Adjust length of output vector to be [cos(beta), sin(beta)]: - v = v * Kn; - return - - // C++ - #define C1 - #define C2 - #define TYPE double - - TYPE fixp_cordic(TYPE in, - int n, - int type) - { - int i; - TYPE c,s,a; - TYPE x,y,v; - TYPE b; - - c = 0.5; - s = 0.0; - b = 1.0; - - for (i=0; i<n; i++) { - a = angleValues[i]; - x = b * s; - y = b * c; - - if (in < 0.0) { - c = c + x; - s = s - y; - in = in + a; - } - else { - c = c - x; - s = s + y; - in = in - a; - } - b = b / 2; - } - - if (type == 0) - v = c * kValues[n-1]*2; - else - v = s * kValues[n-1]*2; - - return (v); - } - - TYPE fixp_cos(TYPE in, - int n, - int scale) - { - TYPE v; - INT sign = 0; - - while ( (in < -M_PI/2) || (in > M_PI/2) ) { - if (in < 0) - in = in + M_PI; - else - in = in - M_PI; - - if (sign == 0) - sign = 1; - else - sign = 0; - } - - v = fixp_cordic(in,n,0); - - if (sign) - v = -v; - - return (v); - } - - TYPE fixp_sin(TYPE in, - int n, - int scale) - { - TYPE v; - INT sign = 0; - - while ( (in < -M_PI/2) || (in > M_PI/2) ) { - if (in < 0) - in = in + M_PI; - else - in = in - M_PI; - - if (sign == 0) - sign = 1; - else - sign = 0; - } - - v = fixp_cordic(in,n,1); - - if (sign) - v = -v; - - return (v); - } -*/ - - -#define SF_C1 1 -#define C1(x) FL2FXCONST_DBL(x/(1<<SF_C1)) -#define C2(x) FL2FXCONST_DBL(x) -#define M_PI_4 FL2FXCONST_DBL(M_PI/4) -#define ITER (DFRACT_BITS-1) - -/* - for (i=0; i<DFRACT_BITS; i++) { - angleValues[i] = FDKatan(FDKpow(2.0,-i)); - } -*/ -const FIXP_DBL angleValues[DFRACT_BITS] = { - C1(7.853981633974483e-001), C1(4.636476090008061e-001), C1(2.449786631268641e-001), C1(1.243549945467614e-001), - C1(6.241880999595735e-002), C1(3.123983343026828e-002), C1(1.562372862047683e-002), C1(7.812341060101111e-003), - C1(3.906230131966972e-003), C1(1.953122516478819e-003), C1(9.765621895593195e-004), C1(4.882812111948983e-004), - C1(2.441406201493618e-004), C1(1.220703118936702e-004), C1(6.103515617420877e-005), C1(3.051757811552610e-005), - C1(1.525878906131576e-005), C1(7.629394531101970e-006), C1(3.814697265606496e-006), C1(1.907348632810187e-006), - C1(9.536743164059608e-007), C1(4.768371582030888e-007), C1(2.384185791015580e-007), C1(1.192092895507807e-007), - C1(5.960464477539055e-008), C1(2.980232238769530e-008), C1(1.490116119384766e-008), C1(7.450580596923828e-009), - C1(3.725290298461914e-009), C1(1.862645149230957e-009), C1(9.313225746154785e-010), C1(4.656612873077393e-010) -}; - -/* - for (i=0; i<DFRACT_BITS; i++) { - kValues[i] = 1.0; - for (j=0; j<=i; j++) { - val = FDKcos(FDKatan(FDKpow(2.0,-j))); - kValues[i] *= val; - } - } -*/ -const FIXP_DBL kValues[DFRACT_BITS] = { - C2(7.071067811865476e-001), C2(6.324555320336759e-001), C2(6.135719910778964e-001), C2(6.088339125177524e-001), - C2(6.076482562561683e-001), C2(6.073517701412960e-001), C2(6.072776440935261e-001), C2(6.072591122988928e-001), - C2(6.072544793325625e-001), C2(6.072533210898753e-001), C2(6.072530315291345e-001), C2(6.072529591389450e-001), - C2(6.072529410413973e-001), C2(6.072529365170104e-001), C2(6.072529353859136e-001), C2(6.072529351031395e-001), - C2(6.072529350324459e-001), C2(6.072529350147725e-001), C2(6.072529350103542e-001), C2(6.072529350092496e-001), - C2(6.072529350089735e-001), C2(6.072529350089044e-001), C2(6.072529350088872e-001), C2(6.072529350088829e-001), - C2(6.072529350088818e-001), C2(6.072529350088816e-001), C2(6.072529350088814e-001), C2(6.072529350088814e-001), - C2(6.072529350088814e-001), C2(6.072529350088814e-001), C2(6.072529350088814e-001), C2(6.072529350088814e-001) -}; - -inline -static FIXP_DBL fixp_cordic(FIXP_DBL in, - INT type) -{ - int i; - FIXP_DBL c,s,a; - FIXP_DBL x,y; - int n = ITER; - - in = fMult(in,M_PI_4); - c = kValues[n-1] >> 1; - s = FL2FXCONST_DBL(0.0f); - - for (i=0; i<n; i++) { - a = angleValues[i]; - x = s >> i; - y = c >> i; - - if (in < FL2FXCONST_DBL(0.0)) { - c = c + x; - s = s - y; - in = in + a; - } - else { - c = c - x; - s = s + y; - in = in - a; - } - } - - /* 1 headroom bit */ - if (type == 0) - return (c); - else - return (s); -} - -/* - in: argument - scale: scalefactor of argument has to be in the range of 0, ... ,DFRACT_BITS-1 - type: calculate cosine 0 - calculate sine 1 -*/ -static FIXP_DBL fixp_sincos(FIXP_DBL in, - INT scale, - INT type) -{ - FIXP_DBL v; - INT sign = 0; - FIXP_DBL pi,pi_2; - - if (scale < 2) { - in = in >> (2-scale); - scale = 2; - } - - pi = M_PI_4 >> (scale-2); - pi_2 = M_PI_4 >> (scale-1); - - /* move signal into the range of -pi/2 to +pi/2 */ - while ( (in < (-pi_2)) || (in > (pi_2)) ) { - if (in < FL2FXCONST_DBL(0.0)) - in = in + pi; - else - in = in - pi; - - sign = ~sign; - } - - /* scale signal with 2/pi => unscaled signal is in the range of [-1.0,...,+1.0[ */ - in = fMult(in,FL2FXCONST_DBL(2/M_PI)) << scale; - - v = fixp_cordic(in,type); - - if (sign) - v = -v; - - /* compensate 1 headroom bit */ - if ( v <= FL2FXCONST_DBL(-0.5f) ) - v = (FIXP_DBL) (MINVAL_DBL+1); - else - v = SATURATE_LEFT_SHIFT(v,1,DFRACT_BITS); - - return (v); -} - -/* - in: argument - scale: scalefactor of argument has to be in the range of 0, ... ,DFRACT_BITS-1 -*/ -FIXP_DBL fixp_cos(FIXP_DBL in, - INT scale) - -{ - FDK_ASSERT ((scale >= 0) && (scale < DFRACT_BITS)); - - if (in == FL2FXCONST_DBL(0.0f)) - return /*FL2FXCONST_DBL(1.0)*/ (FIXP_DBL)MAXVAL_DBL; - - return (fixp_sincos(in,scale,0)); -} - -/* - in: argument - scale: scalefactor of argument has to be in the range of 0, ... ,DFRACT_BITS-1 -*/ -FIXP_DBL fixp_sin(FIXP_DBL in, - INT scale) - -{ - FDK_ASSERT ((scale >= 0) && (scale < DFRACT_BITS)); - - if (in == FL2FXCONST_DBL(0.0f)) - return FL2FXCONST_DBL(0.0f); - - return (fixp_sincos(in,scale,1)); -} - -#endif /* #ifndef CORDIC_SINCOS */ diff --git a/libFDK/src/arm/autocorr2nd.cpp b/libFDK/src/arm/autocorr2nd.cpp index 85926af..18c4e43 100644 --- a/libFDK/src/arm/autocorr2nd.cpp +++ b/libFDK/src/arm/autocorr2nd.cpp @@ -1,28 +1,85 @@ -/**************************************************************************** - (C) Copyright Fraunhofer IIS (2006) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. - $Id$ +2. COPYRIGHT LICENSE -*******************************************************************************/ +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ /*! * diff --git a/libFDK/src/arm/dct_arm.cpp b/libFDK/src/arm/dct_arm.cpp index dd0ca09..187c843 100644 --- a/libFDK/src/arm/dct_arm.cpp +++ b/libFDK/src/arm/dct_arm.cpp @@ -1,24 +1,85 @@ -/**************************************************************************** - (C) copyright Fraunhofer IIS (2004) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. - $Id$ +2. COPYRIGHT LICENSE -***************************************************************************/ +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ @@ -211,8 +272,8 @@ dct_IV_loop2_2nd_part: __asm void dst_IV_func1( int i, - const FIXP_SPK *twiddle, - FIXP_DBL *pDat_0, + const FIXP_SPK *twiddle, + FIXP_DBL *pDat_0, FIXP_DBL *pDat_1) { /* Register map: @@ -235,7 +296,7 @@ dst_IV_loop1 LDR r6, [r2, #4] // accu3 = pDat_0[1] RSB r5, r5, #0 // accu2 = -accu2 SMULWT r9, r5, r8 // accuX = (-accu2)*val_tw.l - LDR r4, [r3, #-4] // accu1 = pDat_1[-1] + LDR r4, [r3, #-4] // accu1 = pDat_1[-1] RSB r9, r9, #0 // accuX = -(-accu2)*val_tw.l SMLAWB r9, r4, r8, r9 // accuX = accu1*val_tw.h-(-accu2)*val_tw.l SMULWT r4, r4, r8 // accu1 = accu1*val_tw.l @@ -258,7 +319,7 @@ dst_IV_loop1 LDR r6, [r2, #4] // accu3 = pDat_0[1] RSB r5, r5, #0 // accu2 = -accu2 SMULWT r9, r5, r8 // accuX = (-accu2)*val_tw.l - LDR r4, [r3, #-4] // accu1 = pDat_1[-1] + LDR r4, [r3, #-4] // accu1 = pDat_1[-1] RSB r9, r9, #0 // accuX = -(-accu2)*val_tw.l SMLAWB r9, r4, r8, r9 // accuX = accu1*val_tw.h-(-accu2)*val_tw.l SMULWT r4, r4, r8 // accu1 = accu1*val_tw.l @@ -286,18 +347,18 @@ dst_IV_loop1 #ifdef FUNCTION_dst_IV_func2 -FDK_INLINE +FDK_INLINE /* __attribute__((noinline)) */ static void dst_IV_func2( int i, const FIXP_SPK *twiddle, - FIXP_DBL *RESTRICT pDat_0, + FIXP_DBL *RESTRICT pDat_0, FIXP_DBL *RESTRICT pDat_1, int inc) { FIXP_DBL accu1,accu2,accu3,accu4; LONG val_tw; - + accu4 = pDat_0[0]; accu3 = pDat_0[1]; accu4 >>= 1; @@ -310,17 +371,17 @@ static void dst_IV_func2( *pDat_0++ = accu3; *pDat_1-- = accu4; - + __asm { B dst_IV_loop2_2nd_part - + /* 50 cycles for 2 iterations = 25 cycles/iteration */ dst_IV_loop2: LDR val_tw, [twiddle], inc, LSL #2 // val_tw = *twiddle; twiddle += inc - + RSB accu2, accu2, #0 // accu2 = -accu2 RSB accu1, accu1, #0 // accu1 = -accu1 SMULWT accu3, accu2, val_tw // accu3 = (-accu2)*val_tw.l @@ -330,10 +391,10 @@ dst_IV_loop2: SMLAWB accu2, accu2, val_tw, accu4 // accu2 = (-accu1)*val_tw.l+(-accu2)*val_tw.h STR accu1, [pDat_1], #-4 // *pDat_1-- = accu1 STR accu2, [pDat_0], #4 // *pDat_0++ = accu2 - + LDR accu4, [pDat_0] // accu4 = pDat_0[0] LDR accu3, [pDat_0, #4] // accu3 = pDat_0[1] - + RSB accu4, accu4, #0 // accu4 = -accu4 RSB accu3, accu3, #0 // accu3 = -accu3 @@ -345,14 +406,14 @@ dst_IV_loop2: LDR accu1, [pDat_1, #-4] // accu1 = pDat_1[-1] LDR accu2, [pDat_1] // accu2 = pDat_1[0] - + STR accu3, [pDat_0], #4 // *pDat_0++ = accu3 STR accu4, [pDat_1], #-4 // *pDat_1-- = accu4 dst_IV_loop2_2nd_part: LDR val_tw, [twiddle], inc, LSL #2 // val_tw = *twiddle; twiddle += inc - + RSB accu2, accu2, #0 // accu2 = -accu2 RSB accu1, accu1, #0 // accu1 = -accu1 SMULWT accu3, accu2, val_tw // accu3 = (-accu2)*val_tw.l @@ -362,10 +423,10 @@ dst_IV_loop2_2nd_part: SMLAWB accu2, accu2, val_tw, accu4 // accu2 = (-accu1)*val_tw.l+(-accu2)*val_tw.h STR accu1, [pDat_1], #-4 // *pDat_1-- = accu1 STR accu2, [pDat_0], #4 // *pDat_0++ = accu2 - + LDR accu4, [pDat_0] // accu4 = pDat_0[0] LDR accu3, [pDat_0, #4] // accu3 = pDat_0[1] - + RSB accu4, accu4, #0 // accu4 = -accu4 RSB accu3, accu3, #0 // accu3 = -accu3 @@ -377,14 +438,14 @@ dst_IV_loop2_2nd_part: LDR accu1, [pDat_1, #-4] // accu1 = pDat_1[-1] LDR accu2, [pDat_1] // accu2 = pDat_1[0] - + STR accu3, [pDat_0], #4 // *pDat_0++ = accu3 STR accu4, [pDat_1], #-4 // *pDat_1-- = accu4 SUBS i, i, #1 BNE dst_IV_loop2 } - + /* Last Sin and Cos value pair are the same */ accu1 = fMultDiv2(-accu1, WTC(0x5a82799a)); accu2 = fMultDiv2(-accu2, WTC(0x5a82799a)); diff --git a/libFDK/src/arm/fft_rad2_arm.cpp b/libFDK/src/arm/fft_rad2_arm.cpp index f40961a..34d71c3 100644 --- a/libFDK/src/arm/fft_rad2_arm.cpp +++ b/libFDK/src/arm/fft_rad2_arm.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Description: dit_fft ARM assembler replacements. - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ /* NEON optimized FFT currently builds only with RVCT toolchain */ diff --git a/libFDK/src/arm/qmf_arm.cpp b/libFDK/src/arm/qmf_arm.cpp index df538a4..39795d7 100644 --- a/libFDK/src/arm/qmf_arm.cpp +++ b/libFDK/src/arm/qmf_arm.cpp @@ -1,30 +1,86 @@ -/**************************************************************************** - (C) Copyright Fraunhofer IIS (2004) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. - $Id$ +2. COPYRIGHT LICENSE - History: 04-NOV-2009 A. Tritthart Optimized qmfSynPrototypeFirSlot1 +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ -****************************************************************************/ #if (QMF_NO_POLY==5) #define FUNCTION_qmfForwardModulationLP_odd diff --git a/libFDK/src/arm/scale_arm.cpp b/libFDK/src/arm/scale_arm.cpp index 906766f..02f3b71 100644 --- a/libFDK/src/arm/scale_arm.cpp +++ b/libFDK/src/arm/scale_arm.cpp @@ -1,30 +1,93 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +3. NO PATENT LICENSE +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Arthur Tritthart Description: Scaling operations for ARM - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ + /* prevent multiple inclusion with re-definitions */ #ifndef __INCLUDE_SCALE_ARM__ #define __INCLUDE_SCALE_ARM__ diff --git a/libFDK/src/autocorr2nd.cpp b/libFDK/src/autocorr2nd.cpp index 83ccc31..e73ef14 100644 --- a/libFDK/src/autocorr2nd.cpp +++ b/libFDK/src/autocorr2nd.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools *********************** - (C) Copyright Fraunhofer IIS (2009) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools *********************** - $Id$ Author(s): M. Lohwasser Description: auto-correlation functions - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "autocorr2nd.h" diff --git a/libFDK/src/dct.cpp b/libFDK/src/dct.cpp index 6a267cf..5dc9e78 100644 --- a/libFDK/src/dct.cpp +++ b/libFDK/src/dct.cpp @@ -1,27 +1,89 @@ -/**************************************************************************** - (C) copyright Fraunhofer IIS (2004) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. - $Id$ +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ -*******************************************************************************/ /*! \file dct.cpp - \brief DCT Implementations $Revision: 37444 $ + \brief DCT Implementations Library functions to calculate standard DCTs. This will most likely be replaced by hand-optimized functions for the specific target processor. @@ -47,28 +109,6 @@ #endif -/*! - * - * \brief Perform dct type 3 - * The dct 3 is calculated by a inverse real fft, with - * some pre twiddeling before the inverse real fft, as discribed by Takuya OOURA. - * (http://momonga.t.u-tokyo.ac.jp/~ooura/fftman/ftmn2_32.html#sec2_3_2) - * The real inverse fft is calculated by a inverse complex fft, as described - * in numerical recipes in C, Cambridge University press - * the auxiliary function is built by reversing the odd samples - * - * Instead of doing 2 times the conjugation to calculate the - * inverse cfft with the cfft, one can also swap elements before - * calling the cfft to get the same result: - * swap - * r(1),i(1) with r(n-1),i(n-1), - * r(2),i(2) with r(n-2),i(n-2), ... - * r(n/2-1),i(n/2-1) with r(n/2+1),i(n/2+1) - * - * - * Scaling 1 shift in pre twiddeling, - * log2(L)-1 in cfft - */ #if !defined(FUNCTION_dct_III) void dct_III(FIXP_DBL *pDat, /*!< pointer to input/output */ FIXP_DBL *tmp, /*!< pointer to temporal working buffer */ @@ -142,19 +182,6 @@ void dct_III(FIXP_DBL *pDat, /*!< pointer to input/output */ } #endif -/*! - * - * \brief Perform dct type 2 - * The dct 2 is calculated by a real inverse fft, with - * some pre twiddeling after the fft, as discribed by Takuya OOURA. - * (http://momonga.t.u-tokyo.ac.jp/~ooura/fftman/ftmn2_32.html#sec2_3_2) - * The real inverse fft is calculated by a inverse complex fft, as described - * in numerical recipes in C, Cambridge University press - * the auxilery function is build by reversing the odd samples - * - * Scaling 1 shift in pre twiddeling, - * 5 in cfft - */ #if !defined(FUNCTION_dct_II) void dct_II(FIXP_DBL *pDat, /*!< pointer to input/output */ FIXP_DBL *tmp, /*!< pointer to temporal working buffer */ @@ -347,14 +374,14 @@ void dct_IV(FIXP_DBL *pDat, pDat_0[0] = (pDat_0[0]>>1); - /* 28 cycles for ARM926 */ + /* 28 cycles for ARM926 */ for (idx = sin_step,i=1; i<(M+1)>>1; i++, idx+=sin_step) { FIXP_STP twd = sin_twiddle[idx]; cplxMultDiv2(&accu3, &accu4, accu1, accu2, twd); pDat_0[1] = accu3; pDat_1[0] = accu4; - + pDat_0+=2; pDat_1-=2; @@ -417,22 +444,22 @@ void dst_IV(FIXP_DBL *pDat, #ifdef FUNCTION_dst_IV_func1 if ( (M>=4) && ((M&3) == 0) ) { dst_IV_func1(M, twiddle, &pDat[0], &pDat[L]); - } else + } else #endif { FIXP_DBL *RESTRICT pDat_0 = &pDat[0]; FIXP_DBL *RESTRICT pDat_1 = &pDat[L - 2]; - + register int i; /* 34 cycles on ARM926 */ - for (i = 0; i < M-1; i+=2,pDat_0+=2,pDat_1-=2) + for (i = 0; i < M-1; i+=2,pDat_0+=2,pDat_1-=2) { register FIXP_DBL accu1,accu2,accu3,accu4; accu1 = pDat_1[1]; accu2 = -pDat_0[0]; accu3 = pDat_0[1]; accu4 = -pDat_1[0]; - + cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]); cplxMultDiv2(&accu3, &accu4, accu4, accu3, twiddle[i+1]); @@ -444,7 +471,7 @@ void dst_IV(FIXP_DBL *pDat, register FIXP_DBL accu1,accu2; accu1 = pDat_1[1]; accu2 = -pDat_0[0]; - + cplxMultDiv2(&accu1, &accu2, accu1, accu2, twiddle[i]); pDat_0[0] = accu2; pDat_0[1] = accu1; diff --git a/libFDK/src/fft.cpp b/libFDK/src/fft.cpp index cd04b98..bbf3d99 100644 --- a/libFDK/src/fft.cpp +++ b/libFDK/src/fft.cpp @@ -1,34 +1,90 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2001) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. - $Id$ - Author(s): Josef Hoepfl, DSP Solutions - Description: Fix point FFT +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. +3. NO PATENT LICENSE - History: - 20-APR-2010 A. Tritthart replaced modulo operations with comparisons in fft15 - to avoid failures with ARM RVCT 4.0 compiler - Tuned fft15 by 18% (Cortex-A8) to 25% (ARM926) by reprogramming - with merged loops. +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** + + Author(s): Josef Hoepfl, DSP Solutions + Description: Fix point FFT ******************************************************************************/ @@ -71,7 +127,6 @@ static FORCEINLINE void fft3(FIXP_DBL *RESTRICT pDat) } -//#define F5C(x) ((FIXP_DBL)x) #define F5C(x) STC(x) #define C51 (F5C(0x79bc3854)) /* FL2FXCONST_DBL( 0.95105652) */ @@ -148,10 +203,6 @@ static FORCEINLINE void fft5(FIXP_DBL *RESTRICT pDat) /* Performs the FFT of length 15. It is split into FFTs of length 3 and length 5. */ static inline void fft15(FIXP_DBL *pInput) { -#if FORCE_CRITICAL_CODE_FOR_RVCT4 - FIXP_DBL accu; - int j; -#endif FIXP_DBL aDst[2*N15]; FIXP_DBL aDst1[2*N15]; int i,k,l; @@ -162,48 +213,6 @@ static inline void fft15(FIXP_DBL *pInput) input3(6:8) = [input(6) input(11) input(1)]; input3(9:11) = [input(9) input(14) input(4)]; input3(12:14) = [input(12) input(2) input(7)]; */ -#if FORCE_CRITICAL_CODE_FOR_RVCT4 - /* This branch generate failures on RVCT 4.0 with ARM926/ARM1136/ARM1176/C-R4, but not on Cortex-A8 */ - pSrc = pInput; - pDst = aDst; - for(i=0,l=0,k=0; i<N5; i++) - { - for(j=0; j<N3; j++) - { - pDst[k] = pSrc[l]; - pDst[k+1] = pSrc[l+1]; - k += 2; - l += 2*N5; - if (l >= (2*N15)) - l -= (2*N15); - } - l += (2*N3); - if (l >= (2*N15)) - l -= (2*N15); - } - /* Perform 5 times the fft of length 3 - output3(0:2) = fft3(input3(0:2)); - output3(3:5) = fft3(input3(3:5)); - output3(6:8) = fft3(input3(6:8)); - output3(9:11) = fft3(input3(9:11)); - output3(12:14) = fft3(input3(12:14)); */ - pSrc=aDst; - for(i=0; i<N5; i++) - { - fft3(pSrc); - pSrc += (2*N3); - } - - /* Scaling of the input vector of the fft5 with the scale factor 0.125 */ - pSrc=aDst; - for(j=0; j<(2*N3*N5); j++) - { - accu = pSrc[j]; - /* 2 bit right shift */ - accu >>= 2; - pSrc[j] = accu; - } -#else { const FIXP_DBL *pSrc = pInput; FIXP_DBL *RESTRICT pDst = aDst; @@ -251,7 +260,6 @@ static inline void fft15(FIXP_DBL *pInput) pDst[k+5] = (s1 - r2)>>2; } } -#endif /* Sort input vector for fft's of length 5 input5(0:4) = [output3(0) output3(3) output3(6) output3(9) output3(12)]; input5(5:9) = [output3(1) output3(4) output3(7) output3(10) output3(13)]; diff --git a/libFDK/src/fft_rad2.cpp b/libFDK/src/fft_rad2.cpp index 80467ec..4eaa27e 100644 --- a/libFDK/src/fft_rad2.cpp +++ b/libFDK/src/fft_rad2.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2003) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): M. Lohwasser, M. Gayer Description: - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "fft_rad2.h" diff --git a/libFDK/src/fixpoint_math.cpp b/libFDK/src/fixpoint_math.cpp index 45b3023..000820c 100644 --- a/libFDK/src/fixpoint_math.cpp +++ b/libFDK/src/fixpoint_math.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (1999) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +5. CONTACT INFORMATION - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): M. Gayer Description: Fixed point specific mathematical functions - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "fixpoint_math.h" @@ -148,9 +210,6 @@ static const FIXP_SGL pow2Coeff[MAX_POW2_PRECISION] = { *****************************************************************************/ /* for rounding a dfract to fract */ -/* static LONG accu_r = (int64)((INT64(1)<<(DFRACT_BITS-1))>>FRACT_BITS); */ -//LNK_SECTION_CONSTDATA -//static const LONG accu_r = 0x00008000; #define ACCU_R (LONG) 0x00008000 LNK_SECTION_CODE_L1 @@ -792,373 +851,3 @@ FIXP_DBL fLog2(FIXP_DBL x_m, INT x_e) -#if TEST_ROUNDING -#include <math.h> - -void writeToFile( FDKFILE *fh, float v) { - FDKfprintf(fh, "%22.16f\n", v ); -} -FDKFILE* openAppend(CHAR* filNam) -{ - FDKFILE* fh = NULL; - fh = FDKfopen(filNam, "a"); - if (!fh) { - FDKprintf("\nError at fio_open\n"); - return NULL; - } - return fh; -} - -// loop version, long duration, huge output data -void checkRound() -{ - #define IN_INT 0 // all four rounding modes are bitexact for 0 and for 1 - - float inp; - FIXP_DBL f_inp; - float r, rnd; - FIXP_DBL f_trc,f_rnd; - float step; - - //step=0.1f; - step=0.001f; - //step=0.0001f; - //step=0.00001f; - //step=0.0000001f; // BEWARE output data of test might get huge! - //step=0.00000000005f; // BEWARE output data of test might get huge! - - double d_floor,d_ceil; - FIXP_DBL f_floor,f_ceil; - INT i,j,floorInt,ceilInt,roundInt,truncInt; - - FDKFILE *fpF_a = NULL; FDKFILE *fpC_a = NULL; - FDKFILE *fpF_b = NULL; FDKFILE *fpC_b = NULL; - FDKFILE *fpF_c = NULL; FDKFILE *fpC_c = NULL; - FDKFILE *fpF_d = NULL; FDKFILE *fpC_d = NULL; - FDKFILE *fpF_e = NULL; FDKFILE *fpC_e = NULL; - - fpF_a = openAppend("_FLT_a.txt"); fpC_a = openAppend("_FDK_a.txt"); - fpF_b = openAppend("_FLT_b.txt"); fpC_b = openAppend("_FDK_b.txt"); - fpF_c = openAppend("_FLT_c.txt"); fpC_c = openAppend("_FDK_c.txt"); - fpF_d = openAppend("_FLT_d.txt"); fpC_d = openAppend("_FDK_d.txt"); - fpF_e = openAppend("_FLT_e.txt"); fpC_e = openAppend("_FDK_e.txt"); - - - - #define INPUT_SF 3 // BEWARE at SF 0 !!! over/under-flow - #define INPUT_SCALE (float)(1<<INPUT_SF) - - for (inp = -3.1f; inp < 2.1f; inp=inp+step) - //for (inp = -0.9f; inp < 0.9f; inp=inp+step) - //for (inp = -0.0000000001f; inp < 0.0000000001f; inp=inp+step) - //for (inp = -3.1f; inp < 2.1f; inp=inp+step) - { // # # - // --- write input - writeToFile(fpF_a,(float) inp); - f_inp = (FIXP_DBL)(inp / INPUT_SCALE); writeToFile(fpC_a,(float)f_inp * (float)FDKpow(2,INPUT_SF)); - - - // --- floor - d_floor = FDKfloor(inp); writeToFile(fpF_b,(float) d_floor); - // --- floor fixedpoint - floorInt = fixp_floorToInt(f_inp,INPUT_SF); - f_floor = fixp_floor (f_inp,INPUT_SF); - #if IN_INT - writeToFile(fpC_b,(float) floorInt); - #else - writeToFile(fpC_b,(float) f_floor * (float)FDKpow(2,INPUT_SF)); - #endif - - - // --- ceil - d_ceil = FDKceil(inp); writeToFile(fpF_c,(float) d_ceil ); - // --- ceil fixedpoint - ceilInt = fixp_ceilToInt(f_inp,INPUT_SF); - f_ceil = fixp_ceil (f_inp,INPUT_SF); - #if IN_INT - writeToFile(fpC_c,(float) ceilInt); - #else - writeToFile(fpC_c,(float) f_ceil * (float)FDKpow(2,INPUT_SF)); - #endif - - - // --- truncate - i = (INT)inp; writeToFile(fpF_d,(float) i); - // --- truncate fixedpoint - truncInt = fixp_truncateToInt(f_inp,INPUT_SF); - f_trc = fixp_truncate (f_inp,INPUT_SF); - #if IN_INT - writeToFile(fpC_d,(float) truncInt); - #else - writeToFile(fpC_d,(float) f_trc * (float)FDKpow(2,INPUT_SF)); - #endif - - - // --- round - r = 0.5f; - if (inp > 0) rnd = inp + r; - if (inp < 0) rnd = -(-inp + r); // avoid offset; you might get offset with 'rnd = inp - r' - j = (INT)(rnd); writeToFile(fpF_e,(float) j); - // --- round fixedpoint - roundInt = fixp_roundToInt(f_inp,INPUT_SF); - f_rnd = fixp_round (f_inp,INPUT_SF); - #if IN_INT - writeToFile(fpC_e,(float) roundInt); - #else - writeToFile(fpC_e,(float) f_rnd * (float)FDKpow(2,INPUT_SF)); - #endif - } - - if (fpF_a) FDKfclose(fpF_a); if (fpC_a) FDKfclose(fpC_a); - if (fpF_b) FDKfclose(fpF_b); if (fpC_b) FDKfclose(fpC_b); - if (fpF_c) FDKfclose(fpF_c); if (fpC_c) FDKfclose(fpC_c); - if (fpF_d) FDKfclose(fpF_d); if (fpC_d) FDKfclose(fpC_d); - if (fpF_e) FDKfclose(fpF_e); if (fpC_e) FDKfclose(fpC_e); -} - - -// round only a few selected values (faster) -void checkRound2() -{ - // set point - #define BLOD 24 // left bits (of dot): number of bits _left_ of decimal point ==> Q 24.8 format (incl. sign bit) - #define BROD 8 // right bits (of dot): number of bits _right_ of decimal point ==> Q 24.8 format - FDK_ASSERT((BROD+BLOD)==DFRACT_BITS); - - // scale factors - #define FL_SF BLOD - #define FL_SCALE (1<<FL_SF) - - #define FR_SF BROD - #define FR_SCALE (1<<FR_SF) - - #define INL_SF 7 // bits at INput Left of dot - #define INL_SCALE (float)(1<<INL_SF) - - #define INR_SF (DFRACT_BITS-1-INL_SF) // bits at INput Right of dot 32-1-7 = 24 - #define INR_SCALE (float)(1<<INR_SF) - - - // testdata - #define X_MIN -128.0000f // - #define X0 -127.0000f // - - #define X1 -5.0000f // -//#define X1 -4.4999f // round -//#define X1 4.4999f // round - - #define X2 -4.9999f // - #define X3 -4.5000f // - #define X4 -0.1234f // - #define X_NULL 0.0f // - #define X5 0.1234f // - #define X6 4.5000f // - #define X7 4.9999f // - #define X8 5.0000f // - // subtract one LSB from 128.0f [this is needed AFTER hex values have been dumped --> this is needed to get a valid float reference for floor and trunc ] - #define X_MAX ((-0.0000000004656613f) + 128.0000f) - - - FIXP_DBL f_reg0, f_reg1, f_reg2, f_reg3, f_reg4, f_reg5, f_reg6, f_reg7, f_reg8, f_reg_min, f_reg_max, f_reg_null; - INT res0, res1, res2, res3, res4, res5, res6, res7, res8; - FIXP_DBL f_res0, f_res1, f_res2, f_res3, f_res4, f_res5, f_res6, f_res7, f_res8; - - f_reg_min = (LONG)0x80000000 ; // data taken from above dump; cast to LONG needed because of - f_reg0 = (LONG)0x81000000 ; // fract-class needs a sign; 0x######## is of type unsigned int. - f_reg1 = (LONG)0xfb000000 ; - f_reg2 = (LONG)0xfb000690 ; - f_reg3 = (LONG)0xfb800000 ; - f_reg4 = (LONG)0xffe068dc ; - f_reg_null = (LONG)0x00000000 ; - f_reg5 = (LONG)0x001f9724 ; - f_reg6 = (LONG)0x04800000 ; - f_reg7 = (LONG)0x04fff970 ; - f_reg8 = (LONG)0x05000000 ; - f_reg_max = (LONG)0x7fffffff ; - - - FDKprintf("---- input values ----\n"); - FDKprintf("%f %f %f %f %f %f %f %f %f\n", X0 - , X1 - , X2 - , X3 - , X4 - , X5 - , X6 - , X7 - , X8 - ); - FDKprintf("%f %f %f %f %f %f %f %f %f\n", (float)f_reg0 * (float)FDKpow(2,INL_SF) - , (float)f_reg1 * (float)FDKpow(2,INL_SF) - , (float)f_reg2 * (float)FDKpow(2,INL_SF) - , (float)f_reg3 * (float)FDKpow(2,INL_SF) - , (float)f_reg4 * (float)FDKpow(2,INL_SF) - , (float)f_reg5 * (float)FDKpow(2,INL_SF) - , (float)f_reg6 * (float)FDKpow(2,INL_SF) - , (float)f_reg7 * (float)FDKpow(2,INL_SF) - , (float)f_reg8 * (float)FDKpow(2,INL_SF) - ); - FDKprintf("---- min/max input values ----\n"); - FDKprintf("%f %f %f\n", X_MIN - , X_NULL - , X_MAX - ); - FDKprintf("%f %f %f\n", (float)f_reg_min * (float)FDKpow(2,INL_SF) - , (float)f_reg_null * (float)FDKpow(2,INL_SF) - , (float)f_reg_max * (float)FDKpow(2,INL_SF) - ); - FDKprintf("\n"); - - FDKprintf("\n---- floor ----\n"); - res0 = fixp_floorToInt(f_reg0, INL_SF); f_res0 = fixp_floor(f_reg0, INL_SF); - res1 = fixp_floorToInt(f_reg1, INL_SF); f_res1 = fixp_floor(f_reg1, INL_SF); - res2 = fixp_floorToInt(f_reg2, INL_SF); f_res2 = fixp_floor(f_reg2, INL_SF); - res3 = fixp_floorToInt(f_reg3, INL_SF); f_res3 = fixp_floor(f_reg3, INL_SF); - res4 = fixp_floorToInt(f_reg4, INL_SF); f_res4 = fixp_floor(f_reg4, INL_SF); - res5 = fixp_floorToInt(f_reg5, INL_SF); f_res5 = fixp_floor(f_reg5, INL_SF); - res6 = fixp_floorToInt(f_reg6, INL_SF); f_res6 = fixp_floor(f_reg6, INL_SF); - res7 = fixp_floorToInt(f_reg7, INL_SF); f_res7 = fixp_floor(f_reg7, INL_SF); - res8 = fixp_floorToInt(f_reg8, INL_SF); f_res8 = fixp_floor(f_reg8, INL_SF); - FDKprintf("reference %i %i %i %i %i %i %i %i %i\n", (int)floor(X0), (int)floor(X1), (int)floor(X2), (int)floor(X3), (int)floor(X4), (int)floor(X5), (int)floor(X6), (int)floor(X7), (int)floor(X8)); - FDKprintf("fixp_floorToInt %i %i %i %i %i %i %i %i %i\n", res0, res1, res2, res3, res4, res5, res6, res7, res8); - FDKprintf("fixp_floor %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", (float)f_res0*(float)FDKpow(2,INL_SF), - (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF), - (float)f_res4*(float)FDKpow(2,INL_SF), - (float)f_res5*(float)FDKpow(2,INL_SF), - (float)f_res6*(float)FDKpow(2,INL_SF), - (float)f_res7*(float)FDKpow(2,INL_SF), - (float)f_res8*(float)FDKpow(2,INL_SF)); - - FDKprintf("\n---- min/max floor ----\n"); - res1 = fixp_floorToInt(f_reg_min, INL_SF); f_res1 = fixp_floor(f_reg_min, INL_SF); - res2 = fixp_floorToInt(f_reg_null, INL_SF); f_res2 = fixp_floor(f_reg_null, INL_SF); - res3 = fixp_floorToInt(f_reg_max, INL_SF); f_res3 = fixp_floor(f_reg_max, INL_SF); - FDKprintf("reference %i %i %i\n", (int)floor(X_MIN), (int)floor(X_NULL), (int)floor(X_MAX)); - FDKprintf("fixp_floorToInt %i %i %i\n", res1, res2, res3); - FDKprintf("fixp_floor %10.7f %10.7f %10.7f\n", (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF)); - FDKprintf("\n\n\n"); - - - FDKprintf("---- ceil ----\n"); - res0 = fixp_ceilToInt(f_reg0, INL_SF); f_res0 = fixp_ceil(f_reg0, INL_SF); - res1 = fixp_ceilToInt(f_reg1, INL_SF); f_res1 = fixp_ceil(f_reg1, INL_SF); - res2 = fixp_ceilToInt(f_reg2, INL_SF); f_res2 = fixp_ceil(f_reg2, INL_SF); - res3 = fixp_ceilToInt(f_reg3, INL_SF); f_res3 = fixp_ceil(f_reg3, INL_SF); - res4 = fixp_ceilToInt(f_reg4, INL_SF); f_res4 = fixp_ceil(f_reg4, INL_SF); - res5 = fixp_ceilToInt(f_reg5, INL_SF); f_res5 = fixp_ceil(f_reg5, INL_SF); - res6 = fixp_ceilToInt(f_reg6, INL_SF); f_res6 = fixp_ceil(f_reg6, INL_SF); - res7 = fixp_ceilToInt(f_reg7, INL_SF); f_res7 = fixp_ceil(f_reg7, INL_SF); - res8 = fixp_ceilToInt(f_reg8, INL_SF); f_res8 = fixp_ceil(f_reg8, INL_SF); - FDKprintf("reference %i %i %i %i %i %i %i %i %i\n", (int)ceil(X0), (int)ceil(X1), (int)ceil(X2), (int)ceil(X3), (int)ceil(X4), (int)ceil(X5), (int)ceil(X6), (int)ceil(X7), (int)ceil(X8)); - FDKprintf("fixp_ceilToInt %i %i %i %i %i %i %i %i %i\n", res0, res1, res2, res3, res4, res5, res6, res7, res8); - FDKprintf("fixp_ceil %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", (float)f_res0*(float)FDKpow(2,INL_SF), - (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF), - (float)f_res4*(float)FDKpow(2,INL_SF), - (float)f_res5*(float)FDKpow(2,INL_SF), - (float)f_res6*(float)FDKpow(2,INL_SF), - (float)f_res7*(float)FDKpow(2,INL_SF), - (float)f_res8*(float)FDKpow(2,INL_SF)); - - FDKprintf("\n---- min/max ceil ----\n"); - res1 = fixp_ceilToInt(f_reg_min, INL_SF); - res2 = fixp_ceilToInt(f_reg_null, INL_SF); - res3 = fixp_ceilToInt(f_reg_max, INL_SF); - - f_res1 = fixp_ceil(f_reg_min, INL_SF); - f_res2 = fixp_ceil(f_reg_null, INL_SF); - f_res3 = fixp_ceil(f_reg_max, INL_SF); - - FDKprintf("reference %i %i %i\n", (int)ceil(X_MIN), (int)ceil(X_NULL), (int)ceil(X_MAX)); - FDKprintf("fixp_ceilToInt %i %i %i\n", res1, res2, res3); - FDKprintf("fixp_ceil %10.7f %10.7f %10.7f\n", (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF)); - FDKprintf("\n\n\n"); - - - FDKprintf("---- trunc ----\n"); - res0 = fixp_truncateToInt(f_reg0, INL_SF); f_res0 = fixp_truncate(f_reg0, INL_SF); - res1 = fixp_truncateToInt(f_reg1, INL_SF); f_res1 = fixp_truncate(f_reg1, INL_SF); - res2 = fixp_truncateToInt(f_reg2, INL_SF); f_res2 = fixp_truncate(f_reg2, INL_SF); - res3 = fixp_truncateToInt(f_reg3, INL_SF); f_res3 = fixp_truncate(f_reg3, INL_SF); - res4 = fixp_truncateToInt(f_reg4, INL_SF); f_res4 = fixp_truncate(f_reg4, INL_SF); - res5 = fixp_truncateToInt(f_reg5, INL_SF); f_res5 = fixp_truncate(f_reg5, INL_SF); - res6 = fixp_truncateToInt(f_reg6, INL_SF); f_res6 = fixp_truncate(f_reg6, INL_SF); - res7 = fixp_truncateToInt(f_reg7, INL_SF); f_res7 = fixp_truncate(f_reg7, INL_SF); - res8 = fixp_truncateToInt(f_reg8, INL_SF); f_res8 = fixp_truncate(f_reg8, INL_SF); - FDKprintf("reference %i %i %i %i %i %i %i %i %i\n", (int)(X0), (int)(X1), (int)(X2), (int)(X3), (int)(X4), (int)(X5), (int)(X6), (int)(X7), (int)(X8)); - FDKprintf("fixp_truncateToInt %i %i %i %i %i %i %i %i %i\n", res0, res1, res2, res3, res4, res5, res6, res7, res8); - FDKprintf("fixp_truncate %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", (float)f_res0*(float)FDKpow(2,INL_SF), - (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF), - (float)f_res4*(float)FDKpow(2,INL_SF), - (float)f_res5*(float)FDKpow(2,INL_SF), - (float)f_res6*(float)FDKpow(2,INL_SF), - (float)f_res7*(float)FDKpow(2,INL_SF), - (float)f_res8*(float)FDKpow(2,INL_SF)); - - FDKprintf("\n---- min/max trunc ----\n"); - res1 = fixp_truncateToInt(f_reg_min, INL_SF); f_res1 = fixp_truncate(f_reg_min, INL_SF); - res2 = fixp_truncateToInt(f_reg_null,INL_SF); f_res2 = fixp_truncate(f_reg_null,INL_SF); - res3 = fixp_truncateToInt(f_reg_max, INL_SF); f_res3 = fixp_truncate(f_reg_max, INL_SF); - FDKprintf("reference %i %i %i\n", (int)(X_MIN), (int)(X_NULL), (int)(X_MAX)); - FDKprintf("fixp_truncateToInt %i %i %i\n", res1, res2, res3); - FDKprintf("fixp_truncate %10.7f %10.7f %10.7f\n", (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF)); - FDKprintf("\n\n\n"); - - - FDKprintf("---- round ----\n"); - res0 = fixp_roundToInt(f_reg0, INL_SF); f_res0 = fixp_round(f_reg0, INL_SF); - res1 = fixp_roundToInt(f_reg1, INL_SF); f_res1 = fixp_round(f_reg1, INL_SF); - res2 = fixp_roundToInt(f_reg2, INL_SF); f_res2 = fixp_round(f_reg2, INL_SF); - res3 = fixp_roundToInt(f_reg3, INL_SF); f_res3 = fixp_round(f_reg3, INL_SF); - res4 = fixp_roundToInt(f_reg4, INL_SF); f_res4 = fixp_round(f_reg4, INL_SF); - res5 = fixp_roundToInt(f_reg5, INL_SF); f_res5 = fixp_round(f_reg5, INL_SF); - res6 = fixp_roundToInt(f_reg6, INL_SF); f_res6 = fixp_round(f_reg6, INL_SF); - res7 = fixp_roundToInt(f_reg7, INL_SF); f_res7 = fixp_round(f_reg7, INL_SF); - res8 = fixp_roundToInt(f_reg8, INL_SF); f_res8 = fixp_round(f_reg8, INL_SF); - FDKprintf("reference %i %i %i %i %i %i %i %i %i\n", roundRef(X0), - roundRef(X1), - roundRef(X2), - roundRef(X3), - roundRef(X4), - roundRef(X5), - roundRef(X6), - roundRef(X7), - roundRef(X8)); - FDKprintf("fixp_roundToInt %i %i %i %i %i %i %i %i %i\n", res0, res1, res2, res3, res4, res5, res6, res7, res8); - FDKprintf("fixp_round %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f %10.7f\n", (float)f_res0*(float)FDKpow(2,INL_SF), - (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF), - (float)f_res4*(float)FDKpow(2,INL_SF), - (float)f_res5*(float)FDKpow(2,INL_SF), - (float)f_res6*(float)FDKpow(2,INL_SF), - (float)f_res7*(float)FDKpow(2,INL_SF), - (float)f_res8*(float)FDKpow(2,INL_SF)); - - FDKprintf("\n---- min/max round ----\n"); - res1 = fixp_roundToInt(f_reg_min, INL_SF); f_res1 = fixp_round(f_reg_min, INL_SF); - res2 = fixp_roundToInt(f_reg_null,INL_SF); f_res2 = fixp_round(f_reg_null,INL_SF); - res3 = fixp_roundToInt(f_reg_max, INL_SF); f_res3 = fixp_round(f_reg_max, INL_SF); - - FDKprintf("reference %i %i %i\n", roundRef(X_MIN), - roundRef(X_NULL), - roundRef(X_MAX)); - FDKprintf("fixp_roundToInt %i %i %i\n", res1, res2, res3); - FDKprintf("fixp_round %10.7f %10.7f %10.7f\n", (float)f_res1*(float)FDKpow(2,INL_SF), - (float)f_res2*(float)FDKpow(2,INL_SF), - (float)f_res3*(float)FDKpow(2,INL_SF)); - FDKprintf("\n\n\n"); - -} -#endif diff --git a/libFDK/src/mdct.cpp b/libFDK/src/mdct.cpp index ed8ec0c..7b9864f 100644 --- a/libFDK/src/mdct.cpp +++ b/libFDK/src/mdct.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2011) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +3. NO PATENT LICENSE - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Josef Hoepfl, Manuel Jander Description: MDCT routines - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "mdct.h" @@ -33,7 +95,6 @@ #include "dct.h" #include "fixpoint_math.h" -#define OPT_OVERLAP_ADD void mdct_init( H_MDCT hMdct, FIXP_DBL *overlap, @@ -47,21 +108,6 @@ void mdct_init( H_MDCT hMdct, hMdct->ov_size = overlapBufferSize; } -INT mdct( H_MDCT hMdct, - FIXP_DBL *spectrum, - INT *scalefactor, - INT_PCM *input, - INT tl, - INT nr, - INT fr, - const FIXP_WTP *wrs ) -{ - /* Fold and windowing */ - - /* DCT IV */ - // dct_IV(); - return tl; -} void imdct_gain(FIXP_DBL *pGain_m, int *pGain_e, int tl) { diff --git a/libFDK/src/mips/fft_rad2_mips.cpp b/libFDK/src/mips/fft_rad2_mips.cpp index 2d40521..8518c79 100644 --- a/libFDK/src/mips/fft_rad2_mips.cpp +++ b/libFDK/src/mips/fft_rad2_mips.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2007) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Description: dit_fft MIPS assembler replacements. - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #if defined(MIPS_DSP_LIB) diff --git a/libFDK/src/mips/mips_fft_twiddles.cpp b/libFDK/src/mips/mips_fft_twiddles.cpp index 2272d37..080c61e 100644 --- a/libFDK/src/mips/mips_fft_twiddles.cpp +++ b/libFDK/src/mips/mips_fft_twiddles.cpp @@ -1,24 +1,87 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** ******************************************************************************/ diff --git a/libFDK/src/mips/scale.cpp b/libFDK/src/mips/scale.cpp index 31d1f7e..9e5964a 100644 --- a/libFDK/src/mips/scale.cpp +++ b/libFDK/src/mips/scale.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2007) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Description: - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #if defined(__mips_dsp) diff --git a/libFDK/src/qmf.cpp b/libFDK/src/qmf.cpp index 361fcfd..e410f55 100644 --- a/libFDK/src/qmf.cpp +++ b/libFDK/src/qmf.cpp @@ -1,33 +1,96 @@ -/******************************** Fraunhofer IIS *************************** - (C) Copyright Fraunhofer IIS (2006) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +3. NO PATENT LICENSE +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/******************************** Fraunhofer IIS *************************** - $Id$ Author(s): Markus Lohwasser, Josef Hoepfl, Manuel Jander Description: QMF filterbank - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ + /*! \file - \brief Complex qmf analysis/synthesis, $Revision: 37444 $ + \brief Complex qmf analysis/synthesis, This module contains the qmf filterbank for analysis [ cplxAnalysisQmfFiltering() ] and synthesis [ cplxSynthesisQmfFiltering() ]. It is a polyphase implementation of a complex exponential modulated filter bank. The analysis part usually runs at half the sample rate diff --git a/libFDK/src/scale.cpp b/libFDK/src/scale.cpp index 174677d..96c0165 100644 --- a/libFDK/src/scale.cpp +++ b/libFDK/src/scale.cpp @@ -1,29 +1,91 @@ -/*************************** Fraunhofer IIS FDK Tools ********************** - (C) Copyright Fraunhofer IIS (2005) - All Rights Reserved +/* ----------------------------------------------------------------------------------------------------------- +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. + All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software that implements +the MPEG Advanced Audio Coding ("AAC") encoding and decoding scheme for digital audio. +This FDK AAC Codec software is intended to be used on a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual +audio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by +independent studies and is widely deployed. AAC has been standardized by ISO and IEC as part +of the MPEG specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer) +may be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners +individually for the purpose of encoding or decoding bit streams in products that are compliant with +the ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license +these patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec +software may already be covered under those patent licenses when it is used for those licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality, +are also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional +applications information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, are permitted without +payment of copyright license fees provided that you satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of the FDK AAC Codec or +your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation and/or other materials +provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. +You must make available free of charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. - Please be advised that this software and/or program delivery is - Confidential Information of Fraunhofer and subject to and covered by the +The name of Fraunhofer may not be used to endorse or promote products derived from this library without +prior written permission. - Fraunhofer IIS Software Evaluation Agreement - between Google Inc. and Fraunhofer - effective and in full force since March 1, 2012. +You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec +software or your modifications thereto. - You may use this software and/or program only under the terms and - conditions described in the above mentioned Fraunhofer IIS Software - Evaluation Agreement. Any other and/or further use requires a separate agreement. +Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software +and the date of any change. For modified versions of the FDK AAC Codec, the term +"Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term +"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android." +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer, +ARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with +respect to this software. + +You may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized +by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors +"AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties +of merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages, +including but not limited to procurement of substitute goods or services; loss of use, data, or profits, +or business interruption, however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of this software, even if +advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de +----------------------------------------------------------------------------------------------------------- */ + +/*************************** Fraunhofer IIS FDK Tools ********************** - $Id$ Author(s): Description: Scaling operations - This software and/or program is protected by copyright law and international - treaties. Any reproduction or distribution of this software and/or program, - or any portion of it, may result in severe civil and criminal penalties, and - will be prosecuted to the maximum extent possible under law. - ******************************************************************************/ #include "common_fix.h" @@ -328,7 +390,7 @@ INT getScalefactorPCM(const INT_PCM *vector, /*!< Pointer to input vector */ /*! * * \brief Calculate max possible scale factor for input vector of shorts - * \param stride, item increment between verctor members. + * \param stride, item increment between vector members. * \return Maximum scale factor * */ |