[FFmpeg-soc] [soc]: r2471 - aacenc/aacenc.c

kostya subversion at mplayerhq.hu
Tue Jun 17 12:05:16 CEST 2008


Author: kostya
Date: Tue Jun 17 12:05:16 2008
New Revision: 2471

Log:
This variant for 8 short window sequence works,
but may cause troubles with transition windows.


Modified:
   aacenc/aacenc.c

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Tue Jun 17 12:05:16 2008
@@ -254,14 +254,15 @@ static void analyze(AVCodecContext *avct
         }
         ff_mdct_calc(&s->mdct1024, cpe->ch[channel].coeffs, s->output, s->tmp);
     }else{
+    //XXX: wrong but works
         for (k = 0; k < 1024; k += 128) {
-            memcpy(s->output + k, cpe->ch[channel].saved + k, sizeof(float)*128);
+            memcpy(s->output, cpe->ch[channel].saved, sizeof(float)*128);
             j = channel + k * avctx->channels;
             for (i = 0; i < 128; i++, j += avctx->channels){
-                s->output[k+i+128]          = audio[j] / 64 * s->kbd_short_128[128 - i - 1];
-                cpe->ch[channel].saved[k+i] = audio[j] / 64 * s->kbd_short_128[i];
+                s->output[i+128]          = audio[j] / 512 * s->kbd_short_128[128 - i - 1];
+                cpe->ch[channel].saved[i] = audio[j] / 512 * s->kbd_short_128[i];
             }
-            ff_mdct_calc(&s->mdct128, cpe->ch[channel].coeffs + k, s->output+k, s->tmp);
+            ff_mdct_calc(&s->mdct128, cpe->ch[channel].coeffs + k, s->output, s->tmp);
         }
     }
     //convert coefficients into form used by AAC



More information about the FFmpeg-soc mailing list