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

kostya subversion at mplayerhq.hu
Mon Aug 18 07:57:15 CEST 2008


Author: kostya
Date: Mon Aug 18 07:57:15 2008
New Revision: 3436

Log:
Hardcode escape codebook vector length

Modified:
   aacenc/aacenc.c

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Mon Aug 18 07:57:15 2008
@@ -535,19 +535,19 @@ static void encode_band_coeffs(AACEncCon
 
     if(cb == ESC_BT){
         int coef_abs[2];
-        for(i = start; i < start + size; i += dim){
+        for(i = start; i < start + size; i += 2){
             idx = 0;
-            for(j = 0; j < dim; j++){
+            for(j = 0; j < 2; j++){
                 coef_abs[j] = FFABS(cpe->ch[channel].icoefs[i+j]);
                 idx = idx*17 + FFMIN(coef_abs[j], 16);
             }
             put_bits(&s->pb, bits[idx], codes[idx]);
             //output signs
-            for(j = 0; j < dim; j++)
+            for(j = 0; j < 2; j++)
                 if(cpe->ch[channel].icoefs[i+j])
                     put_bits(&s->pb, 1, cpe->ch[channel].icoefs[i+j] < 0);
             //output escape values
-            for(j = 0; j < dim; j++)
+            for(j = 0; j < 2; j++)
                 if(coef_abs[j] > 15){
                     int len = av_log2(coef_abs[j]);
 



More information about the FFmpeg-soc mailing list