diff options
Diffstat (limited to 'media/libstagefright/codecs/aacenc/src/aacenc_core.c')
-rw-r--r-- | media/libstagefright/codecs/aacenc/src/aacenc_core.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc_core.c b/media/libstagefright/codecs/aacenc/src/aacenc_core.c index 616475c..b69a017 100644 --- a/media/libstagefright/codecs/aacenc/src/aacenc_core.c +++ b/media/libstagefright/codecs/aacenc/src/aacenc_core.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: aacenc_core.c
-
- Content: aac encoder core 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: aacenc_core.c + + Content: aac encoder core functions + *******************************************************************************/ #include "typedef.h" @@ -58,9 +58,9 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder const AACENC_CONFIG config /* pre-initialized config struct */ ) { - Word32 i;
+ Word32 i; Word32 error = 0; - Word16 profile = 1;
+ Word16 profile = 1; ELEMENT_INFO *elInfo = NULL; @@ -76,7 +76,7 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder error = InitElementInfo (config.nChannelsOut, &hAacEnc->elInfo); } -
+ if (!error) { elInfo = &hAacEnc->elInfo; } @@ -95,8 +95,8 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder } /* use or not adts header */ - if(!error) {
- hAacEnc->qcOut.qcElement.adtsUsed = config.adtsUsed;
+ if(!error) { + hAacEnc->qcOut.qcElement.adtsUsed = config.adtsUsed; } /* init encoder quantization */ @@ -198,14 +198,14 @@ Word16 AacEncEncode(AAC_ENCODER *aacEnc, /*!< an encoder handle */ &aacEnc->qcOut, &aacEnc->psyOut, &globUsedBits, - ancBytes,
+ ancBytes, aacEnc->psyKernel.sampleRateIdx); updateBitres(&aacEnc->qcKernel, &aacEnc->qcOut); /* write out the bitstream */ - *numOutBytes = GetBitsAvail(aacEnc->hBitStream) >> 3;
+ *numOutBytes = GetBitsAvail(aacEnc->hBitStream) >> 3; return 0; } |