changeset 29372:04506b0477af

20% faster hqdn3d on x86_64
author lorenm
date Tue, 07 Jul 2009 02:49:26 +0000
parents 3fa15eca924e
children c2c83f344012
files libmpcodecs/vf_hqdn3d.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_hqdn3d.c	Tue Jul 07 02:01:36 2009 +0000
+++ b/libmpcodecs/vf_hqdn3d.c	Tue Jul 07 02:49:26 2009 +0000
@@ -64,7 +64,7 @@
 static inline unsigned int LowPassMul(unsigned int PrevMul, unsigned int CurrMul, int* Coef){
 //    int dMul= (PrevMul&0xFFFFFF)-(CurrMul&0xFFFFFF);
     int dMul= PrevMul-CurrMul;
-    int d=((dMul+0x10007FF)>>12);
+    unsigned int d=((dMul+0x10007FF)>>12);
     return CurrMul + Coef[d];
 }
 
@@ -75,7 +75,7 @@
                     int W, int H, int sStride, int dStride,
                     int *Temporal)
 {
-    int X, Y;
+    long X, Y;
     unsigned int PixelDst;
 
     for (Y = 0; Y < H; Y++){
@@ -97,8 +97,8 @@
                     int W, int H, int sStride, int dStride,
                     int *Horizontal, int *Vertical)
 {
-    int X, Y;
-    int sLineOffs = 0, dLineOffs = 0;
+    long X, Y;
+    long sLineOffs = 0, dLineOffs = 0;
     unsigned int PixelAnt;
     unsigned int PixelDst;
 
@@ -137,8 +137,8 @@
                     int W, int H, int sStride, int dStride,
                     int *Horizontal, int *Vertical, int *Temporal)
 {
-    int X, Y;
-    int sLineOffs = 0, dLineOffs = 0;
+    long X, Y;
+    long sLineOffs = 0, dLineOffs = 0;
     unsigned int PixelAnt;
     unsigned int PixelDst;
     unsigned short* FrameAnt=(*FrameAntPtr);