[FFmpeg-cvslog] r15314 - trunk/libavcodec/aac.c
superdump
subversion
Sat Sep 13 22:51:37 CEST 2008
Author: superdump
Date: Sat Sep 13 22:51:36 2008
New Revision: 15314
Log:
Apply pulses to unscaled coefficients rather than scaled.
Slight reworking of a patch by Alex Converse (alex converse gmail com)
Modified:
trunk/libavcodec/aac.c
Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c (original)
+++ trunk/libavcodec/aac.c Sat Sep 13 22:51:36 2008
@@ -754,12 +754,19 @@ static int decode_spectrum_and_dequant(A
}
if (pulse_present) {
+ idx = 0;
for(i = 0; i < pulse->num_pulse; i++){
float co = coef_base[ pulse->pos[i] ];
+ while(offsets[idx + 1] <= pulse->pos[i])
+ idx++;
+ if (band_type[idx] != NOISE_BT && sf[idx]) {
float ico = -pulse->amp[i];
- if (co)
+ if (co) {
+ co /= sf[idx];
ico = co / sqrtf(sqrtf(fabsf(co))) + (co > 0 ? -ico : ico);
- coef_base[ pulse->pos[i] ] = cbrtf(fabsf(ico)) * ico;
+ }
+ coef_base[ pulse->pos[i] ] = cbrtf(fabsf(ico)) * ico * sf[idx];
+ }
}
}
return 0;
More information about the ffmpeg-cvslog
mailing list