celp: optimise ff_celp_lp_synthesis_filter()
authorMans Rullgard <mans@mansr.com>
Sat, 11 Aug 2012 03:18:53 +0000 (04:18 +0100)
committerMans Rullgard <mans@mansr.com>
Mon, 13 Aug 2012 00:03:25 +0000 (01:03 +0100)
commitfddc5b9bea39968ed1f45c667869428865de7626
tree417219a2ad12b4bfe0ee0f9618ad42f4c8db0711
parent6c4975eaafd7f8f91e81ad8d6be744a434241fd3
celp: optimise ff_celp_lp_synthesis_filter()

Adding instead of subtracting the products in the loop allows the
compiler to generate more efficient multiply-accumulate instructions
when 16-bit multiply-subtract is not available. ARM has only
multiply-accumulate for 16-bit operands.  In general, if only one
variant exists, it is usually accumulate rather than subtract.

In the same spirit, using the dedicated saturation function enables
use of any special optimised versions of this.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/celp_filters.c