[FFmpeg-soc] [soc]: r1547 - amr/amrnbfloatdec.c
superdump
subversion at mplayerhq.hu
Mon Dec 10 21:04:31 CET 2007
Author: superdump
Date: Mon Dec 10 21:04:31 2007
New Revision: 1547
Log:
Overflow check and 'resynthesis' should not be recursive
Modified:
amr/amrnbfloatdec.c
Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c (original)
+++ amr/amrnbfloatdec.c Mon Dec 10 21:04:31 2007
@@ -1003,12 +1003,6 @@ static void synthesis(AMRContext *p, flo
}
samples[i] = excitation[i] + sample_temp;
}
-
- // Check for overflows
- for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
- if(fabsf(samples[i])>1.0)
- synthesis(p, excitation, lpc, samples, 1);
- }
}
/*** end of synthesis functions ***/
@@ -1280,6 +1274,13 @@ static int amrnb_decode_frame(AVCodecCon
synthesis(p, p->excitation, p->lpc[subframe], &p->samples_in[LP_FILTER_ORDER], 0);
+ // Check for overflows
+ for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
+ if(fabsf(samples[i])>1.0)
+ synthesis(p, excitation, lpc, samples, 1);
+ }
+
+
/*** end of synthesis ***/
// convert float samples to 16-bit integer
More information about the FFmpeg-soc
mailing list