Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasimir666 <casimir666@users.sourceforge.net>2009-02-14 01:54:06 +0300
committerCasimir666 <casimir666@users.sourceforge.net>2009-02-14 01:54:06 +0300
commitd0acee9381fb88fd62a08c1786932c2b0053ec71 (patch)
treefcb26fc9556530023f4ccbd4cfff5b744b0a230d
parent377cc63dc4f603c3df86e092180714f98945a5ea (diff)
Changed : Faad updated to rev 2.2.7
- DAB+ support - Use public headers internally to prevent duplicate declarations - Explicitly typedef all types as signed - Made sure MAIN prediction can't be started after the first frame - Lot's of compilation issues solved - Bugfix in SBR envelope border calculation git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@993 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/ChangeLog8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/README6
-rw-r--r--src/filters/transform/mpadecfilter/faad2/include/faad.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/include/neaacdec.h17
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/analysis.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/bits.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/bits.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/cfft.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/cfft.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/cfft_tab.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_1.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_10.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_11.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_2.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_3.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_4.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_5.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_6.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_7.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_8.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_9.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_sf.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/common.c12
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/common.h30
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/decoder.c192
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/drc.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/drc.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/error.c11
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/error.h10
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.c9
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/fixed.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/hcr.c16
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/huffman.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/huffman.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/iq_table.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/is.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/is.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/kbd_win.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/libfaad.vcproj6
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/mdct.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/mdct.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/mdct_tab.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/mp4.c83
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/mp4.h20
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ms.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ms.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/output.c23
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/output.h10
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/pns.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/pns.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.c51
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.h11
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ps_syntax.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ps_tables.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/pulse.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/pulse.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.c10
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.c12
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.c12
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_noise.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf_c.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.c10
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.c12
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/sine_win.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/specrec.c25
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/specrec.h14
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/ssr_win.h8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/structs.h88
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/syntax.c272
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/syntax.h17
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/tns.c8
-rw-r--r--src/filters/transform/mpadecfilter/faad2/libfaad/tns.h8
103 files changed, 841 insertions, 754 deletions
diff --git a/src/filters/transform/mpadecfilter/faad2/ChangeLog b/src/filters/transform/mpadecfilter/faad2/ChangeLog
index d38ec160f..e57e345ca 100644
--- a/src/filters/transform/mpadecfilter/faad2/ChangeLog
+++ b/src/filters/transform/mpadecfilter/faad2/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-02 - Version 2.7
+ - DAB+ support
+ - Use public headers internally to prevent duplicate declarations
+ - Explicitly typedef all types as signed
+ - Made sure MAIN prediction can't be started after the first frame
+ - Lot's of compilation issues solved
+ - Bugfix in SBR envelope border calculation
+
21 january 2005 gpascutto(at)nero.com
- hcr.c, drm_dec.c: updates for DRM PS standard, error resilience changes
- reverted above error resilience changes
diff --git a/src/filters/transform/mpadecfilter/faad2/README b/src/filters/transform/mpadecfilter/faad2/README
index ec1c57f73..c50e110a2 100644
--- a/src/filters/transform/mpadecfilter/faad2/README
+++ b/src/filters/transform/mpadecfilter/faad2/README
@@ -33,10 +33,8 @@ For FAAD2 the following license applies:
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
diff --git a/src/filters/transform/mpadecfilter/faad2/include/faad.h b/src/filters/transform/mpadecfilter/faad2/include/faad.h
index 6ebc0d67d..72f407280 100644
--- a/src/filters/transform/mpadecfilter/faad2/include/faad.h
+++ b/src/filters/transform/mpadecfilter/faad2/include/faad.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: faad.h,v 1.50 2007/10/11 18:41:50 menno Exp $
+** $Id: faad.h,v 1.51 2007/11/01 12:33:29 menno Exp $
**/
/* warn people for update */
diff --git a/src/filters/transform/mpadecfilter/faad2/include/neaacdec.h b/src/filters/transform/mpadecfilter/faad2/include/neaacdec.h
index 466890934..a45f1d09e 100644
--- a/src/filters/transform/mpadecfilter/faad2/include/neaacdec.h
+++ b/src/filters/transform/mpadecfilter/faad2/include/neaacdec.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: neaacdec.h,v 1.10 2007/10/11 18:41:50 menno Exp $
+** $Id: neaacdec.h,v 1.13 2009/01/26 23:51:15 menno Exp $
**/
#ifndef __NEAACDEC_H__
@@ -71,7 +69,7 @@ extern "C" {
#endif
#endif
-#define FAAD2_VERSION "2.6"
+#define FAAD2_VERSION "2.7"
/* object types for AAC */
#define MAIN 1
@@ -88,6 +86,7 @@ extern "C" {
#define RAW 0
#define ADIF 1
#define ADTS 2
+#define LATM 3
/* SBR signalling */
#define NO_SBR 0
@@ -218,9 +217,11 @@ long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
unsigned char *channels);
/* Init the library using a DecoderSpecificInfo */
-char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer,
+char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder,
+ unsigned char *pBuffer,
unsigned long SizeOfDecoderSpecificInfo,
- unsigned long *samplerate, unsigned char *channels);
+ unsigned long *samplerate,
+ unsigned char *channels);
/* Init the library for DRM */
char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate,
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/analysis.h b/src/filters/transform/mpadecfilter/faad2/libfaad/analysis.h
index 87175491a..50e43fa04 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/analysis.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/analysis.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: analysis.h,v 1.17 2007/10/11 18:41:50 menno Exp $
+** $Id: analysis.h,v 1.18 2007/11/01 12:33:29 menno Exp $
**/
#ifndef __ANALYSIS_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/bits.c b/src/filters/transform/mpadecfilter/faad2/libfaad/bits.c
index 858201ea8..dc14d7a03 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/bits.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/bits.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: bits.c,v 1.43 2007/10/11 18:41:50 menno Exp $
+** $Id: bits.c,v 1.44 2007/11/01 12:33:29 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/bits.h b/src/filters/transform/mpadecfilter/faad2/libfaad/bits.h
index b5b75b21d..e303e8e72 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/bits.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/bits.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: bits.h,v 1.44 2007/10/11 18:41:50 menno Exp $
+** $Id: bits.h,v 1.45 2007/11/01 12:33:29 menno Exp $
**/
#ifndef __BITS_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.c b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.c
index 70b6a9e56..5b01d75d3 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: cfft.c,v 1.34 2007/10/11 18:41:50 menno Exp $
+** $Id: cfft.c,v 1.35 2007/11/01 12:33:29 menno Exp $
**/
/*
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.h b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.h
index 2d9308324..dc89cdc85 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: cfft.h,v 1.23 2007/10/11 18:41:50 menno Exp $
+** $Id: cfft.h,v 1.24 2007/11/01 12:33:29 menno Exp $
**/
#ifndef __CFFT_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft_tab.h b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft_tab.h
index f48376dea..80b1b75be 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/cfft_tab.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/cfft_tab.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: cfft_tab.h,v 1.20 2007/10/11 18:41:50 menno Exp $
+** $Id: cfft_tab.h,v 1.21 2007/11/01 12:33:29 menno Exp $
**/
#ifndef __CFFT_TAB_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb.h
index a43aaa56a..29bbca4f8 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb.h,v 1.7 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb.h,v 1.8 2007/11/01 12:34:10 menno Exp $
**/
#ifndef __HCB_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_1.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_1.h
index bc6154ab7..f6632c230 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_1.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_1.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_1.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_1.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_1 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_10.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_10.h
index 33213d76e..87e621df5 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_10.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_10.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_10.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_10.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_10 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_11.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_11.h
index 57b2b0f68..509a1d684 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_11.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_11.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_11.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_11.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_11 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_2.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_2.h
index 296632f64..8edfe525d 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_2.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_2.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_2.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_2.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_2 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_3.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_3.h
index 118a91243..e9481e198 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_3.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_3.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_3.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_3.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* Binary search huffman table HCB_3 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_4.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_4.h
index 67af13a3a..c2b43e005 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_4.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_4.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_4.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_4.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_4 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_5.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_5.h
index 327507fa4..ca7c473bf 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_5.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_5.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_5.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_5.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* Binary search huffman table HCB_5 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_6.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_6.h
index 4ebeadd64..2181d63d5 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_6.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_6.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_6.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_6.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_6 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_7.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_7.h
index e9e0793d5..54c85c11d 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_7.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_7.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_7.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_7.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* Binary search huffman table HCB_7 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_8.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_8.h
index b54d91d29..6e3f1009e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_8.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_8.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_8.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_8.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* 2-step huffman table HCB_8 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_9.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_9.h
index 598da7922..bdba2c222 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_9.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_9.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_9.h,v 1.4 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_9.h,v 1.5 2007/11/01 12:34:11 menno Exp $
**/
/* Binary search huffman table HCB_9 */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_sf.h b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_sf.h
index b723f3876..3c02b3d84 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_sf.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/codebook/hcb_sf.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcb_sf.h,v 1.6 2006/05/07 18:09:41 menno Exp $
+** $Id: hcb_sf.h,v 1.7 2007/11/01 12:34:11 menno Exp $
**/
/* Binary search huffman table HCB_SF */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/common.c b/src/filters/transform/mpadecfilter/faad2/libfaad/common.c
index 09fd6ac71..be08d351e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/common.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/common.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: common.c,v 1.25 2007/10/11 18:41:50 menno Exp $
+** $Id: common.c,v 1.27 2008/03/23 23:03:28 menno Exp $
**/
/* just some common functions that could be used anywhere */
@@ -246,7 +244,7 @@ uint32_t ne_rng(uint32_t *__r1, uint32_t *__r2)
return (*__r1 = (t3 >> 1) | t1 ) ^ (*__r2 = (t4 + t4) | t2 );
}
-uint32_t ones32(uint32_t x)
+static uint32_t ones32(uint32_t x)
{
x -= ((x >> 1) & 0x55555555);
x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
@@ -257,7 +255,7 @@ uint32_t ones32(uint32_t x)
return (x & 0x0000003f);
}
-uint32_t floor_log2(uint32_t x)
+static uint32_t floor_log2(uint32_t x)
{
#if 1
x |= (x >> 1);
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/common.h b/src/filters/transform/mpadecfilter/faad2/libfaad/common.h
index d10495b2a..b696b4a9e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/common.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/common.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: common.h,v 1.71 2007/10/11 18:41:50 menno Exp $
+** $Id: common.h,v 1.77 2009/02/05 00:51:03 menno Exp $
**/
#ifndef __COMMON_H__
@@ -41,6 +39,8 @@ extern "C" {
# include "../config.h"
#endif
+#include "neaacdec.h"
+
#if 1
#define INLINE __inline
#else
@@ -174,10 +174,10 @@ typedef unsigned __int64 uint64_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int8 uint8_t;
-typedef __int64 int64_t;
-typedef __int32 int32_t;
-typedef __int16 int16_t;
-typedef __int8 int8_t;
+typedef signed __int64 int64_t;
+typedef signed __int32 int32_t;
+typedef signed __int16 int16_t;
+typedef signed __int8 int8_t;
typedef float float32_t;
@@ -216,17 +216,17 @@ typedef float float32_t;
/* we need these... */
#ifndef __TCS__
typedef unsigned long long uint64_t;
-typedef long long int64_t;
+typedef signed long long int64_t;
#else
typedef unsigned long uint64_t;
-typedef long int64_t;
+typedef signed long int64_t;
#endif
typedef unsigned long uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
-typedef long int32_t;
-typedef short int16_t;
-typedef char int8_t;
+typedef signed long int32_t;
+typedef signed short int16_t;
+typedef signed char int8_t;
# endif
#endif
#if HAVE_UNISTD_H
@@ -407,8 +407,6 @@ typedef real_t complex_t[2];
/* common functions */
uint8_t cpu_has_sse(void);
uint32_t ne_rng(uint32_t *__r1, uint32_t *__r2);
-uint32_t ones32(uint32_t x);
-uint32_t floor_log2(uint32_t x);
uint32_t wl_min_lzc(uint32_t x);
#ifdef FIXED_POINT
#define LOG2_MIN_INF REAL_CONST(-10000)
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/decoder.c b/src/filters/transform/mpadecfilter/faad2/libfaad/decoder.c
index d0a13ef11..85dd423cf 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/decoder.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/decoder.c
@@ -19,24 +19,22 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: decoder.c,v 1.110 2007/10/11 18:41:50 menno Exp $
+** $Id: decoder.c,v 1.117 2009/02/05 00:51:03 menno Exp $
**/
#include "common.h"
#include "structs.h"
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
-#include "decoder.h"
#include "mp4.h"
#include "syntax.h"
#include "error.h"
@@ -56,20 +54,24 @@ uint16_t dbg_count;
#endif
/* static function declarations */
-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
- uint8_t *buffer, uint32_t buffer_size,
- void **sample_buffer, uint32_t sample_buffer_size);
-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo);
+static void* aac_frame_decode(NeAACDecStruct *hDecoder,
+ NeAACDecFrameInfo *hInfo,
+ unsigned char *buffer,
+ unsigned long buffer_size,
+ void **sample_buffer2,
+ unsigned long sample_buffer_size);
+static void create_channel_config(NeAACDecStruct *hDecoder,
+ NeAACDecFrameInfo *hInfo);
-char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode)
+char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode)
{
if (errcode >= NUM_ERROR_MESSAGES)
return NULL;
return err_msg[errcode];
}
-uint32_t NEAACDECAPI NeAACDecGetCapabilities(void)
+unsigned long NEAACDECAPI NeAACDecGetCapabilities(void)
{
uint32_t cap = 0;
@@ -99,9 +101,9 @@ const unsigned char mes[] = { 0x67,0x20,0x61,0x20,0x20,0x20,0x6f,0x20,0x72,0x20,
NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
{
uint8_t i;
- NeAACDecHandle hDecoder = NULL;
+ NeAACDecStruct *hDecoder = NULL;
- if ((hDecoder = (NeAACDecHandle)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
+ if ((hDecoder = (NeAACDecStruct*)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
return NULL;
memset(hDecoder, 0, sizeof(NeAACDecStruct));
@@ -113,6 +115,7 @@ NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
hDecoder->config.downMatrix = 0;
hDecoder->adts_header_present = 0;
hDecoder->adif_header_present = 0;
+ hDecoder->latm_header_present = 0;
#ifdef ERROR_RESILIENCE
hDecoder->aacSectionDataResilienceFlag = 0;
hDecoder->aacScalefactorDataResilienceFlag = 0;
@@ -156,8 +159,9 @@ NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
return hDecoder;
}
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder)
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hpDecoder)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if (hDecoder)
{
NeAACDecConfigurationPtr config = &(hDecoder->config);
@@ -168,9 +172,10 @@ NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHan
return NULL;
}
-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
- NeAACDecConfigurationPtr config)
+unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hpDecoder,
+ NeAACDecConfigurationPtr config)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if (hDecoder && config)
{
/* check if we can decode this object type */
@@ -205,14 +210,42 @@ uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
}
-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
- uint32_t buffer_size,
- uint32_t *samplerate, uint8_t *channels)
+static int latmCheck(latm_header *latm, bitfile *ld)
+{
+ uint32_t good=0, bad=0, bits, m;
+
+ while (ld->bytes_left)
+ {
+ bits = faad_latm_frame(latm, ld);
+ if(bits==-1U)
+ bad++;
+ else
+ {
+ good++;
+ while(bits>0)
+ {
+ m = min(bits, 8);
+ faad_getbits(ld, m);
+ bits -= m;
+ }
+ }
+ }
+
+ return (good>0);
+}
+
+
+long NEAACDECAPI NeAACDecInit(NeAACDecHandle hpDecoder,
+ unsigned char *buffer,
+ unsigned long buffer_size,
+ unsigned long *samplerate,
+ unsigned char *channels)
{
uint32_t bits = 0;
bitfile ld;
adif_header adif;
adts_header adts;
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL))
@@ -225,12 +258,33 @@ int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
if (buffer != NULL)
{
- faad_initbits(&ld, buffer, buffer_size);
+#if 0
+ int is_latm;
+ latm_header *l = &hDecoder->latm_config;
+#endif
+ faad_initbits(&ld, buffer, buffer_size);
+
+#if 0
+ memset(l, 0, sizeof(latm_header));
+ is_latm = latmCheck(l, &ld);
+ l->inited = 0;
+ l->frameLength = 0;
+ faad_rewindbits(&ld);
+ if(is_latm && l->ASCbits>0)
+ {
+ int32_t x;
+ hDecoder->latm_header_present = 1;
+ x = NeAACDecInit2(hDecoder, l->ASC, (l->ASCbits+7)/8, samplerate, channels);
+ if(x!=0)
+ hDecoder->latm_header_present = 0;
+ return x;
+ } else
+#endif
/* Check if an ADIF header is present */
if ((buffer[0] == 'A') && (buffer[1] == 'D') &&
- (buffer[2] == 'I') && (buffer[3] == 'F'))
- {
+ (buffer[2] == 'I') && (buffer[3] == 'F'))
+ {
hDecoder->adif_header_present = 1;
get_adif_header(&adif, &ld);
@@ -283,11 +337,11 @@ int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
#ifdef SBR_DEC
/* implicit signalling */
- if (*samplerate <= 24000 && !(hDecoder->config.dontUpSampleImplicitSBR))
+ if (*samplerate <= 24000 && (hDecoder->config.dontUpSampleImplicitSBR == 0))
{
*samplerate *= 2;
hDecoder->forceUpSampling = 1;
- } else if (*samplerate > 24000 && !(hDecoder->config.dontUpSampleImplicitSBR)) {
+ } else if (*samplerate > 24000 && (hDecoder->config.dontUpSampleImplicitSBR == 0)) {
hDecoder->downSampledSBR = 1;
}
#endif
@@ -312,10 +366,13 @@ int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
}
/* Init the library using a DecoderSpecificInfo */
-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
- uint32_t SizeOfDecoderSpecificInfo,
- uint32_t *samplerate, uint8_t *channels)
+char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hpDecoder,
+ unsigned char *pBuffer,
+ unsigned long SizeOfDecoderSpecificInfo,
+ unsigned long *samplerate,
+ unsigned char *channels)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
int8_t rc;
mp4AudioSpecificConfig mp4ASC;
@@ -333,7 +390,7 @@ int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
/* decode the audio specific config */
rc = AudioSpecificConfig2(pBuffer, SizeOfDecoderSpecificInfo, &mp4ASC,
- &(hDecoder->pce));
+ &(hDecoder->pce), hDecoder->latm_header_present);
/* copy the relevant info to the decoder handle */
*samplerate = mp4ASC.samplingFrequency;
@@ -403,9 +460,11 @@ int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
}
#ifdef DRM
-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
- uint8_t channels)
+char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hpDecoder,
+ unsigned long samplerate,
+ unsigned char channels)
{
+ NeAACDecStruct** hDecoder = (NeAACDecStruct**)hpDecoder;
if (hDecoder == NULL)
return 1; /* error */
@@ -444,9 +503,10 @@ int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate
}
#endif
-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder)
+void NEAACDECAPI NeAACDecClose(NeAACDecHandle hpDecoder)
{
uint8_t i;
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if (hDecoder == NULL)
return;
@@ -497,8 +557,9 @@ void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder)
if (hDecoder) faad_free(hDecoder);
}
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame)
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hpDecoder, long frame)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if (hDecoder)
{
hDecoder->postSeekResetFlag = 1;
@@ -508,7 +569,7 @@ void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame)
}
}
-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo)
+static void create_channel_config(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo)
{
hInfo->num_front_channels = 0;
hInfo->num_side_channels = 0;
@@ -726,18 +787,23 @@ static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hI
}
}
-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
+void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hpDecoder,
NeAACDecFrameInfo *hInfo,
- uint8_t *buffer, uint32_t buffer_size)
+ unsigned char *buffer,
+ unsigned long buffer_size)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0);
}
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
+void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hpDecoder,
NeAACDecFrameInfo *hInfo,
- uint8_t *buffer, uint32_t buffer_size,
- void **sample_buffer, uint32_t sample_buffer_size)
+ unsigned char *buffer,
+ unsigned long buffer_size,
+ void **sample_buffer,
+ unsigned long sample_buffer_size)
{
+ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
if ((sample_buffer == NULL) || (sample_buffer_size == 0))
{
hInfo->error = 27;
@@ -752,16 +818,19 @@ void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
#define ERROR_STATE_INIT 6
-static void conceal_output(NeAACDecHandle hDecoder, uint16_t frame_len,
+static void conceal_output(NeAACDecStruct *hDecoder, uint16_t frame_len,
uint8_t out_ch, void *sample_buffer)
{
return;
}
#endif
-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
- uint8_t *buffer, uint32_t buffer_size,
- void **sample_buffer2, uint32_t sample_buffer_size)
+static void* aac_frame_decode(NeAACDecStruct *hDecoder,
+ NeAACDecFrameInfo *hInfo,
+ unsigned char *buffer,
+ unsigned long buffer_size,
+ void **sample_buffer2,
+ unsigned long sample_buffer_size)
{
uint16_t i;
uint8_t channels = 0;
@@ -770,6 +839,7 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
uint32_t bitsconsumed;
uint16_t frame_len;
void *sample_buffer;
+ uint32_t startbit=0, endbit=0, payload_bits=0;
#ifdef PROFILE
int64_t count = faad_get_ts();
@@ -839,6 +909,19 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
}
#endif
+#if 0
+ if(hDecoder->latm_header_present)
+ {
+ payload_bits = faad_latm_frame(&hDecoder->latm_config, &ld);
+ startbit = faad_get_processed_bits(&ld);
+ if(payload_bits == -1U)
+ {
+ hInfo->error = 1;
+ goto error;
+ }
+ }
+#endif
+
#ifdef DRM
if (hDecoder->object_type == DRM_ER_LC)
{
@@ -884,6 +967,19 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
}
#endif
+#if 0
+ if(hDecoder->latm_header_present)
+ {
+ endbit = faad_get_processed_bits(&ld);
+ if(endbit-startbit > payload_bits)
+ fprintf(stderr, "\r\nERROR, too many payload bits read: %u > %d. Please. report with a link to a sample\n",
+ endbit-startbit, payload_bits);
+ if(hDecoder->latm_config.otherDataLenBits > 0)
+ faad_getbits(&ld, hDecoder->latm_config.otherDataLenBits);
+ faad_byte_align(&ld);
+ }
+#endif
+
channels = hDecoder->fr_channels;
if (hInfo->error > 0)
@@ -908,7 +1004,11 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
faad_endbits(&ld);
- if (!hDecoder->adts_header_present && !hDecoder->adif_header_present)
+ if (!hDecoder->adts_header_present && !hDecoder->adif_header_present
+#if 0
+ && !hDecoder->latm_header_present
+#endif
+ )
{
if (hDecoder->channelConfiguration == 0)
hDecoder->channelConfiguration = channels;
@@ -957,6 +1057,10 @@ static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
hInfo->header_type = ADIF;
if (hDecoder->adts_header_present)
hInfo->header_type = ADTS;
+#if 0
+ if (hDecoder->latm_header_present)
+ hInfo->header_type = LATM;
+#endif
#if (defined(PS_DEC) || defined(DRM_PS))
hInfo->ps = hDecoder->ps_used_global;
#endif
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/drc.c b/src/filters/transform/mpadecfilter/faad2/libfaad/drc.c
index 5b5082e17..3c9ff3ae0 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/drc.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/drc.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: drc.c,v 1.27 2007/10/11 18:41:50 menno Exp $
+** $Id: drc.c,v 1.28 2007/11/01 12:33:30 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/drc.h b/src/filters/transform/mpadecfilter/faad2/libfaad/drc.h
index 2ee12e029..49118bcd0 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/drc.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/drc.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: drc.h,v 1.21 2007/10/11 18:41:50 menno Exp $
+** $Id: drc.h,v 1.22 2007/11/01 12:33:30 menno Exp $
**/
#ifndef __DRC_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.c b/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.c
index 732351f6d..61cb8180e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: drm_dec.c,v 1.8 2007/10/11 18:41:50 menno Exp $
+** $Id: drm_dec.c,v 1.9 2007/11/01 12:33:30 menno Exp $
**/
#include <stdlib.h>
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.h b/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.h
index b78d86ada..d0ac995e4 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/drm_dec.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: drm_dec.h,v 1.7 2007/10/11 18:41:50 menno Exp $
+** $Id: drm_dec.h,v 1.8 2007/11/01 12:33:30 menno Exp $
**/
#ifndef __DRM_DEC_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/error.c b/src/filters/transform/mpadecfilter/faad2/libfaad/error.c
index 29182db0b..8984a8390 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/error.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/error.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: error.c,v 1.31 2007/10/11 18:41:50 menno Exp $
+** $Id: error.c,v 1.33 2008/09/19 23:31:39 menno Exp $
**/
#include "common.h"
@@ -66,6 +64,7 @@ char *err_msg[] = {
"PNS not allowed in DRM data stream",
"No standard extension payload allowed in DRM",
"PCE shall be the first element in a frame",
- "Bitstream value not allowed by specification"
+ "Bitstream value not allowed by specification",
+ "MAIN prediction not initialised"
};
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/error.h b/src/filters/transform/mpadecfilter/faad2/libfaad/error.h
index cf8c983a6..0e79423a7 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/error.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/error.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: error.h,v 1.25 2007/10/11 18:41:50 menno Exp $
+** $Id: error.h,v 1.27 2008/09/19 23:31:40 menno Exp $
**/
#ifndef __ERROR_H__
@@ -37,7 +35,7 @@
extern "C" {
#endif
-#define NUM_ERROR_MESSAGES 33
+#define NUM_ERROR_MESSAGES 34
extern char *err_msg[];
#ifdef __cplusplus
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.c b/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.c
index 00297deae..1b1464bca 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: filtbank.c,v 1.44 2007/10/11 18:41:50 menno Exp $
+** $Id: filtbank.c,v 1.46 2009/01/26 23:51:15 menno Exp $
**/
#include "common.h"
@@ -42,7 +40,6 @@
#endif
#include "filtbank.h"
-#include "decoder.h"
#include "syntax.h"
#include "kbd_win.h"
#include "sine_win.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.h b/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.h
index 14108925b..de0149c97 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/filtbank.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: filtbank.h,v 1.26 2007/10/11 18:41:50 menno Exp $
+** $Id: filtbank.h,v 1.27 2007/11/01 12:33:30 menno Exp $
**/
#ifndef __FILTBANK_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/fixed.h b/src/filters/transform/mpadecfilter/faad2/libfaad/fixed.h
index 43e344be8..531583772 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/fixed.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/fixed.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: fixed.h,v 1.31 2007/10/11 18:41:50 menno Exp $
+** $Id: fixed.h,v 1.32 2007/11/01 12:33:30 menno Exp $
**/
#ifndef __FIXED_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/hcr.c b/src/filters/transform/mpadecfilter/faad2/libfaad/hcr.c
index 4fc14f7f9..9df593ff3 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/hcr.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/hcr.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: hcr.c,v 1.23 2007/10/11 18:41:50 menno Exp $
+** $Id: hcr.c,v 1.26 2009/01/26 23:51:15 menno Exp $
**/
#include "common.h"
@@ -175,7 +173,7 @@ static void concat_bits(bits_t *b, bits_t *a)
b->len += a->len;
}
-uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
+static uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
{
/* only want spectral data CB's */
if ((this_sec_CB > ZERO_HCB && this_sec_CB <= ESC_HCB) || (this_sec_CB >= VCB11_FIRST && this_sec_CB <= VCB11_LAST))
@@ -193,7 +191,7 @@ uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
return 0;
}
-void read_segment(bits_t *segment, uint8_t segwidth, bitfile *ld)
+static void read_segment(bits_t *segment, uint8_t segwidth, bitfile *ld)
{
segment->len = segwidth;
@@ -208,7 +206,7 @@ void read_segment(bits_t *segment, uint8_t segwidth, bitfile *ld)
}
}
-void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, uint8_t cb)
+static void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, uint8_t cb)
{
codeword[index].sp_offset = sp;
codeword[index].cb = cb;
@@ -216,7 +214,7 @@ void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, uint8_t
codeword[index].bits.len = 0;
}
-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics,
+uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics,
bitfile *ld, int16_t *spectral_data)
{
uint16_t PCWs_done;
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.c b/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.c
index 71d30c072..e2656c089 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: huffman.c,v 1.25 2007/10/11 18:41:50 menno Exp $
+** $Id: huffman.c,v 1.26 2007/11/01 12:33:30 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.h b/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.h
index 3ca7eb56a..f8bcb237e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/huffman.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: huffman.h,v 1.27 2007/10/11 18:41:50 menno Exp $
+** $Id: huffman.h,v 1.28 2007/11/01 12:33:30 menno Exp $
**/
#ifndef __HUFFMAN_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.c
index 90bfc460f..70027ba2f 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ic_predict.c,v 1.27 2007/10/11 18:41:50 menno Exp $
+** $Id: ic_predict.c,v 1.28 2007/11/01 12:33:31 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.h
index 36089dff0..e69cd114e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ic_predict.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ic_predict.h,v 1.22 2007/10/11 18:41:50 menno Exp $
+** $Id: ic_predict.h,v 1.23 2007/11/01 12:33:31 menno Exp $
**/
#ifdef MAIN_DEC
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/iq_table.h b/src/filters/transform/mpadecfilter/faad2/libfaad/iq_table.h
index c94127e20..3cc2b8061 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/iq_table.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/iq_table.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: iq_table.h,v 1.19 2007/10/11 18:41:50 menno Exp $
+** $Id: iq_table.h,v 1.20 2007/11/01 12:33:31 menno Exp $
**/
#ifndef IQ_TABLE_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/is.c b/src/filters/transform/mpadecfilter/faad2/libfaad/is.c
index 32e8101ef..5236db077 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/is.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/is.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: is.c,v 1.27 2007/10/11 18:41:50 menno Exp $
+** $Id: is.c,v 1.28 2007/11/01 12:33:31 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/is.h b/src/filters/transform/mpadecfilter/faad2/libfaad/is.h
index e50fbae58..3e3b750ab 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/is.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/is.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: is.h,v 1.19 2007/10/11 18:41:50 menno Exp $
+** $Id: is.h,v 1.20 2007/11/01 12:33:31 menno Exp $
**/
#ifndef __IS_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/kbd_win.h b/src/filters/transform/mpadecfilter/faad2/libfaad/kbd_win.h
index f4be56bc7..de404c7ea 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/kbd_win.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/kbd_win.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: kbd_win.h,v 1.20 2007/10/11 18:41:50 menno Exp $
+** $Id: kbd_win.h,v 1.21 2007/11/01 12:33:31 menno Exp $
**/
#ifndef __KBD_WIN_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/libfaad.vcproj b/src/filters/transform/mpadecfilter/faad2/libfaad/libfaad.vcproj
index 95469285c..df1a27ab2 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/libfaad.vcproj
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/libfaad.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="libfaad"
ProjectGUID="{5EFCFACB-1835-422C-ACDA-E3B3A2F51387}"
RootNamespace="libfaad"
@@ -44,6 +44,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=""
+ AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
PrecompiledHeaderFile=".\Release\libfaad.pch"
DisableSpecificWarnings="4244"
@@ -109,6 +110,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=""
+ AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="_WIN64;NDEBUG;_LIB"
PrecompiledHeaderFile=".\Release\libfaad.pch"
/>
@@ -170,6 +172,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=""
+ AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
PrecompiledHeaderFile=".\Debug\libfaad.pch"
/>
@@ -234,6 +237,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=""
+ AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="_WIN64;_LIB;_DEBUG"
PrecompiledHeaderFile=".\Debug\libfaad.pch"
DebugInformationFormat="3"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.c b/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.c
index 1cd7eff8f..2be18ae9f 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: lt_predict.c,v 1.26 2007/10/11 18:41:50 menno Exp $
+** $Id: lt_predict.c,v 1.27 2007/11/01 12:33:31 menno Exp $
**/
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.h b/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.h
index 30dd95bb6..117f83424 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/lt_predict.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: lt_predict.h,v 1.19 2007/10/11 18:41:50 menno Exp $
+** $Id: lt_predict.h,v 1.20 2007/11/01 12:33:31 menno Exp $
**/
#ifdef LTP_DEC
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.c b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.c
index 876017c4e..247691e40 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: mdct.c,v 1.46 2007/10/11 18:41:50 menno Exp $
+** $Id: mdct.c,v 1.47 2007/11/01 12:33:31 menno Exp $
**/
/*
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.h b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.h
index 027d070b1..736180ead 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: mdct.h,v 1.29 2007/10/11 18:41:50 menno Exp $
+** $Id: mdct.h,v 1.30 2007/11/01 12:33:31 menno Exp $
**/
#ifndef __MDCT_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct_tab.h b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct_tab.h
index 6127231f9..eea285b67 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/mdct_tab.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/mdct_tab.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: mdct_tab.h,v 1.6 2007/10/11 18:41:50 menno Exp $
+** $Id: mdct_tab.h,v 1.7 2007/11/01 12:33:32 menno Exp $
**/
#ifndef __MDCT_TAB_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.c b/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.c
index ab79db813..72b2af6ce 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: mp4.c,v 1.37 2007/10/11 18:41:51 menno Exp $
+** $Id: mp4.c,v 1.40 2009/02/06 03:39:58 menno Exp $
**/
#include "common.h"
@@ -116,60 +114,53 @@ static uint8_t ObjectTypesTable[32] = {
};
/* Table 1.6.1 */
-int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
- uint32_t buffer_size,
- mp4AudioSpecificConfig *mp4ASC)
+char NEAACDECAPI NeAACDecAudioSpecificConfig(unsigned char *pBuffer,
+ unsigned long buffer_size,
+ mp4AudioSpecificConfig *mp4ASC)
{
- return AudioSpecificConfig2(pBuffer, buffer_size, mp4ASC, NULL);
+ return AudioSpecificConfig2(pBuffer, buffer_size, mp4ASC, NULL, 0);
}
-int8_t AudioSpecificConfig2(uint8_t *pBuffer,
- uint32_t buffer_size,
+int8_t AudioSpecificConfigFromBitfile(bitfile *ld,
mp4AudioSpecificConfig *mp4ASC,
- program_config *pce)
+ program_config *pce, uint32_t buffer_size, uint8_t short_form)
{
- bitfile ld;
int8_t result = 0;
+ uint32_t startpos = faad_get_processed_bits(ld);
#ifdef SBR_DEC
int8_t bits_to_decode = 0;
#endif
- if (pBuffer == NULL)
- return -7;
if (mp4ASC == NULL)
return -8;
memset(mp4ASC, 0, sizeof(mp4AudioSpecificConfig));
- faad_initbits(&ld, pBuffer, buffer_size);
- faad_byte_align(&ld);
-
- mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
+ mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(ld, 5
DEBUGVAR(1,1,"parse_audio_decoder_specific_info(): ObjectTypeIndex"));
- mp4ASC->samplingFrequencyIndex = (uint8_t)faad_getbits(&ld, 4
+ mp4ASC->samplingFrequencyIndex = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,2,"parse_audio_decoder_specific_info(): SamplingFrequencyIndex"));
+ if(mp4ASC->samplingFrequencyIndex==0x0f)
+ faad_getbits(ld, 24);
- mp4ASC->channelsConfiguration = (uint8_t)faad_getbits(&ld, 4
+ mp4ASC->channelsConfiguration = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,3,"parse_audio_decoder_specific_info(): ChannelsConfiguration"));
mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
if (ObjectTypesTable[mp4ASC->objectTypeIndex] != 1)
{
- faad_endbits(&ld);
return -1;
}
if (mp4ASC->samplingFrequency == 0)
{
- faad_endbits(&ld);
return -2;
}
if (mp4ASC->channelsConfiguration > 7)
{
- faad_endbits(&ld);
return -3;
}
@@ -189,7 +180,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
uint8_t tmp;
mp4ASC->sbr_present_flag = 1;
- tmp = (uint8_t)faad_getbits(&ld, 4
+ tmp = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,5,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
/* check for downsampled SBR */
if (tmp == mp4ASC->samplingFrequencyIndex)
@@ -197,12 +188,12 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
mp4ASC->samplingFrequencyIndex = tmp;
if (mp4ASC->samplingFrequencyIndex == 15)
{
- mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
+ mp4ASC->samplingFrequency = (uint32_t)faad_getbits(ld, 24
DEBUGVAR(1,6,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
} else {
mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
}
- mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
+ mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(ld, 5
DEBUGVAR(1,7,"parse_audio_decoder_specific_info(): ObjectTypeIndex"));
}
#endif
@@ -212,12 +203,12 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
mp4ASC->objectTypeIndex == 3 || mp4ASC->objectTypeIndex == 4 ||
mp4ASC->objectTypeIndex == 6 || mp4ASC->objectTypeIndex == 7)
{
- result = GASpecificConfig(&ld, mp4ASC, pce);
+ result = GASpecificConfig(ld, mp4ASC, pce);
#ifdef ERROR_RESILIENCE
} else if (mp4ASC->objectTypeIndex >= ER_OBJECT_START) { /* ER */
- result = GASpecificConfig(&ld, mp4ASC, pce);
- mp4ASC->epConfig = (uint8_t)faad_getbits(&ld, 2
+ result = GASpecificConfig(ld, mp4ASC, pce);
+ mp4ASC->epConfig = (uint8_t)faad_getbits(ld, 2
DEBUGVAR(1,143,"parse_audio_decoder_specific_info(): epConfig"));
if (mp4ASC->epConfig != 0)
@@ -236,21 +227,24 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
#ifdef SBR_DEC
- bits_to_decode = (int8_t)(buffer_size*8 - faad_get_processed_bits(&ld));
+ if(short_form)
+ bits_to_decode = 0;
+ else
+ bits_to_decode = (int8_t)(buffer_size*8 - (startpos-faad_get_processed_bits(ld)));
if ((mp4ASC->objectTypeIndex != 5) && (bits_to_decode >= 16))
{
- int16_t syncExtensionType = (int16_t)faad_getbits(&ld, 11
+ int16_t syncExtensionType = (int16_t)faad_getbits(ld, 11
DEBUGVAR(1,9,"parse_audio_decoder_specific_info(): syncExtensionType"));
if (syncExtensionType == 0x2b7)
{
- uint8_t tmp_OTi = (uint8_t)faad_getbits(&ld, 5
+ uint8_t tmp_OTi = (uint8_t)faad_getbits(ld, 5
DEBUGVAR(1,10,"parse_audio_decoder_specific_info(): extensionAudioObjectType"));
if (tmp_OTi == 5)
{
- mp4ASC->sbr_present_flag = (uint8_t)faad_get1bit(&ld
+ mp4ASC->sbr_present_flag = (uint8_t)faad_get1bit(ld
DEBUGVAR(1,11,"parse_audio_decoder_specific_info(): sbr_present_flag"));
if (mp4ASC->sbr_present_flag)
@@ -260,7 +254,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
/* Don't set OT to SBR until checked that it is actually there */
mp4ASC->objectTypeIndex = tmp_OTi;
- tmp = (uint8_t)faad_getbits(&ld, 4
+ tmp = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,12,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
/* check for downsampled SBR */
@@ -270,7 +264,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
if (mp4ASC->samplingFrequencyIndex == 15)
{
- mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
+ mp4ASC->samplingFrequency = (uint32_t)faad_getbits(ld, 24
DEBUGVAR(1,13,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
} else {
mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
@@ -294,7 +288,22 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
}
#endif
- faad_endbits(&ld);
+ faad_endbits(ld);
return result;
}
+
+int8_t AudioSpecificConfig2(uint8_t *pBuffer,
+ uint32_t buffer_size,
+ mp4AudioSpecificConfig *mp4ASC,
+ program_config *pce,
+ uint8_t short_form)
+{
+ uint8_t ret = 0;
+ bitfile ld;
+ faad_initbits(&ld, pBuffer, buffer_size);
+ faad_byte_align(&ld);
+ ret = AudioSpecificConfigFromBitfile(&ld, mp4ASC, pce, buffer_size, short_form);
+ faad_endbits(&ld);
+ return ret;
+}
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.h b/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.h
index b581afd8c..5a94be480 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/mp4.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: mp4.h,v 1.24 2007/10/11 18:41:51 menno Exp $
+** $Id: mp4.h,v 1.28 2009/02/05 00:51:03 menno Exp $
**/
#ifndef __MP4_H__
@@ -37,16 +35,16 @@
extern "C" {
#endif
-#include "decoder.h"
-
-int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
- uint32_t buffer_size,
- mp4AudioSpecificConfig *mp4ASC);
+#include "neaacdec.h"
int8_t AudioSpecificConfig2(uint8_t *pBuffer,
uint32_t buffer_size,
mp4AudioSpecificConfig *mp4ASC,
- program_config *pce);
+ program_config *pce, uint8_t short_form);
+
+int8_t AudioSpecificConfigFromBitfile(bitfile *ld,
+ mp4AudioSpecificConfig *mp4ASC,
+ program_config *pce, uint32_t bsize, uint8_t short_form);
#ifdef __cplusplus
}
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ms.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ms.c
index 6241c8a95..97c8fb198 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ms.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ms.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ms.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: ms.c,v 1.21 2007/11/01 12:33:32 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ms.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ms.h
index e1c421bbc..30cfadaf6 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ms.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ms.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ms.h,v 1.18 2007/10/11 18:41:51 menno Exp $
+** $Id: ms.h,v 1.19 2007/11/01 12:33:32 menno Exp $
**/
#ifndef __MS_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/output.c b/src/filters/transform/mpadecfilter/faad2/libfaad/output.c
index 05e58c7f3..424562705 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/output.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/output.c
@@ -19,22 +19,19 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: output.c,v 1.45 2007/10/11 18:41:51 menno Exp $
+** $Id: output.c,v 1.47 2009/01/26 23:51:15 menno Exp $
**/
#include "common.h"
#include "structs.h"
#include "output.h"
-#include "decoder.h"
#ifndef FIXED_POINT
@@ -89,7 +86,7 @@ if (sample >= 0.0f) \
#define CONV(a,b) ((a<<1)|(b&0x1))
-static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_16bit(NeAACDecStruct *hDecoder, real_t **input,
uint8_t channels, uint16_t frame_len,
int16_t **sample_buffer)
{
@@ -154,7 +151,7 @@ static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input,
}
}
-static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_24bit(NeAACDecStruct *hDecoder, real_t **input,
uint8_t channels, uint16_t frame_len,
int32_t **sample_buffer)
{
@@ -224,7 +221,7 @@ static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input,
}
}
-static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_32bit(NeAACDecStruct *hDecoder, real_t **input,
uint8_t channels, uint16_t frame_len,
int32_t **sample_buffer)
{
@@ -294,7 +291,7 @@ static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input,
}
}
-static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_float(NeAACDecStruct *hDecoder, real_t **input,
uint8_t channels, uint16_t frame_len,
float32_t **sample_buffer)
{
@@ -346,7 +343,7 @@ static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input,
}
}
-static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input,
+static void to_PCM_double(NeAACDecStruct *hDecoder, real_t **input,
uint8_t channels, uint16_t frame_len,
double **sample_buffer)
{
@@ -398,7 +395,7 @@ static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input,
}
}
-void *output_to_PCM(NeAACDecHandle hDecoder,
+void *output_to_PCM(NeAACDecStruct *hDecoder,
real_t **input, void *sample_buffer, uint8_t channels,
uint16_t frame_len, uint8_t format)
{
@@ -468,7 +465,7 @@ static INLINE real_t get_sample(real_t **input, uint8_t channel, uint16_t sample
}
}
-void* output_to_PCM(NeAACDecHandle hDecoder,
+void* output_to_PCM(NeAACDecStruct *hDecoder,
real_t **input, void *sample_buffer, uint8_t channels,
uint16_t frame_len, uint8_t format)
{
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/output.h b/src/filters/transform/mpadecfilter/faad2/libfaad/output.h
index 372a0f5af..9ab5c9e83 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/output.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/output.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: output.h,v 1.24 2007/10/11 18:41:51 menno Exp $
+** $Id: output.h,v 1.26 2009/01/26 23:51:15 menno Exp $
**/
#ifndef __OUTPUT_H__
@@ -37,7 +35,7 @@
extern "C" {
#endif
-void* output_to_PCM(NeAACDecHandle hDecoder,
+void* output_to_PCM(NeAACDecStruct *hDecoder,
real_t **input,
void *samplebuffer,
uint8_t channels,
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/pns.c b/src/filters/transform/mpadecfilter/faad2/libfaad/pns.c
index 4234aa8a2..248fd05ef 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/pns.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/pns.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: pns.c,v 1.37 2007/10/11 18:41:51 menno Exp $
+** $Id: pns.c,v 1.38 2007/11/01 12:33:32 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/pns.h b/src/filters/transform/mpadecfilter/faad2/libfaad/pns.h
index 5bc9d4bf5..38ced252d 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/pns.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/pns.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: pns.h,v 1.26 2007/10/11 18:41:51 menno Exp $
+** $Id: pns.h,v 1.27 2007/11/01 12:33:33 menno Exp $
**/
#ifndef __PNS_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.c
index 8a63a1231..6d9c7be90 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ps_dec.c,v 1.13 2007/10/11 18:41:51 menno Exp $
+** $Id: ps_dec.c,v 1.16 2009/01/26 22:32:31 menno Exp $
**/
#include "common.h"
@@ -164,16 +162,16 @@ typedef struct
/* static function declarations */
static void ps_data_decode(ps_info *ps);
-static hyb_info *hybrid_init();
+static hyb_info *hybrid_init(uint8_t numTimeSlotsRate);
static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
qmf_t *buffer, qmf_t **X_hybrid);
static void INLINE DCT3_4_unscaled(real_t *y, real_t *x);
static void channel_filter8(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
qmf_t *buffer, qmf_t **X_hybrid);
static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
- uint8_t use34);
+ uint8_t use34, uint8_t numTimeSlotsRate);
static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
- uint8_t use34);
+ uint8_t use34, uint8_t numTimeSlotsRate);
static int8_t delta_clip(int8_t i, int8_t min, int8_t max);
static void delta_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
@@ -194,7 +192,7 @@ static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64
/* */
-static hyb_info *hybrid_init()
+static hyb_info *hybrid_init(uint8_t numTimeSlotsRate)
{
uint8_t i;
@@ -210,7 +208,7 @@ static hyb_info *hybrid_init()
hyb->resolution20[1] = 2;
hyb->resolution20[2] = 2;
- hyb->frame_len = 32;
+ hyb->frame_len = numTimeSlotsRate;
hyb->work = (qmf_t*)faad_malloc((hyb->frame_len+12) * sizeof(qmf_t));
memset(hyb->work, 0, (hyb->frame_len+12) * sizeof(qmf_t));
@@ -235,6 +233,8 @@ static void hybrid_free(hyb_info *hyb)
{
uint8_t i;
+ if (!hyb) return;
+
if (hyb->work)
faad_free(hyb->work);
@@ -253,6 +253,8 @@ static void hybrid_free(hyb_info *hyb)
}
if (hyb->temp)
faad_free(hyb->temp);
+
+ faad_free(hyb);
}
/* real filter, size 2 */
@@ -503,7 +505,7 @@ static void channel_filter12(hyb_info *hyb, uint8_t frame_len, const real_t *fil
* to improve frequency resolution
*/
static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
- uint8_t use34)
+ uint8_t use34, uint8_t numTimeSlotsRate)
{
uint8_t k, n, band;
uint8_t offset = 0;
@@ -561,7 +563,7 @@ static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][3
/* group hybrid channels */
if (!use34)
{
- for (n = 0; n < 32 /*30?*/; n++)
+ for (n = 0; n < numTimeSlotsRate; n++)
{
QMF_RE(X_hybrid[n][3]) += QMF_RE(X_hybrid[n][4]);
QMF_IM(X_hybrid[n][3]) += QMF_IM(X_hybrid[n][4]);
@@ -577,7 +579,7 @@ static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][3
}
static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
- uint8_t use34)
+ uint8_t use34, uint8_t numTimeSlotsRate)
{
uint8_t k, n, band;
uint8_t offset = 0;
@@ -911,16 +913,14 @@ static void ps_data_decode(ps_info *ps)
ps->border_position[0] = 0;
for (env = 1; env < ps->num_env; env++)
{
- ps->border_position[env] = (env * 32 /* 30 for 960? */) / ps->num_env;
+ ps->border_position[env] = (env * ps->numTimeSlotsRate) / ps->num_env;
}
- ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
+ ps->border_position[ps->num_env] = ps->numTimeSlotsRate;
} else {
ps->border_position[0] = 0;
- if (ps->border_position[ps->num_env] < 32 /* 30 for 960? */)
+ if (ps->border_position[ps->num_env] < ps->numTimeSlotsRate)
{
- ps->num_env++;
- ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
for (bin = 0; bin < 34; bin++)
{
ps->iid_index[ps->num_env][bin] = ps->iid_index[ps->num_env-1][bin];
@@ -931,11 +931,13 @@ static void ps_data_decode(ps_info *ps)
ps->ipd_index[ps->num_env][bin] = ps->ipd_index[ps->num_env-1][bin];
ps->opd_index[ps->num_env][bin] = ps->opd_index[ps->num_env-1][bin];
}
+ ps->num_env++;
+ ps->border_position[ps->num_env] = ps->numTimeSlotsRate;
}
for (env = 1; env < ps->num_env; env++)
{
- int8_t thr = 32 /* 30 for 960? */ - (ps->num_env - env);
+ int8_t thr = ps->numTimeSlotsRate - (ps->num_env - env);
if (ps->border_position[env] > thr)
{
@@ -1864,7 +1866,7 @@ void ps_free(ps_info *ps)
faad_free(ps);
}
-ps_info *ps_init(uint8_t sr_index)
+ps_info *ps_init(uint8_t sr_index, uint8_t numTimeSlotsRate)
{
uint8_t i;
uint8_t short_delay_band;
@@ -1872,7 +1874,8 @@ ps_info *ps_init(uint8_t sr_index)
ps_info *ps = (ps_info*)faad_malloc(sizeof(ps_info));
memset(ps, 0, sizeof(ps_info));
- ps->hyb = hybrid_init();
+ ps->hyb = hybrid_init(numTimeSlotsRate);
+ ps->numTimeSlotsRate = numTimeSlotsRate;
ps->ps_data_available = 0;
@@ -1988,7 +1991,7 @@ uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
* frequency resolution
*/
hybrid_analysis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
- ps->use34hybrid_bands);
+ ps->use34hybrid_bands, ps->numTimeSlotsRate);
/* decorrelate mono signal */
ps_decorrelate(ps, X_left, X_right, X_hybrid_left, X_hybrid_right);
@@ -1998,10 +2001,10 @@ uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
/* hybrid synthesis, to rebuild the SBR QMF matrices */
hybrid_synthesis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
- ps->use34hybrid_bands);
+ ps->use34hybrid_bands, ps->numTimeSlotsRate);
hybrid_synthesis((hyb_info*)ps->hyb, X_right, X_hybrid_right,
- ps->use34hybrid_bands);
+ ps->use34hybrid_bands, ps->numTimeSlotsRate);
return 0;
}
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.h
index 94d6ba869..090244693 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_dec.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ps_dec.h,v 1.11 2007/10/11 18:41:51 menno Exp $
+** $Id: ps_dec.h,v 1.13 2009/01/26 22:32:31 menno Exp $
**/
#ifndef __PS_DEC_H__
@@ -94,6 +92,7 @@ typedef struct
/* hybrid filterbank parameters */
void *hyb;
uint8_t use34hybrid_bands;
+ uint8_t numTimeSlotsRate;
/**/
uint8_t num_groups;
@@ -140,7 +139,7 @@ typedef struct
uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header);
/* ps_dec.c */
-ps_info *ps_init(uint8_t sr_index);
+ps_info *ps_init(uint8_t sr_index, uint8_t numTimeSlotsRate);
void ps_free(ps_info *ps);
uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]);
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_syntax.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_syntax.c
index 22b1ba4a9..50253d459 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_syntax.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_syntax.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ps_syntax.c,v 1.10 2007/10/11 18:41:51 menno Exp $
+** $Id: ps_syntax.c,v 1.11 2007/11/01 12:33:33 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_tables.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_tables.h
index 0d36a4d35..f3370be9d 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ps_tables.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ps_tables.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ps_tables.h,v 1.7 2007/10/11 18:41:51 menno Exp $
+** $Id: ps_tables.h,v 1.8 2007/11/01 12:33:33 menno Exp $
**/
#ifndef __PS_TABLES_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.c b/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.c
index 00ef68e41..3dd973abf 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: pulse.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: pulse.c,v 1.21 2007/11/01 12:33:34 menno Exp $
**/
#include "common.h"
#include "structs.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.h b/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.h
index e2cfd38b8..f7676cd89 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/pulse.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: pulse.h,v 1.19 2007/10/11 18:41:51 menno Exp $
+** $Id: pulse.h,v 1.20 2007/11/01 12:33:34 menno Exp $
**/
#ifndef __PULSE_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.c b/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.c
index 9b7c81cad..73619c6d1 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: rvlc.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: rvlc.c,v 1.21 2007/11/01 12:33:34 menno Exp $
**/
/* RVLC scalefactor decoding
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.h b/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.h
index 5bf8ad530..56f630fa4 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/rvlc.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: rvlc.h,v 1.16 2007/10/11 18:41:51 menno Exp $
+** $Id: rvlc.h,v 1.17 2007/11/01 12:33:34 menno Exp $
**/
#ifndef __RVLC_SCF_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.c
index ab37c2bb9..16e7128ea 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_dct.c,v 1.19 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_dct.c,v 1.20 2007/11/01 12:33:34 menno Exp $
**/
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.h
index 7ce384140..ce44fd7ef 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dct.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_dct.h,v 1.18 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_dct.h,v 1.19 2007/11/01 12:33:34 menno Exp $
**/
#ifndef __SBR_DCT_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.c
index ef6ed4b8c..0705ddd91 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_dec.c,v 1.42 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_dec.c,v 1.44 2009/01/26 22:32:31 menno Exp $
**/
@@ -639,7 +637,7 @@ uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *righ
sbr->ret += sbr_process_channel(sbr, left_channel, X_left, 0, dont_process, downSampledSBR);
/* copy some extra data for PS */
- for (l = 32; l < 38; l++)
+ for (l = sbr->numTimeSlotsRate; l < sbr->numTimeSlotsRate + 6; l++)
{
for (k = 0; k < 5; k++)
{
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.h
index 69d02e995..40c1d5388 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_dec.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_dec.h,v 1.38 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_dec.h,v 1.39 2007/11/01 12:33:34 menno Exp $
**/
#ifndef __SBR_DEC_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.c
index 63e5c7e53..2181dffeb 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_e_nf.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_e_nf.c,v 1.22 2008/03/23 23:03:29 menno Exp $
**/
#include "common.h"
@@ -236,7 +234,7 @@ static const real_t Q_div_tab_right[31][13] = {
/* calculates 1/(1+Q) */
/* [0..1] */
-real_t calc_Q_div(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
+static real_t calc_Q_div(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
{
if (sbr->bs_coupling)
{
@@ -355,7 +353,7 @@ static const real_t Q_div2_tab_right[31][13] = {
/* calculates Q/(1+Q) */
/* [0..1] */
-real_t calc_Q_div2(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
+static real_t calc_Q_div2(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
{
if (sbr->bs_coupling)
{
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.h
index c829544df..59017a906 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_e_nf.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_e_nf.h,v 1.17 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_e_nf.h,v 1.18 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_E_NF_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.c
index 156e6ffa3..5919c7b56 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_fbt.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_fbt.c,v 1.21 2007/11/01 12:33:35 menno Exp $
**/
/* Calculate frequency band tables */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.h
index b09ea8eaa..d24a25e27 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_fbt.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_fbt.h,v 1.17 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_fbt.h,v 1.18 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_FBT_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.c
index 2fc37e5fd..3f310b819 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_hfadj.c,v 1.21 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_hfadj.c,v 1.23 2008/09/19 22:50:20 menno Exp $
**/
/* High Frequency adjustment */
@@ -68,9 +66,9 @@ uint8_t hf_adjustment(sbr_info *sbr, qmf_t Xsbr[MAX_NTSRHFG][64]
sbr->l_A[ch] = -1;
} else if (sbr->bs_frame_class[ch] == VARFIX) {
if (sbr->bs_pointer[ch] > 1)
- sbr->l_A[ch] = -1;
- else
sbr->l_A[ch] = sbr->bs_pointer[ch] - 1;
+ else
+ sbr->l_A[ch] = -1;
} else {
if (sbr->bs_pointer[ch] == 0)
sbr->l_A[ch] = -1;
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.h
index 60afe49cd..03ef71a0c 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfadj.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_hfadj.h,v 1.18 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_hfadj.h,v 1.19 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_HFADJ_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.c
index ea3898faa..b0f3219c3 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_hfgen.c,v 1.25 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_hfgen.c,v 1.26 2007/11/01 12:33:35 menno Exp $
**/
/* High Frequency generation */
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.h
index cd709ac2b..a7c842494 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_hfgen.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_hfgen.h,v 1.19 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_hfgen.h,v 1.20 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_HFGEN_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.c
index 14fecbcb3..6ba878640 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_huff.c,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_huff.c,v 1.21 2007/11/01 12:33:35 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.h
index 54e66da80..f749f2e08 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_huff.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_huff.h,v 1.20 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_huff.h,v 1.21 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_HUFF_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_noise.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_noise.h
index a2e02519d..1cf7190de 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_noise.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_noise.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_noise.h,v 1.16 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_noise.h,v 1.17 2007/11/01 12:33:35 menno Exp $
**/
#ifndef __SBR_NOISE_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.c
index 53f1be50f..68f408916 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_qmf.c,v 1.31 2007/10/11 18:41:51 menno Exp $
+** $Id: sbr_qmf.c,v 1.32 2007/11/01 12:33:36 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.h
index 87345e9ca..efb167be9 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_qmf.h,v 1.24 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_qmf.h,v 1.25 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SBR_QMF_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf_c.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf_c.h
index 34dc043f5..c2fcd2739 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf_c.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_qmf_c.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_qmf_c.h,v 1.16 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_qmf_c.h,v 1.17 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SBR_QMF_C_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.c
index 2f979dae7..6c9b97c24 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_syntax.c,v 1.37 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_syntax.c,v 1.39 2009/01/26 22:32:31 menno Exp $
**/
#include "common.h"
@@ -859,7 +857,7 @@ static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
case EXTENSION_ID_PS:
if (!sbr->ps)
{
- sbr->ps = ps_init(get_sr_index(sbr->sample_rate));
+ sbr->ps = ps_init(get_sr_index(sbr->sample_rate), sbr->numTimeSlotsRate);
}
if (sbr->psResetFlag)
{
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.h
index 54a60d263..a13b2708f 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_syntax.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_syntax.h,v 1.22 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_syntax.h,v 1.23 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SBR_SYNTAX_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.c b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.c
index c71ec2a7f..a073d96ce 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_tf_grid.c,v 1.18 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_tf_grid.c,v 1.20 2008/09/19 22:50:20 menno Exp $
**/
/* Time/Frequency grid */
@@ -67,13 +65,13 @@ uint8_t envelope_time_border_vector(sbr_info *sbr, uint8_t ch)
switch (sbr->L_E[ch])
{
case 4:
- temp = (int) (sbr->numTimeSlots / 4);
+ temp = (sbr->numTimeSlots / 4);
t_E_temp[3] = sbr->rate * 3 * temp;
t_E_temp[2] = sbr->rate * 2 * temp;
t_E_temp[1] = sbr->rate * temp;
break;
case 2:
- t_E_temp[1] = sbr->rate * (int) (sbr->numTimeSlots / 2);
+ t_E_temp[1] = sbr->rate * (sbr->numTimeSlots / 2);
break;
default:
break;
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.h
index ba6c35a10..27a8f908e 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sbr_tf_grid.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sbr_tf_grid.h,v 1.16 2007/10/11 18:41:52 menno Exp $
+** $Id: sbr_tf_grid.h,v 1.17 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SBR_TF_GRID_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/sine_win.h b/src/filters/transform/mpadecfilter/faad2/libfaad/sine_win.h
index c27a1ee76..e4198da3a 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/sine_win.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/sine_win.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: sine_win.h,v 1.18 2007/10/11 18:41:52 menno Exp $
+** $Id: sine_win.h,v 1.19 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SINE_WIN_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.c b/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.c
index 732fd3fdf..011b80bd7 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: specrec.c,v 1.59 2007/10/11 18:41:52 menno Exp $
+** $Id: specrec.c,v 1.62 2009/01/26 23:51:15 menno Exp $
**/
/*
@@ -60,7 +58,7 @@
/* static function declarations */
-static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+static uint8_t quant_to_spec(NeAACDecStruct *hDecoder,
ic_stream *ics, int16_t *quant_data,
real_t *spec_data, uint16_t frame_len);
@@ -302,7 +300,7 @@ ALIGN static const uint16_t *swb_offset_128_window[] =
in section named section. This offset depends on window_sequence and
scale_factor_grouping and is needed to decode the spectral_data().
*/
-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics)
+uint8_t window_grouping_info(NeAACDecStruct *hDecoder, ic_stream *ics)
{
uint8_t i, g;
@@ -548,7 +546,7 @@ ALIGN static const real_t pow2sf_tab[] = {
- Within a scalefactor window band, the coefficients are in ascending
spectral order.
*/
-static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+static uint8_t quant_to_spec(NeAACDecStruct *hDecoder,
ic_stream *ics, int16_t *quant_data,
real_t *spec_data, uint16_t frame_len)
{
@@ -682,7 +680,7 @@ static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
return error;
}
-static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel,
+static uint8_t allocate_single_channel(NeAACDecStruct *hDecoder, uint8_t channel,
uint8_t output_channels)
{
int mul = 1;
@@ -783,7 +781,7 @@ static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel,
return 0;
}
-static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder,
+static uint8_t allocate_channel_pair(NeAACDecStruct *hDecoder,
uint8_t channel, uint8_t paired_channel)
{
int mul = 1;
@@ -888,7 +886,7 @@ static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder,
return 0;
}
-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
+uint8_t reconstruct_single_channel(NeAACDecStruct *hDecoder, ic_stream *ics,
element *sce, int16_t *spec_data)
{
uint8_t retval;
@@ -960,6 +958,9 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
/* MAIN object type prediction */
if (hDecoder->object_type == MAIN)
{
+ if (!hDecoder->pred_stat[sce->channel])
+ return 33;
+
/* intra channel prediction */
ic_prediction(ics, spec_coef, hDecoder->pred_stat[sce->channel], hDecoder->frameLength,
hDecoder->sf_index);
@@ -1098,7 +1099,7 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
return 0;
}
-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t reconstruct_channel_pair(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
element *cpe, int16_t *spec_data1, int16_t *spec_data2)
{
uint8_t retval;
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.h b/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.h
index 19b091898..5f42e2cfe 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/specrec.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: specrec.h,v 1.31 2007/10/11 18:41:52 menno Exp $
+** $Id: specrec.h,v 1.33 2009/01/26 23:51:15 menno Exp $
**/
#ifndef __SPECREC_H__
@@ -39,10 +37,10 @@ extern "C" {
#include "syntax.h"
-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics);
-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t window_grouping_info(NeAACDecStruct *hDecoder, ic_stream *ics);
+uint8_t reconstruct_channel_pair(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
element *cpe, int16_t *spec_data1, int16_t *spec_data2);
-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, element *sce,
+uint8_t reconstruct_single_channel(NeAACDecStruct *hDecoder, ic_stream *ics, element *sce,
int16_t *spec_data);
#ifdef __cplusplus
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.c
index 6ea21c732..368112407 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr.c,v 1.18 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr.c,v 1.19 2007/11/01 12:33:36 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.h
index ed9d9a304..7adcf2a11 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr.h,v 1.18 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr.h,v 1.19 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SSR_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.c
index 443dcaaf0..a977c9411 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr_fb.c,v 1.16 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr_fb.c,v 1.17 2007/11/01 12:33:36 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.h
index a0e24d97f..3ae4eb04b 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_fb.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in the
-** software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr_fb.h,v 1.15 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr_fb.h,v 1.16 2007/11/01 12:33:36 menno Exp $
**/
#ifndef __SSR_FB_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.c b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.c
index dd954bb08..6963427c9 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr_ipqf.c,v 1.17 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr_ipqf.c,v 1.18 2007/11/01 12:33:39 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.h
index 1e6910fbd..47299219c 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_ipqf.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in the
-** software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr_ipqf.h,v 1.16 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr_ipqf.h,v 1.17 2007/11/01 12:33:39 menno Exp $
**/
#ifndef __SSR_IPQF_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_win.h b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_win.h
index 6f424e3e3..64b0f98bf 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_win.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/ssr_win.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in the
-** software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: ssr_win.h,v 1.15 2007/10/11 18:41:52 menno Exp $
+** $Id: ssr_win.h,v 1.16 2007/11/01 12:33:39 menno Exp $
**/
#ifndef __SSR_WIN_H__
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/structs.h b/src/filters/transform/mpadecfilter/faad2/libfaad/structs.h
index a17bb6a8d..9357c60cd 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/structs.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/structs.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: structs.h,v 1.45 2007/10/11 18:41:52 menno Exp $
+** $Id: structs.h,v 1.49 2009/01/26 23:51:15 menno Exp $
**/
#ifndef __STRUCTS_H__
@@ -314,71 +312,28 @@ typedef struct
ic_stream ics2;
} element; /* syntax element (SCE, CPE, LFE) */
-typedef struct mp4AudioSpecificConfig
-{
- /* Audio Specific Info */
- /*uint8_t*/ unsigned char objectTypeIndex;
- /*uint8_t*/ unsigned char samplingFrequencyIndex;
- /*uint32_t*/ unsigned long samplingFrequency;
- /*uint8_t*/ unsigned char channelsConfiguration;
-
- /* GA Specific Info */
- /*uint8_t*/ unsigned char frameLengthFlag;
- /*uint8_t*/ unsigned char dependsOnCoreCoder;
- /*uint16_t*/ unsigned short coreCoderDelay;
- /*uint8_t*/ unsigned char extensionFlag;
- /*uint8_t*/ unsigned char aacSectionDataResilienceFlag;
- /*uint8_t*/ unsigned char aacScalefactorDataResilienceFlag;
- /*uint8_t*/ unsigned char aacSpectralDataResilienceFlag;
- /*uint8_t*/ unsigned char epConfig;
-
- /*uint8_t*/ char sbr_present_flag;
- /*uint8_t*/ char forceUpSampling;
- /*uint8_t*/ char downSampledSBR;
-} mp4AudioSpecificConfig;
-
-typedef struct NeAACDecConfiguration
-{
- /*uint8_t*/ unsigned char defObjectType;
- /*uint32_t*/ unsigned long defSampleRate;
- /*uint8_t*/ unsigned char outputFormat;
- /*uint8_t*/ unsigned char downMatrix;
- /*uint8_t*/ unsigned char useOldADTSFormat;
- /*uint8_t*/ unsigned char dontUpSampleImplicitSBR;
-} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
-
-typedef struct NeAACDecFrameInfo
-{
- /*uint32_t*/ unsigned long bytesconsumed;
- /*uint32_t*/ unsigned long samples;
- /*uint8_t*/ unsigned char channels;
- /*uint8_t*/ unsigned char error;
- /*uint32_t*/ unsigned long samplerate;
-
- /* SBR: 0: off, 1: on; normal, 2: on; downsampled */
- /*uint8_t*/ unsigned char sbr;
-
- /* MPEG-4 ObjectType */
- /*uint8_t*/ unsigned char object_type;
-
- /* AAC header type; MP4 will be signalled as RAW also */
- /*uint8_t*/ unsigned char header_type;
-
- /* multichannel configuration */
- /*uint8_t*/ unsigned char num_front_channels;
- /*uint8_t*/ unsigned char num_side_channels;
- /*uint8_t*/ unsigned char num_back_channels;
- /*uint8_t*/ unsigned char num_lfe_channels;
- /*uint8_t*/ unsigned char channel_position[MAX_CHANNELS];
-
- /* PS: 0: off, 1: on */
- /*uint8_t*/ unsigned char ps;
-} NeAACDecFrameInfo;
+#define MAX_ASC_BYTES 64
+typedef struct {
+ int inited;
+ int version, versionA;
+ int framelen_type;
+ int useSameStreamMux;
+ int allStreamsSameTimeFraming;
+ int numSubFrames;
+ int numPrograms;
+ int numLayers;
+ int otherDataPresent;
+ uint32_t otherDataLenBits;
+ uint32_t frameLength;
+ uint8_t ASC[MAX_ASC_BYTES];
+ uint32_t ASCbits;
+} latm_header;
typedef struct
{
uint8_t adts_header_present;
uint8_t adif_header_present;
+ uint8_t latm_header_present;
uint8_t sf_index;
uint8_t object_type;
uint8_t channelConfiguration;
@@ -478,8 +433,9 @@ typedef struct
int64_t scalefac_cycles;
int64_t requant_cycles;
#endif
+ latm_header latm_config;
const unsigned char *cmes;
-} NeAACDecStruct, *NeAACDecHandle;
+} NeAACDecStruct;
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.c b/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.c
index 6cdb646b8..f8e808c26 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: syntax.c,v 1.88 2007/10/11 18:41:52 menno Exp $
+** $Id: syntax.c,v 1.93 2009/01/26 23:51:15 menno Exp $
**/
/*
@@ -38,9 +36,9 @@
#include "structs.h"
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
-#include "decoder.h"
#include "syntax.h"
#include "specrec.h"
#include "huffman.h"
@@ -54,54 +52,55 @@
#ifdef SBR_DEC
#include "sbr_syntax.h"
#endif
+#include "mp4.h"
/* static function declarations */
-static void decode_sce_lfe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_sce_lfe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
uint8_t id_syn_ele);
-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
uint8_t id_syn_ele);
-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecStruct *hDecoder, bitfile *ld,
uint8_t channel, uint8_t *tag);
-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecStruct *hDecoder, bitfile *ld,
uint8_t channel, uint8_t *tag);
#ifdef COUPLING_DEC
-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld);
+static uint8_t coupling_channel_element(NeAACDecStruct *hDecoder, bitfile *ld);
#endif
-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld);
+static uint16_t data_stream_element(NeAACDecStruct *hDecoder, bitfile *ld);
static uint8_t program_config_element(program_config *pce, bitfile *ld);
-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecStruct *hDecoder, bitfile *ld, drc_info *drc
#ifdef SBR_DEC
,uint8_t sbr_ele
#endif
);
-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecStruct *hDecoder, element *ele,
bitfile *ld, ic_stream *ics, uint8_t scal_flag,
int16_t *spec_data);
-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
uint8_t common_window);
-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t section_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t scale_factor_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld);
#ifdef SSR_DEC
static void gain_control_data(bitfile *ld, ic_stream *ics);
#endif
-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
int16_t *spectral_data);
static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count);
static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld);
static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld);
#ifdef LTP_DEC
-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
+static uint8_t ltp_data(NeAACDecStruct *hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
#endif
static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld);
static void adts_variable_header(adts_header *adts, bitfile *ld);
static void adts_error_check(adts_header *adts, bitfile *ld);
static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc);
static uint8_t excluded_channels(bitfile *ld, drc_info *drc);
-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele,
+static uint8_t side_info(NeAACDecStruct *hDecoder, element *ele,
bitfile *ld, ic_stream *ics, uint8_t scal_flag);
#ifdef DRM
-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t DRM_aac_scalable_main_header(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
bitfile *ld, uint8_t this_layer_stereo);
#endif
@@ -156,10 +155,10 @@ int8_t GASpecificConfig(bitfile *ld, mp4AudioSpecificConfig *mp4ASC,
DEBUGVAR(1,145,"GASpecificConfig(): aacScalefactorDataResilienceFlag"));
mp4ASC->aacSpectralDataResilienceFlag = faad_get1bit(ld
DEBUGVAR(1,146,"GASpecificConfig(): aacSpectralDataResilienceFlag"));
-
- /* 1 bit: extensionFlag3 */
}
- }
+ /* 1 bit: extensionFlag3 */
+ faad_getbits(ld, 1);
+ }
#endif
return 0;
@@ -323,7 +322,7 @@ static uint8_t program_config_element(program_config *pce, bitfile *ld)
return 0;
}
-static void decode_sce_lfe(NeAACDecHandle hDecoder,
+static void decode_sce_lfe(NeAACDecStruct *hDecoder,
NeAACDecFrameInfo *hInfo, bitfile *ld,
uint8_t id_syn_ele)
{
@@ -368,7 +367,7 @@ static void decode_sce_lfe(NeAACDecHandle hDecoder,
hDecoder->fr_ch_ele++;
}
-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
uint8_t id_syn_ele)
{
uint8_t channels = hDecoder->fr_channels;
@@ -416,7 +415,7 @@ static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfil
hDecoder->fr_ch_ele++;
}
-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc)
{
uint8_t id_syn_ele;
@@ -575,7 +574,11 @@ void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
/* new in corrigendum 14496-3:2002 */
#ifdef DRM
- if (hDecoder->object_type != DRM_ER_LC)
+ if (hDecoder->object_type != DRM_ER_LC
+#if 0
+ && !hDecoder->latm_header_present
+#endif
+ )
#endif
{
faad_byte_align(ld);
@@ -586,7 +589,7 @@ void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
/* Table 4.4.4 and */
/* Table 4.4.9 */
-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecStruct *hDecoder, bitfile *ld,
uint8_t channel, uint8_t *tag)
{
uint8_t retval = 0;
@@ -633,7 +636,7 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
}
/* Table 4.4.5 */
-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecStruct *hDecoder, bitfile *ld,
uint8_t channels, uint8_t *tag)
{
ALIGN int16_t spec_data1[1024] = {0};
@@ -763,7 +766,7 @@ static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
}
/* Table 4.4.6 */
-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
uint8_t common_window)
{
uint8_t retval = 0;
@@ -914,7 +917,7 @@ static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld)
#ifdef COUPLING_DEC
/* Table 4.4.8: Currently just for skipping the bits... */
-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld)
+static uint8_t coupling_channel_element(NeAACDecStruct *hDecoder, bitfile *ld)
{
uint8_t c, result = 0;
uint8_t ind_sw_cce_flag = 0;
@@ -1007,7 +1010,7 @@ static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld)
#endif
/* Table 4.4.10 */
-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld)
+static uint16_t data_stream_element(NeAACDecStruct *hDecoder, bitfile *ld)
{
uint8_t byte_aligned;
uint16_t i, count;
@@ -1036,7 +1039,7 @@ static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld)
}
/* Table 4.4.11 */
-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecStruct *hDecoder, bitfile *ld, drc_info *drc
#ifdef SBR_DEC
,uint8_t sbr_ele
#endif
@@ -1215,7 +1218,7 @@ static void gain_control_data(bitfile *ld, ic_stream *ics)
#ifdef DRM
/* Table 4.4.13 ASME */
-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc)
{
uint8_t retval = 0;
@@ -1425,7 +1428,7 @@ void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *h
}
/* Table 4.4.15 */
-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t DRM_aac_scalable_main_header(NeAACDecStruct *hDecoder, ic_stream *ics1, ic_stream *ics2,
bitfile *ld, uint8_t this_layer_stereo)
{
uint8_t retval = 0;
@@ -1493,7 +1496,7 @@ static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *i
}
#endif
-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele,
+static uint8_t side_info(NeAACDecStruct *hDecoder, element *ele,
bitfile *ld, ic_stream *ics, uint8_t scal_flag)
{
uint8_t result;
@@ -1586,7 +1589,7 @@ static uint8_t side_info(NeAACDecHandle hDecoder, element *ele,
}
/* Table 4.4.24 */
-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecStruct *hDecoder, element *ele,
bitfile *ld, ic_stream *ics, uint8_t scal_flag,
int16_t *spec_data)
{
@@ -1646,7 +1649,7 @@ static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
}
/* Table 4.4.25 */
-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t section_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld)
{
uint8_t g;
uint8_t sect_esc_val, sect_bits;
@@ -1893,7 +1896,7 @@ static uint8_t decode_scale_factors(ic_stream *ics, bitfile *ld)
}
/* Table 4.4.26 */
-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t scale_factor_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld)
{
uint8_t ret = 0;
#ifdef PROFILE
@@ -2001,7 +2004,7 @@ static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld)
#ifdef LTP_DEC
/* Table 4.4.28 */
-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
+static uint8_t ltp_data(NeAACDecStruct *hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
{
uint8_t sfb, w;
@@ -2064,7 +2067,7 @@ static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp,
#endif
/* Table 4.4.29 */
-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
int16_t *spectral_data)
{
int8_t i;
@@ -2444,3 +2447,188 @@ static void adts_error_check(adts_header *adts, bitfile *ld)
DEBUGVAR(1,134,"adts_error_check(): crc_check"));
}
}
+
+/* LATM parsing functions */
+
+static uint32_t latm_get_value(bitfile *ld)
+{
+ uint32_t l, value;
+ uint8_t bytesForValue;
+
+ bytesForValue = (uint8_t)faad_getbits(ld, 2);
+ value = 0;
+ for(l=0; l<bytesForValue; l++)
+ value = (value << 8) | (uint8_t)faad_getbits(ld, 8);
+
+ return value;
+}
+
+
+static uint32_t latmParsePayload(latm_header *latm, bitfile *ld)
+{
+ //assuming there's only one program with a single layer and 1 subFrame,
+ //allStreamsSametimeframing is set,
+ uint32_t framelen;
+ uint8_t tmp;
+
+ //this should be the payload length field for the current configuration
+ framelen = 0;
+ if(latm->framelen_type==0)
+ {
+ do
+ {
+ tmp = (uint8_t)faad_getbits(ld, 8);
+ framelen += tmp;
+ } while(tmp==0xff);
+ }
+ else if(latm->framelen_type==1)
+ framelen=latm->frameLength;
+
+ return framelen;
+}
+
+
+static uint32_t latmAudioMuxElement(latm_header *latm, bitfile *ld)
+{
+ uint32_t ascLen, asc_bits=0;
+ uint32_t x1, y1, m, n, i;
+ program_config pce;
+ mp4AudioSpecificConfig mp4ASC;
+
+ latm->useSameStreamMux = (uint8_t)faad_getbits(ld, 1);
+ if(!latm->useSameStreamMux)
+ {
+ //parseSameStreamMuxConfig
+ latm->version = (uint8_t) faad_getbits(ld, 1);
+ if(latm->version)
+ latm->versionA = (uint8_t) faad_getbits(ld, 1);
+ if(latm->versionA)
+ {
+ //dunno the payload format for versionA
+ fprintf(stderr, "versionA not supported\n");
+ return 0;
+ }
+ if(latm->version) //read taraBufferFullness
+ latm_get_value(ld);
+ latm->allStreamsSameTimeFraming = (uint8_t)faad_getbits(ld, 1);
+ latm->numSubFrames = (uint8_t)faad_getbits(ld, 6) + 1;
+ latm->numPrograms = (uint8_t)faad_getbits(ld, 4) + 1;
+ latm->numLayers = faad_getbits(ld, 3) + 1;
+ if(latm->numPrograms>1 || !latm->allStreamsSameTimeFraming || latm->numSubFrames>1 || latm->numLayers>1)
+ {
+ fprintf(stderr, "\r\nUnsupported LATM configuration: %d programs/ %d subframes, %d layers, allstreams: %d\n",
+ latm->numPrograms, latm->numSubFrames, latm->numLayers, latm->allStreamsSameTimeFraming);
+ return 0;
+ }
+ ascLen = 0;
+ if(latm->version)
+ ascLen = latm_get_value(ld);
+
+ x1 = faad_get_processed_bits(ld);
+ if(AudioSpecificConfigFromBitfile(ld, &mp4ASC, &pce, 0, 1) < 0)
+ return 0;
+
+ //horrid hack to unread the ASC bits and store them in latm->ASC
+ //the correct code would rely on an ideal faad_ungetbits()
+ y1 = faad_get_processed_bits(ld);
+ if((y1-x1) <= MAX_ASC_BYTES*8)
+ {
+ faad_rewindbits(ld);
+ m = x1;
+ while(m>0)
+ {
+ n = min(m, 32);
+ faad_getbits(ld, n);
+ m -= n;
+ }
+
+ i = 0;
+ m = latm->ASCbits = y1 - x1;
+ while(m > 0)
+ {
+ n = min(m, 8);
+ latm->ASC[i++] = (uint8_t) faad_getbits(ld, n);
+ m -= n;
+ }
+ }
+
+ asc_bits = y1-x1;
+
+ if(ascLen>asc_bits)
+ faad_getbits(ld, ascLen-asc_bits);
+
+ latm->framelen_type = (uint8_t) faad_getbits(ld, 3);
+ if(latm->framelen_type == 0)
+ {
+ latm->frameLength = 0;
+ faad_getbits(ld, 8); //buffer fullness for frame_len_type==0, useless
+ }
+ else if(latm->framelen_type == 1)
+ {
+ latm->frameLength = faad_getbits(ld, 9);
+ if(latm->frameLength==0)
+ {
+ fprintf(stderr, "Invalid frameLength: 0\r\n");
+ return 0;
+ }
+ latm->frameLength = (latm->frameLength+20)*8;
+ }
+ else
+ { //hellish CELP or HCVX stuff, discard
+ fprintf(stderr, "Unsupported CELP/HCVX framelentype: %d\n", latm->framelen_type);
+ return 0;
+ }
+
+ latm->otherDataLenBits = 0;
+ if(faad_getbits(ld, 1))
+ { //other data present
+ int esc, tmp;
+ if(latm->version)
+ latm->otherDataLenBits = latm_get_value(ld);
+ else do
+ {
+ esc = faad_getbits(ld, 1);
+ tmp = faad_getbits(ld, 8);
+ latm->otherDataLenBits = (latm->otherDataLenBits << 8) + tmp;
+ } while(esc);
+ }
+ if(faad_getbits(ld, 1)) //crc
+ faad_getbits(ld, 8);
+ latm->inited = 1;
+ }
+
+ //read payload
+ if(latm->inited)
+ return latmParsePayload(latm, ld);
+ else
+ return 0;
+}
+
+
+uint32_t faad_latm_frame(latm_header *latm, bitfile *ld)
+{
+ uint16_t len;
+ uint32_t initpos, endpos, firstpos, ret;
+
+ firstpos = faad_get_processed_bits(ld);
+ while (ld->bytes_left)
+ {
+ faad_byte_align(ld);
+ if(faad_showbits(ld, 11) != 0x2B7)
+ {
+ faad_getbits(ld, 8);
+ continue;
+ }
+ faad_getbits(ld, 11);
+ len = faad_getbits(ld, 13);
+ if(!len)
+ continue;
+ initpos = faad_get_processed_bits(ld);
+ ret = latmAudioMuxElement(latm, ld);
+ endpos = faad_get_processed_bits(ld);
+ if(ret>0)
+ return (len*8)-(endpos-initpos);
+ //faad_getbits(ld, initpos-endpos); //go back to initpos, but is valid a getbits(-N) ?
+ }
+ return -1U;
+}
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.h b/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.h
index 5e7590d97..2a1fc6d93 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/syntax.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: syntax.h,v 1.57 2007/10/11 18:41:52 menno Exp $
+** $Id: syntax.h,v 1.60 2009/01/26 23:51:17 menno Exp $
**/
#ifndef __SYNTAX_H__
@@ -37,7 +35,6 @@
extern "C" {
#endif
-#include "decoder.h"
#include "bits.h"
#define MAIN 1
@@ -54,6 +51,7 @@ extern "C" {
#define RAW 0
#define ADIF 1
#define ADTS 2
+#define LATM 3
/* SBR signalling */
#define NO_SBR 0
@@ -115,14 +113,15 @@ int8_t GASpecificConfig(bitfile *ld, mp4AudioSpecificConfig *mp4ASC,
uint8_t adts_frame(adts_header *adts, bitfile *ld);
void get_adif_header(adif_header *adif, bitfile *ld);
-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc);
-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+uint8_t reordered_spectral_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld,
int16_t *spectral_data);
#ifdef DRM
-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+void DRM_aac_scalable_main_element(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *hInfo,
bitfile *ld, program_config *pce, drc_info *drc);
#endif
+uint32_t faad_latm_frame(latm_header *latm, bitfile *ld);
#ifdef __cplusplus
}
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/tns.c b/src/filters/transform/mpadecfilter/faad2/libfaad/tns.c
index 5691fc61c..611865204 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/tns.c
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/tns.c
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: tns.c,v 1.39 2007/10/11 18:41:52 menno Exp $
+** $Id: tns.c,v 1.40 2007/11/01 12:33:40 menno Exp $
**/
#include "common.h"
diff --git a/src/filters/transform/mpadecfilter/faad2/libfaad/tns.h b/src/filters/transform/mpadecfilter/faad2/libfaad/tns.h
index d7f514953..8848c3f2d 100644
--- a/src/filters/transform/mpadecfilter/faad2/libfaad/tns.h
+++ b/src/filters/transform/mpadecfilter/faad2/libfaad/tns.h
@@ -19,15 +19,13 @@
** Any non-GPL usage of this software or parts of this software is strictly
** forbidden.
**
-** Software using this code must display the following message visibly in or
-** on each copy of the software:
-** "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
-** in, for example, the about-box or help/startup screen.
+** The "appropriate copyright message" mentioned in section 2c of the GPLv2
+** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com"
**
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
-** $Id: tns.h,v 1.22 2007/10/11 18:41:52 menno Exp $
+** $Id: tns.h,v 1.23 2007/11/01 12:33:41 menno Exp $
**/
#ifndef __TNS_H__