summaryrefslogtreecommitdiffstats
path: root/libSBRdec/src
diff options
context:
space:
mode:
Diffstat (limited to 'libSBRdec/src')
-rw-r--r--libSBRdec/src/arm/lpp_tran_arm.cpp5
-rw-r--r--libSBRdec/src/env_calc.cpp2
-rw-r--r--libSBRdec/src/psbitdec.cpp2
-rw-r--r--libSBRdec/src/sbr_dec.cpp4
-rw-r--r--libSBRdec/src/sbr_rom.cpp2
5 files changed, 11 insertions, 4 deletions
diff --git a/libSBRdec/src/arm/lpp_tran_arm.cpp b/libSBRdec/src/arm/lpp_tran_arm.cpp
index 78bbc2c..028a26f 100644
--- a/libSBRdec/src/arm/lpp_tran_arm.cpp
+++ b/libSBRdec/src/arm/lpp_tran_arm.cpp
@@ -97,7 +97,10 @@ amm-info@iis.fraunhofer.de
#ifdef FUNCTION_LPPTRANSPOSER_func1
/* Note: This code requires only 43 cycles per iteration instead of 61 on ARM926EJ-S */
-__attribute__ ((noinline)) static void lppTransposer_func1(
+#ifdef __GNUC__
+__attribute__ ((noinline))
+#endif
+static void lppTransposer_func1(
FIXP_DBL *lowBandReal,
FIXP_DBL *lowBandImag,
FIXP_DBL **qmfBufferReal,
diff --git a/libSBRdec/src/env_calc.cpp b/libSBRdec/src/env_calc.cpp
index fa5330a..73bd7ba 100644
--- a/libSBRdec/src/env_calc.cpp
+++ b/libSBRdec/src/env_calc.cpp
@@ -2031,7 +2031,7 @@ static void adjustTimeSlotHQ(
FIXP_SGL direct_ratio = /*FL2FXCONST_SGL(1.0f) */ (FIXP_SGL)MAXVAL_SGL - smooth_ratio;
int index = *ptrPhaseIndex;
UCHAR harmIndex = *ptrHarmIndex;
- register int freqInvFlag = (lowSubband & 1);
+ int freqInvFlag = (lowSubband & 1);
FIXP_DBL sineLevel;
int shift;
diff --git a/libSBRdec/src/psbitdec.cpp b/libSBRdec/src/psbitdec.cpp
index 29bddf7..ec6e484 100644
--- a/libSBRdec/src/psbitdec.cpp
+++ b/libSBRdec/src/psbitdec.cpp
@@ -498,7 +498,7 @@ ReadPsData (HANDLE_PS_DEC h_ps_d, /*!< handle to struct PS_DEC */
h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_none;
/* discard all remaining bits */
nBitsLeft -= startbits - FDKgetValidBits(hBitBuf);
- while (nBitsLeft) {
+ while (nBitsLeft > 0) {
int i = nBitsLeft;
if (i>8) {
i = 8;
diff --git a/libSBRdec/src/sbr_dec.cpp b/libSBRdec/src/sbr_dec.cpp
index 0864348..76009ba 100644
--- a/libSBRdec/src/sbr_dec.cpp
+++ b/libSBRdec/src/sbr_dec.cpp
@@ -940,6 +940,10 @@ resetSbrDec (HANDLE_SBR_DEC hSbrDec,
FIXP_DBL **OverlapBufferReal = hSbrDec->QmfBufferReal;
FIXP_DBL **OverlapBufferImag = hSbrDec->QmfBufferImag;
+ if (!hSbrDec->LppTrans.pSettings) {
+ return SBRDEC_NOT_INITIALIZED;
+ }
+
/* assign qmf time slots */
assignTimeSlots( hSbrDec, hHeaderData->numberTimeSlots * hHeaderData->timeStep, useLP);
diff --git a/libSBRdec/src/sbr_rom.cpp b/libSBRdec/src/sbr_rom.cpp
index c48ce35..4f2cc48 100644
--- a/libSBRdec/src/sbr_rom.cpp
+++ b/libSBRdec/src/sbr_rom.cpp
@@ -1185,7 +1185,7 @@ const FIXP_DBL Alphas[NO_ICC_LEVELS] = {
#define FL2FXCONST_PS FL2FXCONST_SGL
#else
#define FIXP_PS FIXP_DBL
-#define FXP_CAST
+#define FXP_CAST(x) ((FIXP_DBL)(x))
#define FL2FXCONST_PS FL2FXCONST_DBL
#endif