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: Mans Rullgard <mans@mansr.com>
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;
}