Mercurial > libavcodec.hg
changeset 7275:c5bcb9e4c5b2 libavcodec
Revert r14218. FFMAX is a macro, so
sum = FFMAX(1, scalar_product(...));
might calculate the scalar product twice, which is slower.
author | vitor |
---|---|
date | Mon, 14 Jul 2008 14:41:01 +0000 |
parents | 25914f8a9bb3 |
children | 6163e7de8604 |
files | ra288.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ra288.c Sun Jul 13 23:34:29 2008 +0000 +++ b/ra288.c Mon Jul 14 14:41:01 2008 +0000 @@ -69,7 +69,9 @@ for (x=0; x < 5; x++) buffer[x] = codetable[cb_coef][x] * sumsum; - sum = FFMAX(1, scalar_product_float(buffer, buffer, 5) / 5); + sum = scalar_product_float(buffer, buffer, 5) / 5; + + sum = FFMAX(sum, 1); /* shift and store */ memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist));