- float temp1 = exp2f(sbr->data[0].env_facs_q[e][k] * alpha + 7.0f);
- float temp2 = exp2f((pan_offset - sbr->data[1].env_facs_q[e][k]) * alpha);
- float fac;
+ float temp1, temp2, fac;
+ if (sbr->data[0].bs_amp_res) {
+ temp1 = ff_exp2fi(sbr->data[0].env_facs_q[e][k] + 7);
+ temp2 = ff_exp2fi(pan_offset - sbr->data[1].env_facs_q[e][k]);
+ }
+ else {
+ temp1 = ff_exp2fi((sbr->data[0].env_facs_q[e][k]>>1) + 7) *
+ exp2_tab[sbr->data[0].env_facs_q[e][k] & 1];
+ temp2 = ff_exp2fi((pan_offset - sbr->data[1].env_facs_q[e][k])>>1) *
+ exp2_tab[(pan_offset - sbr->data[1].env_facs_q[e][k]) & 1];
+ }