[FFmpeg-soc] [soc]: r4331 - wmapro/wma3dec.c

faust3 subversion at mplayerhq.hu
Sat May 30 15:11:37 CEST 2009


Author: faust3
Date: Sat May 30 15:11:37 2009
New Revision: 4331

Log:
Make clear that the number of bands depends only on the subframe_len

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat May 30 15:00:49 2009	(r4330)
+++ wmapro/wma3dec.c	Sat May 30 15:11:37 2009	(r4331)
@@ -1177,7 +1177,6 @@ static int wma_decode_subframe(WMA3Decod
     int i;
     int total_samples = s->samples_per_frame * s->num_channels;
     int transmit_coeffs = 0;
-    int c;
 
     s->subframe_offset = get_bits_count(&s->gb);
 
@@ -1216,15 +1215,13 @@ static int wma_decode_subframe(WMA3Decod
 
     av_log(s->avctx, AV_LOG_DEBUG,"subframe is part of %i channels\n",s->channels_for_cur_subframe);
 
-    c = s->channel_indexes_for_cur_subframe[0];
-
     /** calculate number of scale factor bands and their offsets */
-    if(s->channel[c].num_subframes <= 1){
+    if(subframe_len == s->samples_per_frame){
         s->num_bands = s->num_sfb[0];
         s->cur_sfb_offsets = s->sfb_offsets;
         s->cur_subwoofer_cutoff = s->subwoofer_cutoffs[0];
     }else{
-        int frame_offset = av_log2(s->samples_per_frame/s->channel[c].subframe_len[s->channel[c].cur_subframe]);
+        int frame_offset = av_log2(s->samples_per_frame/subframe_len);
         s->num_bands = s->num_sfb[frame_offset];
         s->cur_sfb_offsets = &s->sfb_offsets[MAX_BANDS * frame_offset];
         s->cur_subwoofer_cutoff = s->subwoofer_cutoffs[frame_offset];


More information about the FFmpeg-soc mailing list