summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/codecs/aacenc/src/pre_echo_control.c')
-rw-r--r--media/libstagefright/codecs/aacenc/src/pre_echo_control.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/pre_echo_control.c b/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
index 1e818a2..1406e11 100644
--- a/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
+++ b/media/libstagefright/codecs/aacenc/src/pre_echo_control.c
@@ -29,7 +29,7 @@
/*****************************************************************************
*
-* function name:InitPreEchoControl
+* function name:InitPreEchoControl
* description: init pre echo control parameter
*
*****************************************************************************/
@@ -40,13 +40,13 @@ void InitPreEchoControl(Word32 *pbThresholdNm1,
Word16 pb;
for(pb=0; pb<numPb; pb++) {
- pbThresholdNm1[pb] = pbThresholdQuiet[pb];
+ pbThresholdNm1[pb] = pbThresholdQuiet[pb];
}
}
/*****************************************************************************
*
-* function name:PreEchoControl
+* function name:PreEchoControl
* description: update shreshold to avoid pre echo
* thr(n) = max(rpmin*thrq(n), min(thrq(n), rpelev*thrq1(n)))
*
@@ -68,22 +68,22 @@ void PreEchoControl(Word32 *pbThresholdNm1,
(void)maxAllowedIncreaseFactor;
scaling = ((mdctScale - mdctScalenm1) << 1);
-
+
if ( scaling > 0 ) {
for(i = 0; i < numPb; i++) {
tmpThreshold1 = pbThresholdNm1[i] >> (scaling-1);
tmpThreshold2 = L_mpy_ls(pbThreshold[i], minRemainingThresholdFactor);
/* copy thresholds to internal memory */
- pbThresholdNm1[i] = pbThreshold[i];
+ pbThresholdNm1[i] = pbThreshold[i];
+
-
if(pbThreshold[i] > tmpThreshold1) {
- pbThreshold[i] = tmpThreshold1;
+ pbThreshold[i] = tmpThreshold1;
}
-
+
if(tmpThreshold2 > pbThreshold[i]) {
- pbThreshold[i] = tmpThreshold2;
+ pbThreshold[i] = tmpThreshold2;
}
}
@@ -96,15 +96,15 @@ void PreEchoControl(Word32 *pbThresholdNm1,
tmpThreshold2 = L_mpy_ls(pbThreshold[i], minRemainingThresholdFactor);
/* copy thresholds to internal memory */
- pbThresholdNm1[i] = pbThreshold[i];
+ pbThresholdNm1[i] = pbThreshold[i];
+
-
if(((pbThreshold[i] >> scaling) > tmpThreshold1)) {
pbThreshold[i] = tmpThreshold1 << scaling;
}
-
+
if(tmpThreshold2 > pbThreshold[i]) {
- pbThreshold[i] = tmpThreshold2;
+ pbThreshold[i] = tmpThreshold2;
}
}