Commit 138914dc authored by Mans Rullgard's avatar Mans Rullgard

g723.1: do not bounce intermediate values via memory

Although a reasonable compiler will probably optimise out the
actual store and load, this operation still implies a truncation
to 16 bits which the compiler will probably not realise is not
necessary here.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent cbcf1b41
......@@ -1064,9 +1064,8 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
p->cur_rate);
/* Get the total excitation */
for (j = 0; j < SUBFRAME_LEN; j++) {
vector_ptr[j] = av_clip_int16(vector_ptr[j] << 1);
vector_ptr[j] = av_clip_int16(vector_ptr[j] +
acb_vector[j]);
int v = av_clip_int16(vector_ptr[j] << 1);
vector_ptr[j] = av_clip_int16(v + acb_vector[j]);
}
vector_ptr += SUBFRAME_LEN;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment