mirror of https://github.com/thesofproject/sof.git
Audio: SRC: Fix generic C version overflow in 16 bit round
This patch adds the missing saturation to rounding in function src_polyphase_stage_cir_s16(). The error was caught with "src_test(16, 16, [176400 192000], 8000)" where both conversions made an overflow in chirp test. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
16fbd5f081
commit
e627c7994f
|
@ -392,7 +392,7 @@ void src_polyphase_stage_cir_s16(struct src_stage_prm *s)
|
|||
n_min = (m < n_min) ? m : n_min;
|
||||
m -= n_min;
|
||||
for (i = 0; i < n_min; i++) {
|
||||
*y_wptr = Q_SHIFT_RND(*fir->out_rp, 31, 15);
|
||||
*y_wptr = sat_int16(Q_SHIFT_RND(*fir->out_rp, 31, 15));
|
||||
y_wptr++;
|
||||
fir->out_rp++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue