diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c
index 8910ac986fe0813cb664158a534f1fe95baf8c15..b378a4556ead39de68e653c3196014cc0786466a 100644
--- a/libavcodec/ppc/h264_altivec.c
+++ b/libavcodec/ppc/h264_altivec.c
@@ -717,7 +717,7 @@ static inline vector unsigned char diff_lt_altivec ( register vector unsigned ch
     register vector unsigned char diff = vec_subs(x, y);
     register vector unsigned char diffneg = vec_subs(y, x);
     register vector unsigned char o = vec_or(diff, diffneg); /* |x-y| */
-    o = vec_cmplt(o, a);
+    o = (vector unsigned char)vec_cmplt(o, a);
     return o;
 }