aboutsummaryrefslogtreecommitdiffstats
path: root/libSYS
diff options
context:
space:
mode:
Diffstat (limited to 'libSYS')
-rw-r--r--libSYS/include/FDK_audio.h69
-rw-r--r--libSYS/include/audio.h2
-rw-r--r--libSYS/include/cmdl_parser.h2
-rw-r--r--libSYS/include/conv_string.h2
-rw-r--r--libSYS/include/genericStds.h2
-rw-r--r--libSYS/include/machine_type.h2
-rw-r--r--libSYS/include/wav_file.h31
-rw-r--r--libSYS/src/cmdl_parser.cpp6
-rw-r--r--libSYS/src/conv_string.cpp2
-rw-r--r--libSYS/src/genericStds.cpp6
-rw-r--r--libSYS/src/linux/FDK_stackload_linux.cpp2
-rw-r--r--libSYS/src/linux/audio_linux.cpp2
-rw-r--r--libSYS/src/linux/coresup_linux.cpp2
-rw-r--r--libSYS/src/linux/genericStds_linux.cpp2
-rw-r--r--libSYS/src/linux/uart_linux.cpp2
-rw-r--r--libSYS/src/mips/genericStds_mips.cpp2
-rw-r--r--libSYS/src/wav_file.cpp26
17 files changed, 106 insertions, 56 deletions
diff --git a/libSYS/include/FDK_audio.h b/libSYS/include/FDK_audio.h
index 8e7041d..c8d9c19 100644
--- a/libSYS/include/FDK_audio.h
+++ b/libSYS/include/FDK_audio.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -144,6 +144,12 @@ typedef enum
} TRANSPORT_TYPE;
+#define TT_IS_PACKET(x) \
+ ( ((x) == TT_MP4_RAW) \
+ || ((x) == TT_DRM) \
+ || ((x) == TT_MP4_LATM_MCP0) \
+ || ((x) == TT_MP4_LATM_MCP1) )
+
/**
* Audio Object Type definitions.
*/
@@ -228,28 +234,32 @@ typedef enum
/** Channel Mode ( 1-7 equals MPEG channel configurations, others are arbitrary). */
typedef enum {
- MODE_INVALID = -1,
- MODE_UNKNOWN = 0,
- MODE_1 = 1, /**< SCE */
- MODE_2 = 2, /**< CPE */
- MODE_1_2 = 3, /**< SCE,CPE */
- MODE_1_2_1 = 4, /**< SCE,CPE,SCE */
- MODE_1_2_2 = 5, /**< SCE,CPE,CPE */
- MODE_1_2_2_1 = 6, /**< SCE,CPE,CPE,LFE */
- MODE_1_2_2_2_1 = 7, /**< SCE,CPE,CPE,CPE,LFE */
-
- MODE_1_1 = 16, /**< 2 SCEs (dual mono) */
- MODE_1_1_1_1 = 17, /**< 4 SCEs */
- MODE_1_1_1_1_1_1 = 18, /**< 6 SCEs */
- MODE_1_1_1_1_1_1_1_1 = 19, /**< 8 SCEs */
- MODE_1_1_1_1_1_1_1_1_1_1_1_1 = 20, /**< 12 SCEs */
-
- MODE_2_2 = 21, /**< 2 CPEs */
- MODE_2_2_2 = 22, /**< 3 CPEs */
- MODE_2_2_2_2 = 23, /**< 4 CPEs */
- MODE_2_2_2_2_2_2 = 24, /**< 6 CPEs */
-
- MODE_2_1 = 30 /**< CPE,SCE (ARIB standard) */
+ MODE_INVALID = -1,
+ MODE_UNKNOWN = 0,
+ MODE_1 = 1, /**< C */
+ MODE_2 = 2, /**< L+R */
+ MODE_1_2 = 3, /**< C, L+R */
+ MODE_1_2_1 = 4, /**< C, L+R, Rear */
+ MODE_1_2_2 = 5, /**< C, L+R, LS+RS */
+ MODE_1_2_2_1 = 6, /**< C, L+R, LS+RS, LFE */
+ MODE_1_2_2_2_1 = 7, /**< C, LC+RC, L+R, LS+RS, LFE */
+
+
+ MODE_1_1 = 16, /**< 2 SCEs (dual mono) */
+ MODE_1_1_1_1 = 17, /**< 4 SCEs */
+ MODE_1_1_1_1_1_1 = 18, /**< 6 SCEs */
+ MODE_1_1_1_1_1_1_1_1 = 19, /**< 8 SCEs */
+ MODE_1_1_1_1_1_1_1_1_1_1_1_1 = 20, /**< 12 SCEs */
+
+ MODE_2_2 = 21, /**< 2 CPEs */
+ MODE_2_2_2 = 22, /**< 3 CPEs */
+ MODE_2_2_2_2 = 23, /**< 4 CPEs */
+ MODE_2_2_2_2_2_2 = 24, /**< 6 CPEs */
+
+ MODE_2_1 = 30, /**< CPE,SCE (ARIB standard B32) */
+
+ MODE_7_1_REAR_SURROUND = 33, /**< C, L+R, LS+RS, Lrear+Rrear, LFE */
+ MODE_7_1_FRONT_CENTER = 34 /**< C, LC+RC, L+R, LS+RS, LFE */
} CHANNEL_MODE;
@@ -266,6 +276,15 @@ typedef enum {
ACT_TOP /* Ts */
} AUDIO_CHANNEL_TYPE;
+typedef enum
+{
+ SIG_UNKNOWN = -1,
+ SIG_IMPLICIT = 0,
+ SIG_EXPLICIT_BW_COMPATIBLE = 1,
+ SIG_EXPLICIT_HIERARCHICAL = 2
+
+} SBR_PS_SIGNALING;
+
/**
* Audio Codec flags.
*/
@@ -328,6 +347,10 @@ typedef struct {
UCHAR stereoConfigIndex; /**< USAC MPS stereo mode */
UCHAR sbrMode; /**< USAC SBR mode */
+ SBR_PS_SIGNALING sbrSignaling;/**< 0: implicit signaling, 1: backwards compatible explicit signaling, 2: hierarcical explicit signaling */
+
+ UCHAR sbrPresent;
+ UCHAR psPresent;
} CODER_CONFIG;
/** MP4 Element IDs. */
diff --git a/libSYS/include/audio.h b/libSYS/include/audio.h
index 7a827cb..6ef83ae 100644
--- a/libSYS/include/audio.h
+++ b/libSYS/include/audio.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/include/cmdl_parser.h b/libSYS/include/cmdl_parser.h
index 86f20df..266e41d 100644
--- a/libSYS/include/cmdl_parser.h
+++ b/libSYS/include/cmdl_parser.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/include/conv_string.h b/libSYS/include/conv_string.h
index 1280ae6..0409dc0 100644
--- a/libSYS/include/conv_string.h
+++ b/libSYS/include/conv_string.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/include/genericStds.h b/libSYS/include/genericStds.h
index 6adf689..fe4dc36 100644
--- a/libSYS/include/genericStds.h
+++ b/libSYS/include/genericStds.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/include/machine_type.h b/libSYS/include/machine_type.h
index d04a8e8..4745e43 100644
--- a/libSYS/include/machine_type.h
+++ b/libSYS/include/machine_type.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/include/wav_file.h b/libSYS/include/wav_file.h
index e9c4e70..2bc43b2 100644
--- a/libSYS/include/wav_file.h
+++ b/libSYS/include/wav_file.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -111,16 +111,36 @@ amm-info@iis.fraunhofer.de
extern "C" {
#endif
+#define SPEAKER_FRONT_LEFT 0x1
+#define SPEAKER_FRONT_RIGHT 0x2
+#define SPEAKER_FRONT_CENTER 0x4
+#define SPEAKER_LOW_FREQUENCY 0x8
+#define SPEAKER_BACK_LEFT 0x10
+#define SPEAKER_BACK_RIGHT 0x20
+#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
+#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
+#define SPEAKER_BACK_CENTER 0x100
+#define SPEAKER_SIDE_LEFT 0x200
+#define SPEAKER_SIDE_RIGHT 0x400
+#define SPEAKER_TOP_CENTER 0x800
+#define SPEAKER_TOP_FRONT_LEFT 0x1000
+#define SPEAKER_TOP_FRONT_CENTER 0x2000
+#define SPEAKER_TOP_FRONT_RIGHT 0x4000
+#define SPEAKER_TOP_BACK_LEFT 0x8000
+#define SPEAKER_TOP_BACK_CENTER 0x10000
+#define SPEAKER_TOP_BACK_RIGHT 0x20000
+#define SPEAKER_RESERVED 0x80000000
+
/*!
* RIFF WAVE file struct.
* For details see WAVE file format documentation (for example at http://www.wotsit.org).
*/
typedef struct WAV_HEADER
{
- char riffType[4];
+ char riffType[4];
UINT riffSize;
- char waveType[4];
- char formatType[4];
+ char waveType[4];
+ char formatType[4];
UINT formatSize;
USHORT compressionCode;
USHORT numChannels;
@@ -128,7 +148,7 @@ typedef struct WAV_HEADER
UINT bytesPerSecond;
USHORT blockAlign;
USHORT bitsPerSample;
- char dataType[4];
+ char dataType[4];
UINT dataSize;
} WAV_HEADER;
@@ -136,6 +156,7 @@ struct WAV
{
WAV_HEADER header;
FDKFILE *fp;
+ UINT channelMask;
};
typedef struct WAV *HANDLE_WAV;
diff --git a/libSYS/src/cmdl_parser.cpp b/libSYS/src/cmdl_parser.cpp
index bf020ee..24ec0d5 100644
--- a/libSYS/src/cmdl_parser.cpp
+++ b/libSYS/src/cmdl_parser.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -465,7 +465,7 @@ INT CheckArg(TEXTCHAR* arg, TEXTCHAR* str, UINT numArgs, TEXTCHAR type, TEXTCHAR
for ( i = 0; i < _tcslen(arg); ++i )
{
- if ( (type == 'd') && !_istdigit(arg[i]) && arg[i] != 'x' )
+ if ( (type == 'd') && !_istdigit(arg[i]) && arg[i] != 'x' && arg[i] != '-')
{
#ifdef _UNICODE
_ftprintf(stderr, _TEXT("\n\nError: Argument '%ls' for switch '%ls' is not a valid number.\n" ), arg, cur_str);
@@ -549,7 +549,7 @@ int IIS_ProcessCmdlList(const char* param_filename, int (*pFunction)(int, TEXTCH
/* Skip consecutive blanks. */
while (*line_ptr == ' ' && line_ptr < line+CMDL_MAX_STRLEN)
line_ptr++;
- /* Assign argument. TODO: maybe handle quotes */
+ /* Assign argument. */
argv_ptr[argc] = line_ptr;
/* Get pointer to next blank. */
line_ptr = (char*)FDKstrchr(line_ptr, ' ');
diff --git a/libSYS/src/conv_string.cpp b/libSYS/src/conv_string.cpp
index f730337..28cbc83 100644
--- a/libSYS/src/conv_string.cpp
+++ b/libSYS/src/conv_string.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/genericStds.cpp b/libSYS/src/genericStds.cpp
index 6bc4bd2..f0199fb 100644
--- a/libSYS/src/genericStds.cpp
+++ b/libSYS/src/genericStds.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -98,8 +98,8 @@ amm-info@iis.fraunhofer.de
/* library info */
#define SYS_LIB_VL0 1
-#define SYS_LIB_VL1 2
-#define SYS_LIB_VL2 2
+#define SYS_LIB_VL1 3
+#define SYS_LIB_VL2 4
#define SYS_LIB_TITLE "System Integration Library"
#define SYS_LIB_BUILD_DATE __DATE__
#define SYS_LIB_BUILD_TIME __TIME__
diff --git a/libSYS/src/linux/FDK_stackload_linux.cpp b/libSYS/src/linux/FDK_stackload_linux.cpp
index 549d99d..82fa9ab 100644
--- a/libSYS/src/linux/FDK_stackload_linux.cpp
+++ b/libSYS/src/linux/FDK_stackload_linux.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/linux/audio_linux.cpp b/libSYS/src/linux/audio_linux.cpp
index d99f876..835b27b 100644
--- a/libSYS/src/linux/audio_linux.cpp
+++ b/libSYS/src/linux/audio_linux.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/linux/coresup_linux.cpp b/libSYS/src/linux/coresup_linux.cpp
index 49a042b..9e6fa85 100644
--- a/libSYS/src/linux/coresup_linux.cpp
+++ b/libSYS/src/linux/coresup_linux.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/linux/genericStds_linux.cpp b/libSYS/src/linux/genericStds_linux.cpp
index f28def7..da375c0 100644
--- a/libSYS/src/linux/genericStds_linux.cpp
+++ b/libSYS/src/linux/genericStds_linux.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/linux/uart_linux.cpp b/libSYS/src/linux/uart_linux.cpp
index 31e0419..dee5694 100644
--- a/libSYS/src/linux/uart_linux.cpp
+++ b/libSYS/src/linux/uart_linux.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/mips/genericStds_mips.cpp b/libSYS/src/mips/genericStds_mips.cpp
index 98a30c3..e08ec48 100644
--- a/libSYS/src/mips/genericStds_mips.cpp
+++ b/libSYS/src/mips/genericStds_mips.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
diff --git a/libSYS/src/wav_file.cpp b/libSYS/src/wav_file.cpp
index 8764be9..58bcfaa 100644
--- a/libSYS/src/wav_file.cpp
+++ b/libSYS/src/wav_file.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -174,7 +174,6 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename)
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
};
USHORT extraFormatBytes, validBitsPerSample;
- UINT channelMask;
UCHAR guid[16];
INT i;
@@ -184,7 +183,7 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename)
if (extraFormatBytes >= 22) {
FDKfread_EL(&(validBitsPerSample), 2, 1, wav->fp);
- FDKfread_EL(&(channelMask), 4, 1, wav->fp);
+ FDKfread_EL(&(wav->channelMask), 4, 1, wav->fp);
FDKfread_EL(&(guid), 16, 1, wav->fp);
/* check for PCM GUID */
@@ -228,12 +227,12 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename)
/* Error path */
error:
- if (wav->fp) {
- FDKfclose(wav->fp);
- wav->fp = NULL;
- }
if (wav) {
+ if (wav->fp) {
+ FDKfclose(wav->fp);
+ wav->fp = NULL;
+ }
FDKfree(wav);
}
@@ -388,6 +387,11 @@ INT WAV_OutputOpen(HANDLE_WAV *pWav, const char *outputFilename, INT sampleRate,
HANDLE_WAV wav = (HANDLE_WAV)FDKcalloc(1, sizeof(struct WAV));
UINT size = 0;
+ if (wav == NULL) {
+ FDKprintfErr("WAV_OutputOpen(): Unable to allocate WAV struct.\n");
+ goto bail;
+ }
+
if (bitsPerSample != 16 && bitsPerSample != 24 && bitsPerSample != 32)
{
FDKprintfErr("WAV_OutputOpen(): Invalid argument (bitsPerSample).\n");
@@ -433,10 +437,12 @@ INT WAV_OutputOpen(HANDLE_WAV *pWav, const char *outputFilename, INT sampleRate,
return 0;
bail:
- if (wav->fp)
- FDKfclose(wav->fp);
- if (wav)
+ if (wav) {
+ if (wav->fp) {
+ FDKfclose(wav->fp);
+ }
FDKfree(wav);
+ }
pWav = NULL;