summaryrefslogtreecommitdiff
path: root/opencore/codecs_v2/audio/gsm_amr/amr_wb
diff options
context:
space:
mode:
Diffstat (limited to 'opencore/codecs_v2/audio/gsm_amr/amr_wb')
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk1
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/isp_az.cpp6
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.cpp6
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h19
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h16
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h3
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h6
7 files changed, 14 insertions, 43 deletions
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
index e096ff8..21d9ddb 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
@@ -47,7 +47,6 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := libpvamrwbdecoder
LOCAL_CFLAGS := $(PV_CFLAGS)
-
LOCAL_ARM_MODE := arm
LOCAL_STATIC_LIBRARIES :=
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/isp_az.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/isp_az.cpp
index dbcf2f3..e353f31 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/isp_az.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/isp_az.cpp
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -265,11 +265,7 @@ void Isp_Az(
}
/* a[NC] = 0.5*f1[NC]*(1.0 + isp[M-1]); */
-
-
t0 = (int32)(((int64)f1[nc] * isp[m - 1]) >> 16) << 1;
-
-
t0 = add_int32(f1[nc], t0);
/* from Q23 to Q12 and * 0.5 */
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.cpp
index 25dcf13..bdca939 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.cpp
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -104,9 +104,7 @@ Returns
; FUNCTION CODE
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-#elif defined(PV_ARM_GCC_V5)
-
+#if ((PV_CPU_ARCH_VERSION >=5) && ((PV_COMPILER == EPV_ARM_RVCT) || (PV_COMPILER == EPV_ARM_GNUC)))
/* function is inlined in header file */
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h
index 7c5fe22..73ccb71 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,6 @@ terms listed above has been obtained from the copyright holder.
----------------------------------------------------------------------------*/
#include "pv_amr_wb_type_defs.h"
-
/*----------------------------------------------------------------------------
; MACROS
; Define module specific macros here
@@ -62,21 +61,7 @@ terms listed above has been obtained from the copyright holder.
; DEFINES AND SIMPLE TYPEDEF'S
----------------------------------------------------------------------------*/
-#if defined(PV_ARM_V5)
-
-__inline int16 normalize_amr_wb(int32 x)
-{
- int32 y;
- __asm
- {
- clz y, x;
- sub y, y, #1
- }
- return (y);
-}
-
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
__inline int16 normalize_amr_wb(int32 x)
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
index 7b9e900..86f70b3 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ terms listed above has been obtained from the copyright holder.
range : 0x8000 <= var_out <= 0x7fff.
----------------------------------------------------------------------------*/
-static inline int16 negate_int16(int16 var1)
+static inline int16 negate_int16(int16 var1)
{
return (((var1 == MIN_16) ? MAX_16 : -var1));
}
@@ -105,7 +105,7 @@ static inline int16 negate_int16(int16 var1)
range : 0x8000 <= var_out <= 0x7fff.
----------------------------------------------------------------------------*/
-static inline int16 shl_int16(int16 var1, int16 var2)
+static inline int16 shl_int16(int16 var1, int16 var2)
{
int16 var_out;
@@ -149,7 +149,7 @@ static inline int16 shl_int16(int16 var1, int16 var2)
----------------------------------------------------------------------------*/
-static inline int32 shl_int32(int32 L_var1, int16 var2)
+static inline int32 shl_int32(int32 L_var1, int16 var2)
{
int32 L_var_out;
@@ -193,7 +193,7 @@ static inline int32 shl_int32(int32 L_var1, int16 var2)
----------------------------------------------------------------------------*/
-static inline int32 shr_int32(int32 L_var1, int16 var2)
+static inline int32 shr_int32(int32 L_var1, int16 var2)
{
int32 L_var_out;
@@ -220,11 +220,7 @@ static inline int32 shr_int32(int32 L_var1, int16 var2)
-#if defined(PV_ARM_V5)
-
-#include "pvamrwbdecoder_basic_op_armv5.h"
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
#include "pvamrwbdecoder_basic_op_gcc_armv5.h"
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
index 7a34d89..8b9faaa 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -522,7 +522,6 @@ extern "C"
static inline int32 fxp_mul32_by_16b(int32 L_var1, const int32 L_var2)
{
-
int32 L_mul = (int32)(((int64)L_var1 * (L_var2 << 16)) >> 32);
return L_mul;
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h
index de3baba..c2c9f36 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,14 +42,13 @@ terms listed above has been obtained from the copyright holder.
#ifndef PVAMRWBDECODER_BASIC_OP_GCC_ARMV5_H
#define PVAMRWBDECODER_BASIC_OP_GCC_ARMV5_H
+
#ifdef __cplusplus
extern "C"
{
#endif
-#if (defined(PV_ARM_GCC_V5)||defined(PV_ARM_GCC_V4))
-
static inline int16 sub_int16(int16 var1, int16 var2)
{
register int32 L_var_out;
@@ -300,7 +299,6 @@ extern "C"
#define fxp_mul32_by_16b( a, b) fxp_mul32_by_16( a, b)
-#endif
#ifdef __cplusplus
}