From f2081838c41d10da29f4872f9baa07f0a9b29232 Mon Sep 17 00:00:00 2001
From: "Ronald S. Bultje" <rsbultje@gmail.com>
Date: Sat, 4 Feb 2012 10:27:45 +0100
Subject: [PATCH 4/4] swscale: sign-extend integer function argument to qword
 on x86-64.

---
 libswscale/x86/output.asm |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
index 8a72d55..ac0a81b 100644
--- a/libswscale/x86/output.asm
+++ b/libswscale/x86/output.asm
@@ -67,6 +67,9 @@ SECTION .text
 %endif
 
 cglobal yuv2planeX_%1, %3, 7, %2
+%if ARCH_X86_64
+    movsxd          r4, r4d
+%endif ; x86-64
 %if %1 == 8 || %1 == 9 || %1 == 10
     pxor            m6,  m6
 %endif ; %1 == 8/9/10
@@ -317,6 +320,9 @@ yuv2planeX_fn 10,  7, 5
 
 %macro yuv2plane1_fn 3
 cglobal yuv2plane1_%1, %3, %3, %2, src, dst, dstw, dither, offset
+%if ARCH_X86_64
+    movsxd       dstwq, dstwd
+%endif ; x86-64
     add          dstwq, mmsize - 1
     and          dstwq, ~(mmsize - 1)
 %if %1 == 8
-- 
1.7.5.4

