summaryrefslogtreecommitdiffstats
path: root/libAACenc/src/qc_main.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2016-04-05 16:11:23 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-05 16:11:23 +0000
commit0713b4acff1a489e7d49725dc7c5e3dad370b5c8 (patch)
tree6717743d4422e9d88e9a9f1631effd7563a9856b /libAACenc/src/qc_main.cpp
parentf86e64f5c712edc2f3dd0a9d59d75a8ebd3422ea (diff)
parentef30836651bf059c3120c03dd11e08b6aafdae13 (diff)
downloadfdk-aac-0713b4acff1a489e7d49725dc7c5e3dad370b5c8.tar.gz
fdk-aac-0713b4acff1a489e7d49725dc7c5e3dad370b5c8.tar.bz2
fdk-aac-0713b4acff1a489e7d49725dc7c5e3dad370b5c8.zip
Remove compiler warnings, revised ARM QMF encoder
am: ef30836 * commit 'ef30836651bf059c3120c03dd11e08b6aafdae13': Remove compiler warnings, revised ARM QMF encoder Change-Id: I07babb4dc36b6ad7aebeb62c303a8380e99d691e
Diffstat (limited to 'libAACenc/src/qc_main.cpp')
-rw-r--r--libAACenc/src/qc_main.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/libAACenc/src/qc_main.cpp b/libAACenc/src/qc_main.cpp
index b74510a..278bcb2 100644
--- a/libAACenc/src/qc_main.cpp
+++ b/libAACenc/src/qc_main.cpp
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
+© Copyright 1995 - 2015 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION
@@ -107,14 +107,11 @@ typedef struct {
} TAB_VBR_QUAL_FACTOR;
static const TAB_VBR_QUAL_FACTOR tableVbrQualFactor[] = {
- {QCDATA_BR_MODE_CBR, FL2FXCONST_DBL(0.00f)},
{QCDATA_BR_MODE_VBR_1, FL2FXCONST_DBL(0.160f)}, /* 32 kbps mono AAC-LC + SBR + PS */
{QCDATA_BR_MODE_VBR_2, FL2FXCONST_DBL(0.148f)}, /* 64 kbps stereo AAC-LC + SBR */
{QCDATA_BR_MODE_VBR_3, FL2FXCONST_DBL(0.135f)}, /* 80 - 96 kbps stereo AAC-LC */
{QCDATA_BR_MODE_VBR_4, FL2FXCONST_DBL(0.111f)}, /* 128 kbps stereo AAC-LC */
- {QCDATA_BR_MODE_VBR_5, FL2FXCONST_DBL(0.070f)}, /* 192 kbps stereo AAC-LC */
- {QCDATA_BR_MODE_SFR, FL2FXCONST_DBL(0.00f)},
- {QCDATA_BR_MODE_FF, FL2FXCONST_DBL(0.00f)}
+ {QCDATA_BR_MODE_VBR_5, FL2FXCONST_DBL(0.070f)} /* 192 kbps stereo AAC-LC */
};
static INT isConstantBitrateMode(
@@ -369,6 +366,7 @@ QCNew_bail:
AAC_ENCODER_ERROR FDKaacEnc_QCInit(QC_STATE *hQC,
struct QC_INIT *init)
{
+ int i;
hQC->maxBitsPerFrame = init->maxBits;
hQC->minBitsPerFrame = init->minBits;
hQC->nElements = init->channelMapping->nElements;
@@ -399,25 +397,12 @@ AAC_ENCODER_ERROR FDKaacEnc_QCInit(QC_STATE *hQC,
(init->averageBits/init->nSubFrames) - hQC->globHdrBits,
hQC->maxBitsPerFrame/init->channelMapping->nChannelsEff);
- switch(hQC->bitrateMode){
- case QCDATA_BR_MODE_CBR:
- case QCDATA_BR_MODE_VBR_1:
- case QCDATA_BR_MODE_VBR_2:
- case QCDATA_BR_MODE_VBR_3:
- case QCDATA_BR_MODE_VBR_4:
- case QCDATA_BR_MODE_VBR_5:
- case QCDATA_BR_MODE_SFR:
- case QCDATA_BR_MODE_FF:
- if((int)hQC->bitrateMode < (int)(sizeof(tableVbrQualFactor)/sizeof(TAB_VBR_QUAL_FACTOR))){
- hQC->vbrQualFactor = (FIXP_DBL)tableVbrQualFactor[hQC->bitrateMode].vbrQualFactor;
- } else {
- hQC->vbrQualFactor = FL2FXCONST_DBL(0.f); /* default setting */
- }
- break;
- case QCDATA_BR_MODE_INVALID:
- default:
- hQC->vbrQualFactor = FL2FXCONST_DBL(0.f);
+ hQC->vbrQualFactor = FL2FXCONST_DBL(0.f);
+ for (i=0; i<(int)(sizeof(tableVbrQualFactor)/sizeof(TAB_VBR_QUAL_FACTOR)); i++) {
+ if (hQC->bitrateMode==tableVbrQualFactor[i].bitrateMode) {
+ hQC->vbrQualFactor = (FIXP_DBL)tableVbrQualFactor[i].vbrQualFactor;
break;
+ }
}
FDKaacEnc_AdjThrInit(