[FFmpeg-soc] [soc]: r4409 - wmapro/wma3dec.c
faust3
subversion at mplayerhq.hu
Thu Jun 11 09:50:26 CEST 2009
Author: faust3
Date: Thu Jun 11 09:50:25 2009
New Revision: 4409
Log:
avoid av_log2, calculated value is already present in the extradata
Modified:
wmapro/wma3dec.c
Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c Thu Jun 11 00:18:26 2009 (r4408)
+++ wmapro/wma3dec.c Thu Jun 11 09:50:25 2009 (r4409)
@@ -183,6 +183,7 @@ static av_cold int wma_decode_init(AVCod
int16_t* sfb_offsets;
unsigned int channel_mask;
int i;
+ int log2_num_subframes;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
@@ -226,8 +227,9 @@ static av_cold int wma_decode_init(AVCod
s->channel[i].prev_block_len = s->samples_per_frame;
/** subframe info */
- s->max_num_subframes = 1 << ((s->decode_flags & 0x38) >> 3);
- s->num_possible_block_sizes = av_log2(s->max_num_subframes) + 1;
+ log2_num_subframes = ((s->decode_flags & 0x38) >> 3);
+ s->max_num_subframes = 1 << log2_num_subframes;
+ s->num_possible_block_sizes = log2_num_subframes + 1;
s->min_samples_per_subframe = s->samples_per_frame / s->max_num_subframes;
s->dynamic_range_compression = (s->decode_flags & 0x80) >> 7;
More information about the FFmpeg-soc
mailing list