[FFmpeg-soc] [soc]: r4025 - wmapro/wma3dec.c
faust3
subversion at mplayerhq.hu
Sun Feb 8 20:20:06 CET 2009
Author: faust3
Date: Sun Feb 8 20:20:04 2009
New Revision: 4025
Log:
make it obvious that num_bands, cur_sfb_offsets
and cur_subwoofer_cutoff are the same for
all channels that share a subframe (offset and size)
Modified:
wmapro/wma3dec.c
Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c Sun Feb 8 19:19:31 2009 (r4024)
+++ wmapro/wma3dec.c Sun Feb 8 20:20:04 2009 (r4025)
@@ -1147,15 +1147,19 @@ static int wma_decode_subframe(WMA3Decod
for(i=0;i<s->channels_for_cur_subframe;i++){
int c = s->channel_indexes_for_cur_subframe[i];
- if(s->channel[c].num_subframes <= 1){
- 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]);
- 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];
+ /** calculate number of scale factor bands and their offsets */
+ /** FIXME move out of the loop */
+ if(i == 0){
+ if(s->channel[c].num_subframes <= 1){
+ 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]);
+ 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];
+ }
}
s->channel[c].coeffs = &s->channel[c].out[s->samples_per_frame/2 + offset];
memset(s->channel[c].coeffs,0,sizeof(float) * subframe_len);
More information about the FFmpeg-soc
mailing list