On 30/10/14 01:51, Vittorio Giovara wrote:
From: Michael Niedermayer <[email protected]>

Bug-Id: CID 700556 / CID 700557 / CID700558
---
  libavcodec/x86/me_cmp_init.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c
index e93b67b..e871335 100644
--- a/libavcodec/x86/me_cmp_init.c
+++ b/libavcodec/x86/me_cmp_init.c
@@ -807,7 +807,7 @@ DECLARE_ASM_CONST(8, uint64_t, bone) = 0x0101010101010101LL;

  static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
  {
-    x86_reg len = -(stride * h);
+    x86_reg len = -(x86_reg)stride * h;
      __asm__ volatile (
          ".p2align 4                     \n\t"
          "1:                             \n\t"
@@ -966,7 +966,7 @@ static inline void sad8_4_mmxext(uint8_t *blk1, uint8_t 
*blk2,
  static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2,
                                int stride, int h)
  {
-    x86_reg len = -(stride * h);
+    x86_reg len = -(x86_reg)stride * h;
      __asm__ volatile (
          ".p2align 4                     \n\t"
          "1:                             \n\t"
@@ -1004,7 +1004,7 @@ static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t 
*blk1b, uint8_t *blk2,

  static inline void sad8_4_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
  {
-    x86_reg len = -(stride * h);
+    x86_reg len = -(x86_reg)stride * h;
      __asm__ volatile (
          "movq  (%1, %%"REG_a"), %%mm0   \n\t"
          "movq 1(%1, %%"REG_a"), %%mm2   \n\t"


stride should be ptrdiff_t like in the other places.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to