diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2016-04-04 15:03:26 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2016-04-04 15:03:26 -0700 |
commit | ef30836651bf059c3120c03dd11e08b6aafdae13 (patch) | |
tree | 6717743d4422e9d88e9a9f1631effd7563a9856b /libSBRenc/src/ps_bitenc.cpp | |
parent | f86e64f5c712edc2f3dd0a9d59d75a8ebd3422ea (diff) | |
download | fdk-aac-ef30836651bf059c3120c03dd11e08b6aafdae13.tar.gz fdk-aac-ef30836651bf059c3120c03dd11e08b6aafdae13.tar.bz2 fdk-aac-ef30836651bf059c3120c03dd11e08b6aafdae13.zip |
Remove compiler warnings, revised ARM QMF encoder
Bug 8493170
Change-Id: I64d19a8a8059c5a96386b1eaac297fd2469515f8
Diffstat (limited to 'libSBRenc/src/ps_bitenc.cpp')
-rw-r--r-- | libSBRenc/src/ps_bitenc.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/libSBRenc/src/ps_bitenc.cpp b/libSBRenc/src/ps_bitenc.cpp index b1fe12e..420ea15 100644 --- a/libSBRenc/src/ps_bitenc.cpp +++ b/libSBRenc/src/ps_bitenc.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 @@ -261,21 +261,23 @@ static const UINT opdDeltaTime_Code[] = 0x00000001, 0x00000002, 0x00000001, 0x00000007, 0x00000006, 0000000000, 0x00000002, 0x00000003 }; -static const INT psBands[] = +static INT getNoBands(const INT mode) { - PS_BANDS_COARSE, - PS_BANDS_MID -}; - -static INT getNoBands(PS_RESOLUTION mode) -{ - if(mode>=6) - return 0; + INT noBands = 0; - if(mode>=3) - mode = (PS_RESOLUTION)(mode-3); + switch (mode) { + case 0: case 3: /* coarse */ + noBands = PS_BANDS_COARSE; + break; + case 1: case 4: /* mid */ + noBands = PS_BANDS_MID; + break; + case 2: case 5: /* fine not supported */ + default: /* coarse as default */ + noBands = PS_BANDS_COARSE; + } - return psBands[mode]; + return noBands; } static INT getIIDRes(INT iidMode) @@ -524,7 +526,7 @@ static INT encodeIpdOpd(HANDLE_PS_OUT psOut, bitCnt += FDKsbrEnc_EncodeIpd( hBitBuf, psOut->ipd[env], ipdLast, - getNoBands((PS_RESOLUTION)psOut->iidMode), + getNoBands(psOut->iidMode), psOut->deltaIPD[env], &error); @@ -532,7 +534,7 @@ static INT encodeIpdOpd(HANDLE_PS_OUT psOut, bitCnt += FDKsbrEnc_EncodeOpd( hBitBuf, psOut->opd[env], opdLast, - getNoBands((PS_RESOLUTION)psOut->iidMode), + getNoBands(psOut->iidMode), psOut->deltaOPD[env], &error ); } @@ -661,7 +663,7 @@ INT FDKsbrEnc_WritePSBitstream(const HANDLE_PS_OUT psOut, bitCnt += FDKsbrEnc_EncodeIid( hBitBuf, psOut->iid[env], iidLast, - getNoBands((PS_RESOLUTION)psOut->iidMode), + getNoBands(psOut->iidMode), (PS_IID_RESOLUTION)getIIDRes(psOut->iidMode), psOut->deltaIID[env], &error ); @@ -677,7 +679,7 @@ INT FDKsbrEnc_WritePSBitstream(const HANDLE_PS_OUT psOut, bitCnt += FDKsbrEnc_EncodeIcc( hBitBuf, psOut->icc[env], iccLast, - getNoBands((PS_RESOLUTION)psOut->iccMode), + getNoBands(psOut->iccMode), psOut->deltaICC[env], &error); |