diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 02:04:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 02:15:06 +0200 |
commit | 42e6fc147b5a375fe811c64dc5f1cb66d5b0ac49 (patch) | |
tree | ba8cf86fc73f29d5140ef8c90199b05b3d7d6c54 | |
parent | a125f87ac49b18c57a0bedb6ce44329a4aa70cef (diff) | |
download | ffmpeg-42e6fc147b5a375fe811c64dc5f1cb66d5b0ac49.tar.gz |
avcodec/apedec: optimize sign combination
48078630 -> 32533850 dezi cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/apedec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 126b6d7e57..4e25b44e9e 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -913,7 +913,7 @@ static void long_filter_high_3800(int32_t *buffer, int order, int shift, sign = APESIGN(buffer[i]); for (j = 0; j < order; j++) { dotprod += delay[j] * coeffs[j]; - coeffs[j] -= (((delay[j] >> 30) & 2) - 1) * sign; + coeffs[j] += ((delay[j] >> 31) | 1) * sign; } buffer[i] -= dotprod >> shift; for (j = 0; j < order - 1; j++) @@ -933,7 +933,7 @@ static void long_filter_ehigh_3830(int32_t *buffer, int length) sign = APESIGN(buffer[i]); for (j = 7; j >= 0; j--) { dotprod += delay[j] * coeffs[j]; - coeffs[j] -= (((delay[j] >> 30) & 2) - 1) * sign; + coeffs[j] += ((delay[j] >> 31) | 1) * sign; } for (j = 7; j > 0; j--) delay[j] = delay[j - 1]; |