Skip to content

Commit c0eb2ca

Browse files
committed
Fix fixed-point issue introduced in 462c50d
1 parent ce06772 commit c0eb2ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

celt/celt_encoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,8 @@ static int run_prefilter(CELTEncoder *st, celt_sig *in, celt_sig *prefilter_mem,
14861486

14871487
if (CC==2) {
14881488
opus_val16 thresh[2];
1489-
thresh[0] = MULT16_16_Q15(MULT16_16_Q15(QCONST16(.25f, 15), gain1), before[0]) + MULT16_16_Q15(QCONST16(.01f,15), before[1]);
1490-
thresh[1] = MULT16_16_Q15(MULT16_16_Q15(QCONST16(.25f, 15), gain1), before[1]) + MULT16_16_Q15(QCONST16(.01f,15), before[0]);
1489+
thresh[0] = MULT16_32_Q15(MULT16_16_Q15(QCONST16(.25f, 15), gain1), before[0]) + MULT16_32_Q15(QCONST16(.01f,15), before[1]);
1490+
thresh[1] = MULT16_32_Q15(MULT16_16_Q15(QCONST16(.25f, 15), gain1), before[1]) + MULT16_32_Q15(QCONST16(.01f,15), before[0]);
14911491
/* Don't use the filter if one channel gets significantly worse. */
14921492
if (after[0]-before[0] > thresh[0] || after[1]-before[1] > thresh[1]) cancel_pitch = 1;
14931493
/* Use the filter only if at least one channel gets significantly better. */

0 commit comments

Comments
 (0)