Mercurial > libavcodec.hg
diff msmpeg4.c @ 214:73df666cacc7 libavcodec
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
author | nickols_k |
---|---|
date | Sun, 20 Jan 2002 14:48:02 +0000 |
parents | 2eb04d6be309 |
children | fe243b4aec02 |
line wrap: on
line diff
--- a/msmpeg4.c Sun Jan 20 14:30:34 2002 +0000 +++ b/msmpeg4.c Sun Jan 20 14:48:02 2002 +0000 @@ -460,7 +460,19 @@ : "r" (scale) : "%eax", "%edx" ); -#else +#elif defined (ARCH_ALPHA) + /* Divisions are extremely costly on Alpha; optimize the most + common case. */ + if (scale == 8) { + a = (a + (8 >> 1)) / 8; + b = (b + (8 >> 1)) / 8; + c = (c + (8 >> 1)) / 8; + } else { + a = (a + (scale >> 1)) / scale; + b = (b + (scale >> 1)) / scale; + c = (c + (scale >> 1)) / scale; + } +#else a = (a + (scale >> 1)) / scale; b = (b + (scale >> 1)) / scale; c = (c + (scale >> 1)) / scale;