diff options
author | James Almer <jamrial@gmail.com> | 2017-07-20 15:37:36 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-08-01 00:33:03 -0300 |
commit | 8f2f166c99df9d0fcfdabe3adb2041f9fa3bfaa2 (patch) | |
tree | 68a2c26b18a6758febf5a3a7ae87264327c68784 /libavcodec/atrac3plusdsp.c | |
parent | b664d1f3ffbce07c206d679cc09a1fd29955de44 (diff) |
avcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensation
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/atrac3plusdsp.c')
-rw-r--r-- | libavcodec/atrac3plusdsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c index d089588274..96aa402c2b 100644 --- a/libavcodec/atrac3plusdsp.c +++ b/libavcodec/atrac3plusdsp.c @@ -415,11 +415,12 @@ static const int subband_to_qu[17] = { 0, 8, 12, 16, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }; -void ff_atrac3p_power_compensation(Atrac3pChanUnitCtx *ctx, int ch_index, - float *sp, int rng_index, int sb) +void ff_atrac3p_power_compensation(Atrac3pChanUnitCtx *ctx, AVFloatDSPContext *fdsp, + int ch_index, float *sp, int rng_index, int sb) { AtracGainInfo *g1, *g2; - float pwcsp[ATRAC3P_SUBBAND_SAMPLES], *dst, grp_lev, qu_lev; + LOCAL_ALIGNED_32(float, pwcsp, [ATRAC3P_SUBBAND_SAMPLES]); + float *dst, grp_lev, qu_lev; int i, gain_lev, gcv = 0, qu, nsp; int swap_ch = (ctx->unit_type == CH_UNIT_STEREO && ctx->swap_channels[sb]) ? 1 : 0; @@ -456,8 +457,7 @@ void ff_atrac3p_power_compensation(Atrac3pChanUnitCtx *ctx, int ch_index, dst = &sp[ff_atrac3p_qu_to_spec_pos[qu]]; nsp = ff_atrac3p_qu_to_spec_pos[qu + 1] - ff_atrac3p_qu_to_spec_pos[qu]; - for (i = 0; i < nsp; i++) - dst[i] += pwcsp[i] * qu_lev; + fdsp->vector_fmac_scalar(dst, pwcsp, qu_lev, nsp); } } |