From: Michael Niedermayer <michae...@gmx.at>

This avoids potential issues with the high 32bits being random in x86-64 asm

Signed-off-by: Michael Niedermayer <michae...@gmx.at>
Signed-off-by: Janne Grunau <janne-li...@jannau.net>
---
 libavcodec/huffyuvdsp.h          |  4 ++--
 libavcodec/huffyuvdsp.c          |  4 ++--
 libavcodec/x86/huffyuvdsp_init.c | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/huffyuvdsp.h b/libavcodec/huffyuvdsp.h
index bf3005e..740c897 100644
--- a/libavcodec/huffyuvdsp.h
+++ b/libavcodec/huffyuvdsp.h
@@ -25,10 +25,10 @@ typedef struct HuffYUVDSPContext {
     void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
                       intptr_t w);
     void (*add_hfyu_median_pred)(uint8_t *dst, const uint8_t *top,
-                                 const uint8_t *diff, int w,
+                                 const uint8_t *diff, intptr_t w,
                                  int *left, int *left_top);
     int (*add_hfyu_left_pred)(uint8_t *dst, const uint8_t *src,
-                              int w, int left);
+                              intptr_t w, int left);
     void (*add_hfyu_left_pred_bgr32)(uint8_t *dst, const uint8_t *src,
                                      int w, int *red, int *green,
                                      int *blue, int *alpha);
diff --git a/libavcodec/huffyuvdsp.c b/libavcodec/huffyuvdsp.c
index b21e71e..8faeda4 100644
--- a/libavcodec/huffyuvdsp.c
+++ b/libavcodec/huffyuvdsp.c
@@ -41,7 +41,7 @@ static void add_bytes_c(uint8_t *dst, uint8_t *src, intptr_t 
w)
 }
 
 static void add_hfyu_median_pred_c(uint8_t *dst, const uint8_t *src1,
-                                   const uint8_t *diff, int w,
+                                   const uint8_t *diff, intptr_t w,
                                    int *left, int *left_top)
 {
     int i;
@@ -60,7 +60,7 @@ static void add_hfyu_median_pred_c(uint8_t *dst, const 
uint8_t *src1,
     *left_top = lt;
 }
 
-static int add_hfyu_left_pred_c(uint8_t *dst, const uint8_t *src, int w,
+static int add_hfyu_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w,
                                 int acc)
 {
     int i;
diff --git a/libavcodec/x86/huffyuvdsp_init.c b/libavcodec/x86/huffyuvdsp_init.c
index f1d794b..d045da7 100644
--- a/libavcodec/x86/huffyuvdsp_init.c
+++ b/libavcodec/x86/huffyuvdsp_init.c
@@ -29,20 +29,20 @@ void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, intptr_t 
w);
 void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, intptr_t w);
 
 void ff_add_hfyu_median_pred_mmxext(uint8_t *dst, const uint8_t *top,
-                                    const uint8_t *diff, int w,
+                                    const uint8_t *diff, intptr_t w,
                                     int *left, int *left_top);
 void ff_add_hfyu_median_pred_sse2(uint8_t *dst, const uint8_t *top,
-                                  const uint8_t *diff, int w,
+                                  const uint8_t *diff, intptr_t w,
                                   int *left, int *left_top);
 
 int  ff_add_hfyu_left_pred_ssse3(uint8_t *dst, const uint8_t *src,
-                                 int w, int left);
+                                 intptr_t w, int left);
 int  ff_add_hfyu_left_pred_unaligned_ssse3(uint8_t *dst, const uint8_t *src,
-                                           int w, int left);
+                                           intptr_t w, int left);
 
 #if HAVE_INLINE_ASM && HAVE_7REGS
 static void add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top,
-                                      const uint8_t *diff, int w,
+                                      const uint8_t *diff, intptr_t w,
                                       int *left, int *left_top)
 {
     x86_reg w2 = -w;
-- 
2.10.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to