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;
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);
}
}