Hi,<br><br><div><span class="gmail_quote">2007/12/8, Guillaume Poirier <<a href="mailto:gpoirier@mplayerhq.hu">gpoirier@mplayerhq.hu</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>The attached patch adds the AliVec implementation predict_16x16_p().<br><br>Comments, benchmarks and feedbacks are welcome.</blockquote><div><br>please apply the following patch.<br><br>--- a/common/ppc/predict.c
<br>+++ b/common/ppc/predict.c<br>@@ -20,6 +20,10 @@<br> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.<br> *****************************************************************************/<br> <br>
+#ifdef SYS_LINUX<br>+#include <altivec.h><br>+#endif<br>+<br> #include "common/common.h"<br> #include "common/clip1.h"<br> #include "predict.h"<br>@@ -49,13 +53,13 @@ static void predict_16x16_p_altivec( uint8_t *src )
<br> b_u.s[0] = b;<br> c_u.s[0] = c;<br> <br>- vec_s16_t val5_v = vec_splat_s16(5);<br>+ vec_u16_t val5_v = vec_splat_u16(5);<br> vec_s16_t i00_v, b_v, c_v;<br> i00_v = vec_splat(i00_u.v, 0);<br>
b_v = vec_splat(b_u.v, 0);<br> c_v = vec_splat(c_u.v, 0);<br> vec_s16_t induc_v = (vec_s16_t) CV(0, 1, 2, 3, 4, 5, 6, 7);<br>- vec_s16_t b8_v = vec_sl(b_v, vec_splat_s16(3));<br>+ vec_s16_t b8_v = vec_sl(b_v, vec_splat_u16(3));
<br> vec_s32_t mule_b_v = vec_mule(induc_v, b_v);<br> vec_s32_t mulo_b_v = vec_mulo(induc_v, b_v);<br> vec_s16_t mul_b_induc0_v = vec_pack(vec_mergeh(mule_b_v, mulo_b_v), vec_mergel(mule_b_v, mulo_b_v));<br><br>
<br>Noboru Asai<br><br></div></div>