changeset 28521:3bc8263972a3

Make hScale_altivec_real() trim its output like other implementations do
author kostya
date Sat, 14 Feb 2009 16:39:15 +0000
parents 6cdce79a0b9a
children fee39b6b62ea
files libswscale/swscale_altivec_template.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale_altivec_template.c	Sat Feb 14 16:37:39 2009 +0000
+++ b/libswscale/swscale_altivec_template.c	Sat Feb 14 16:39:15 2009 +0000
@@ -220,7 +220,7 @@
             for (j=0; j<filterSize; j++) {
                 val += ((int)src[srcPos + j])*filter[filterSize*i + j];
             }
-            dst[i] = av_clip(val>>7, 0, (1<<15)-1);
+            dst[i] = FFMIN(val>>7, (1<<15)-1);
         }
     }
     else
@@ -259,7 +259,7 @@
         val_vEven = vec_mule(src_v, filter_v);
         val_s = vec_sums(val_vEven, vzero);
         vec_st(val_s, 0, tempo);
-        dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
+        dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
     }
     }
     break;
@@ -286,7 +286,7 @@
         val_v = vec_msums(src_v, filter_v, (vector signed int)vzero);
         val_s = vec_sums(val_v, vzero);
         vec_st(val_s, 0, tempo);
-        dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
+        dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
     }
     }
     break;
@@ -315,7 +315,7 @@
             vector signed int val_s = vec_sums(val_v, vzero);
 
             vec_st(val_s, 0, tempo);
-            dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
+            dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
         }
     }
     break;
@@ -377,7 +377,7 @@
         val_s = vec_sums(val_v, vzero);
 
         vec_st(val_s, 0, tempo);
-        dst[i] = av_clip(tempo[3]>>7, 0, (1<<15)-1);
+        dst[i] = FFMIN(tempo[3]>>7, (1<<15)-1);
     }
 
     }