diff options
Diffstat (limited to 'media/libstagefright/codecs/aacenc/src/dyn_bits.c')
-rw-r--r-- | media/libstagefright/codecs/aacenc/src/dyn_bits.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/dyn_bits.c b/media/libstagefright/codecs/aacenc/src/dyn_bits.c index 3deacca..f3b3e02 100644 --- a/media/libstagefright/codecs/aacenc/src/dyn_bits.c +++ b/media/libstagefright/codecs/aacenc/src/dyn_bits.c @@ -1,23 +1,23 @@ -/*
- ** Copyright 2003-2010, VisualOn, Inc.
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-/*******************************************************************************
- File: dyn_bits.c
-
- Content: Noiseless coder module functions
-
+/* + ** Copyright 2003-2010, VisualOn, Inc. + ** + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. + */ +/******************************************************************************* + File: dyn_bits.c + + Content: Noiseless coder module functions + *******************************************************************************/ #include "aac_rom.h" @@ -177,14 +177,14 @@ gmStage1(SECTION_INFO * sectionInfo, const Word16 maxSfb, const Word16 *sideInfoTab) { - SECTION_INFO * sectionInfo_s;
- SECTION_INFO * sectionInfo_e;
+ SECTION_INFO * sectionInfo_s; + SECTION_INFO * sectionInfo_e; Word32 mergeStart, mergeEnd; mergeStart = 0; do { - sectionInfo_s = sectionInfo + mergeStart;
+ sectionInfo_s = sectionInfo + mergeStart; for (mergeEnd=mergeStart+1; mergeEnd<maxSfb; mergeEnd++) { sectionInfo_e = sectionInfo + mergeEnd; if (sectionInfo_s->codeBook != sectionInfo_e->codeBook) @@ -372,9 +372,9 @@ static void scfCount(const Word16 *scalefacGain, SECTION_DATA * sectionData) { - SECTION_INFO *psectionInfo;
- SECTION_INFO *psectionInfom;
-
+ SECTION_INFO *psectionInfo; + SECTION_INFO *psectionInfom; + /* counter */ Word32 i = 0; /* section counter */ Word32 j = 0; /* sfb counter */ @@ -397,7 +397,7 @@ static void scfCount(const Word16 *scalefacGain, } lastValScf = 0; - sectionData->firstScf = 0;
+ sectionData->firstScf = 0; psectionInfo = sectionData->sectionInfo; for (i=0; i<sectionData->noOfSections; i++) { @@ -406,9 +406,9 @@ static void scfCount(const Word16 *scalefacGain, sectionData->firstScf = psectionInfo->sfbStart; lastValScf = scalefacGain[sectionData->firstScf]; break; - }
+ } psectionInfo += 1; - }
+ } psectionInfo = sectionData->sectionInfo; for (i=0; i<sectionData->noOfSections; i++, psectionInfo += 1) { @@ -451,7 +451,7 @@ static void scfCount(const Word16 *scalefacGain, scfSkipCounter = scfSkipCounter + 1; } } -
+ psectionInfom = psectionInfo + 1; /* search for the next maxValueInSfb[] != 0 in all other sections */ for (m = i + 1; (m < sectionData->noOfSections) && (found == 0); m++) { @@ -477,8 +477,8 @@ static void scfCount(const Word16 *scalefacGain, /* count scalefactor skip */ scfSkipCounter = scfSkipCounter + 1; } - }
-
+ } + psectionInfom += 1; } @@ -490,7 +490,7 @@ static void scfCount(const Word16 *scalefacGain, else { deltaScf = 0; scfSkipCounter = scfSkipCounter - 1; - }
+ } } else { deltaScf = lastValScf - scalefacGain[j]; @@ -539,7 +539,7 @@ dynBitCount(const Word16 *quantSpectrum, sectionData); - return (sectionData->huffmanBits + sectionData->sideInfoBits +
+ return (sectionData->huffmanBits + sectionData->sideInfoBits + sectionData->scalefacBits); } |