diff --git a/libs/spandsp/spandsp/fax-tests.xml b/libs/spandsp/spandsp/fax-tests.xml index 8c03d0e22f..b6ff399699 100644 --- a/libs/spandsp/spandsp/fax-tests.xml +++ b/libs/spandsp/spandsp/fax-tests.xml @@ -381,7 +381,7 @@ - + @@ -402,23 +402,11 @@ - + - - - - - - - - - - - - - + @@ -437,7 +425,7 @@ - + @@ -461,7 +449,7 @@ - + @@ -644,7 +632,7 @@ - + @@ -686,7 +674,7 @@ - + diff --git a/libs/spandsp/src/g722.c b/libs/spandsp/src/g722.c index f3126e8aa1..f9bd7f37b2 100644 --- a/libs/spandsp/src/g722.c +++ b/libs/spandsp/src/g722.c @@ -426,8 +426,8 @@ SPAN_DECLARE(int) g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8 s->ptr = 0; /* We shift by 12 to allow for the QMF filters (DC gain = 4096), less 1 to allow for the 15 bit input to the G.722 algorithm. */ - amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 11); - amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 11); + amp[outlen++] = saturate16(vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 11); + amp[outlen++] = saturate16(vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr) >> 11); } } }