]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacdec.c
More mp{1,2,3} 32-point DCT transform to our common DCT framework.
[ffmpeg] / libavcodec / aacdec.c
index b10749ec08a89e9abbab853168bc71044ac8f3cf..e375d1f98b79a96152a64a6a88f1833de19c756a 100644 (file)
@@ -537,7 +537,6 @@ static void reset_predictor_group(PredictorState *ps, int group_num)
 static av_cold int aac_decode_init(AVCodecContext *avctx)
 {
     AACContext *ac = avctx->priv_data;
-    int i;
 
     ac->avctx = avctx;
     ac->m4ac.sample_rate = avctx->sample_rate;
@@ -581,10 +580,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
         ac->sf_offset = 60;
     }
 
-#if !CONFIG_HARDCODED_TABLES
-    for (i = 0; i < 428; i++)
-        ff_aac_pow2sf_tab[i] = pow(2, (i - 200) / 4.);
-#endif /* CONFIG_HARDCODED_TABLES */
+    ff_aac_tableinit();
 
     INIT_VLC_STATIC(&vlc_scalefactors,7,FF_ARRAY_ELEMS(ff_aac_scalefactor_code),
                     ff_aac_scalefactor_bits, sizeof(ff_aac_scalefactor_bits[0]), sizeof(ff_aac_scalefactor_bits[0]),
@@ -2007,10 +2003,11 @@ static int aac_decode_frame(AVCodecContext *avctx, void *data,
         elem_id = get_bits(&gb, 4);
 
         if (elem_type < TYPE_DSE) {
-        if (!(che=get_che(ac, elem_type, elem_id))) {
-            av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id);
-            return -1;
-        }
+            if (!(che=get_che(ac, elem_type, elem_id))) {
+                av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
+                       elem_type, elem_id);
+                return -1;
+            }
             samples = 1024;
         }
 
@@ -2097,7 +2094,7 @@ static int aac_decode_frame(AVCodecContext *avctx, void *data,
     *data_size = data_size_tmp;
 
     if (samples)
-    ac->dsp.float_to_int16_interleave(data, (const float **)ac->output_data, samples, avctx->channels);
+        ac->dsp.float_to_int16_interleave(data, (const float **)ac->output_data, samples, avctx->channels);
 
     if (ac->output_configured)
         ac->output_configured = OC_LOCKED;