Mercurial > libavcodec.hg
comparison wmaprodec.c @ 10298:9699e4499f2d libavcodec
WMAPRO: use vector_fmul_scalar from dsputil where possible
author | mru |
---|---|
date | Sun, 27 Sep 2009 08:16:50 +0000 |
parents | 38ab367d4231 |
children | ab687351bfef |
comparison
equal
deleted
inserted
replaced
10297:12d40dab6d80 | 10298:9699e4499f2d |
---|---|
979 | 979 |
980 (*ch)[y] = sum; | 980 (*ch)[y] = sum; |
981 } | 981 } |
982 } | 982 } |
983 } else if (s->num_channels == 2) { | 983 } else if (s->num_channels == 2) { |
984 for (y = sfb[0]; y < FFMIN(sfb[1], s->subframe_len); y++) { | 984 int len = FFMIN(sfb[1], s->subframe_len) - sfb[0]; |
985 ch_data[0][y] *= 181.0 / 128; | 985 s->dsp.vector_fmul_scalar(ch_data[0] + sfb[0], |
986 ch_data[1][y] *= 181.0 / 128; | 986 ch_data[0] + sfb[0], |
987 } | 987 181.0 / 128, len); |
988 s->dsp.vector_fmul_scalar(ch_data[1] + sfb[0], | |
989 ch_data[1] + sfb[0], | |
990 181.0 / 128, len); | |
988 } | 991 } |
989 } | 992 } |
990 } | 993 } |
991 } | 994 } |
992 } | 995 } |
1212 const int end = FFMIN(s->cur_sfb_offsets[b+1], s->subframe_len); | 1215 const int end = FFMIN(s->cur_sfb_offsets[b+1], s->subframe_len); |
1213 const int exp = s->channel[c].quant_step - | 1216 const int exp = s->channel[c].quant_step - |
1214 (s->channel[c].max_scale_factor - *sf++) * | 1217 (s->channel[c].max_scale_factor - *sf++) * |
1215 s->channel[c].scale_factor_step; | 1218 s->channel[c].scale_factor_step; |
1216 const float quant = pow(10.0, exp / 20.0); | 1219 const float quant = pow(10.0, exp / 20.0); |
1217 int start; | 1220 int start = s->cur_sfb_offsets[b]; |
1218 | 1221 s->dsp.vector_fmul_scalar(s->tmp + start, |
1219 for (start = s->cur_sfb_offsets[b]; start < end; start++) | 1222 s->channel[c].coeffs + start, |
1220 s->tmp[start] = s->channel[c].coeffs[start] * quant; | 1223 quant, end - start); |
1221 } | 1224 } |
1222 | 1225 |
1223 /** apply imdct (ff_imdct_half == DCTIV with reverse) */ | 1226 /** apply imdct (ff_imdct_half == DCTIV with reverse) */ |
1224 ff_imdct_half(&s->mdct_ctx[av_log2(subframe_len) - BLOCK_MIN_BITS], | 1227 ff_imdct_half(&s->mdct_ctx[av_log2(subframe_len) - BLOCK_MIN_BITS], |
1225 s->channel[c].coeffs, s->tmp); | 1228 s->channel[c].coeffs, s->tmp); |