diff --git a/postproc/swscale_altivec_template.c b/postproc/swscale_altivec_template.c
index f5c7b965f68eea0cec889b7819727a4fb3c65eb9..93ae41fcdffccf4133c177043bbc9fa57b9155d7 100644
--- a/postproc/swscale_altivec_template.c
+++ b/postproc/swscale_altivec_template.c
@@ -400,6 +400,11 @@ static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int
   const int vertLumPerChroma = 2;  
   register unsigned int y;
 
+  if(width&15){
+    yv12toyuy2( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
+    return srcSliceH;
+  }
+
   /* this code assume:
 
   1) dst is 16 bytes-aligned
@@ -474,6 +479,11 @@ static inline int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int
   const vector unsigned char yperm = vec_lvsl(0, ysrc);
   register unsigned int y;
 
+  if(width&15){
+    yv12touyvy( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
+    return srcSliceH;
+  }
+
   /* this code assume:
 
   1) dst is 16 bytes-aligned