mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Limit too large scale_change exponent used in adjustTimeSlot" am: cfc6616048
am: 8b3ca08a7d
Change-Id: I42d3b717bb324e560d5ae15265fa9f36d8eb0682
This commit is contained in:
commit
d8be063322
|
@ -1561,13 +1561,14 @@ void calculateSbrEnvelope(
|
||||||
adjustTimeSlotHQ_GainAndNoise(
|
adjustTimeSlotHQ_GainAndNoise(
|
||||||
&analysBufferReal[j][lowSubband],
|
&analysBufferReal[j][lowSubband],
|
||||||
&analysBufferImag[j][lowSubband], h_sbr_cal_env, pNrgs,
|
&analysBufferImag[j][lowSubband], h_sbr_cal_env, pNrgs,
|
||||||
lowSubband, noSubbands, scale_change, smooth_ratio, noNoiseFlag,
|
lowSubband, noSubbands, fMin(scale_change, DFRACT_BITS - 1),
|
||||||
filtBufferNoiseShift);
|
smooth_ratio, noNoiseFlag, filtBufferNoiseShift);
|
||||||
} else {
|
} else {
|
||||||
adjustTimeSlotHQ(&analysBufferReal[j][lowSubband],
|
adjustTimeSlotHQ(&analysBufferReal[j][lowSubband],
|
||||||
&analysBufferImag[j][lowSubband], h_sbr_cal_env,
|
&analysBufferImag[j][lowSubband], h_sbr_cal_env,
|
||||||
pNrgs, lowSubband, noSubbands, scale_change,
|
pNrgs, lowSubband, noSubbands,
|
||||||
smooth_ratio, noNoiseFlag, filtBufferNoiseShift);
|
fMin(scale_change, DFRACT_BITS - 1), smooth_ratio,
|
||||||
|
noNoiseFlag, filtBufferNoiseShift);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FDK_ASSERT(!iTES_enable); /* not supported */
|
FDK_ASSERT(!iTES_enable); /* not supported */
|
||||||
|
@ -1575,13 +1576,14 @@ void calculateSbrEnvelope(
|
||||||
/* FDKmemset(analysBufferReal[j], 0, 64 * sizeof(FIXP_DBL)); */
|
/* FDKmemset(analysBufferReal[j], 0, 64 * sizeof(FIXP_DBL)); */
|
||||||
adjustTimeSlot_EldGrid(&analysBufferReal[j][lowSubband], pNrgs,
|
adjustTimeSlot_EldGrid(&analysBufferReal[j][lowSubband], pNrgs,
|
||||||
&h_sbr_cal_env->harmIndex, lowSubband,
|
&h_sbr_cal_env->harmIndex, lowSubband,
|
||||||
noSubbands, scale_change, noNoiseFlag,
|
noSubbands,
|
||||||
&h_sbr_cal_env->phaseIndex,
|
fMin(scale_change, DFRACT_BITS - 1),
|
||||||
|
noNoiseFlag, &h_sbr_cal_env->phaseIndex,
|
||||||
EXP2SCALE(adj_e) - sbrScaleFactor->lb_scale);
|
EXP2SCALE(adj_e) - sbrScaleFactor->lb_scale);
|
||||||
} else {
|
} else {
|
||||||
adjustTimeSlotLC(&analysBufferReal[j][lowSubband], pNrgs,
|
adjustTimeSlotLC(&analysBufferReal[j][lowSubband], pNrgs,
|
||||||
&h_sbr_cal_env->harmIndex, lowSubband, noSubbands,
|
&h_sbr_cal_env->harmIndex, lowSubband, noSubbands,
|
||||||
scale_change, noNoiseFlag,
|
fMin(scale_change, DFRACT_BITS - 1), noNoiseFlag,
|
||||||
&h_sbr_cal_env->phaseIndex);
|
&h_sbr_cal_env->phaseIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue