From 64f1bd2b11115a9f11f19c46ae77a90e7b79ff9c Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh@chollian.net>
Date: Wed, 2 Nov 2011 17:59:31 +0900
Subject: [PATCH 2/2] Fix for NASM compilation.

NASM does not like that %rep and %endrep are placed in %if...%endif block.
---
 libswscale/x86/scale.asm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
index 5f831aa..27518d2 100644
--- a/libswscale/x86/scale.asm
+++ b/libswscale/x86/scale.asm
@@ -533,9 +533,13 @@ cglobal yuv2planeX_%2_%1, %4, 7, %3
     ; pixels per iteration. In order to not have to keep track of where
     ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
 %if %2 == 8
-%rep 16/mmsize
+%define loop_count (16/mmsize)
+%else
+%define loop_count 1
 %endif ; %2 == 8
 
+%rep loop_count
+
 %if %2 == 8
 %ifdef ARCH_X86_32
     mova            m2, [rsp+mmsize*(0+%%i)]
@@ -632,8 +636,8 @@ cglobal yuv2planeX_%2_%1, %4, 7, %3
     sub             r4d, mmsize/2
 %if %2 == 8
 %assign %%i %%i+2
-%endrep
 %endif ; %2 == 8
+%endrep
     jg .pixelloop
 
 %if %2 == 8
-- 
1.7.3.2
