[FFmpeg-soc] [soc]: r3217 - in aacenc: aacenc.c aacpsy.c

kostya subversion at mplayerhq.hu
Wed Aug 13 15:03:11 CEST 2008


Author: kostya
Date: Wed Aug 13 15:03:11 2008
New Revision: 3217

Log:
Move TODOs to the top of the source files

Modified:
   aacenc/aacenc.c
   aacenc/aacpsy.c

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Wed Aug 13 15:03:11 2008
@@ -24,6 +24,13 @@
  * AAC encoder
  */
 
+/***********************************
+ *              TODOs:
+ * psy model selection with some option
+ * change greedy codebook search into something more optimal, like Viterbi algorithm
+ * determine run lengths along with codebook
+ ***********************************/
+
 #include "avcodec.h"
 #include "bitstream.h"
 #include "dsputil.h"
@@ -228,7 +235,6 @@ static av_cold int aac_encode_init(AVCod
 
     s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
     s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);
-    //TODO: psy model selection with some option
     if(ff_aac_psy_init(&s->psy, avctx, AAC_PSY_3GPP, aac_chan_configs[avctx->channels-1][0], 0, s->swb_sizes1024, s->swb_num1024, s->swb_sizes128, s->swb_num128) < 0){
         av_log(avctx, AV_LOG_ERROR, "Cannot initialize selected model.\n");
         return -1;
@@ -365,7 +371,6 @@ static int determine_section_info(AACEnc
             break;
     best = INT_MAX;
     bestcb = 11;
-    //TODO: change greedy search into something more optimal, like Viterbi
     for(; cb < 12; cb++){
         score = 0;
         dim = (aac_cb_info[cb].flags & CB_PAIRS) ? 2 : 4;
@@ -419,7 +424,6 @@ static void encode_band_coeffs(AACEncCon
 
     if(!bits) return;
 
-    //TODO: factorize?
     if(aac_cb_info[cb].flags & CB_ESCAPE){
         for(i = start; i < start + size; i += dim){
             idx = 0;
@@ -609,7 +613,6 @@ static int encode_individual_channel(AVC
     AACEncContext *s = avctx->priv_data;
     int i, g, w;
 
-    //TODO: determine run lengths along with codebook
     for(w = 0; w < cpe->ch[channel].ics.num_windows; w++){
         i = w << 7;
         if(cpe->ch[channel].ics.group_len[w]) continue;

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c	(original)
+++ aacenc/aacpsy.c	Wed Aug 13 15:03:11 2008
@@ -28,6 +28,18 @@
 #include "aacpsy.h"
 #include "aactab.h"
 
+/***********************************
+ *              TODOs:
+ * General:
+ * better audio preprocessing (add DC highpass filter?)
+ * more psy models
+ *
+ * 3GPP-based psy model:
+ * thresholds linearization after their modifications for attaining given bitrate
+ * try other bitrate controlling mechanism (maybe use ratecontrol.c?)
+ * control quality for quality-based output
+ **********************************/
+
 /**
  * Convert coefficients to integers.
  * @return sum of coefficients
@@ -736,7 +748,6 @@ static void psy_3gpp_process(AACPsyConte
                 }
             }
         }
-        //TODO: linearization
 
         //determine scalefactors - 5.6.2 "Scalefactor determination"
         for(ch = 0; ch < chans; ch++){
@@ -762,7 +773,6 @@ static void psy_3gpp_process(AACPsyConte
             for(w = 0; w < cpe->ch[ch].ics.num_windows; w++){
                 for(g = 0; g < cpe->ch[ch].ics.num_swb; g++){
                     g2 = w*16 + g;
-                    //TODO: make controllable quality
                     if(pch->band[ch][g2].thr >= pch->band[ch][g2].energy){
                         cpe->ch[ch].sf_idx[w][g] = 0;
                         cpe->ch[ch].zeroes[w][g] = 1;



More information about the FFmpeg-soc mailing list