From 05577aafaa75e255a140cd8454fd7c8cffa67965 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 11 Jan 2012 20:42:23 +0100 Subject: [PATCH] sws: yuv2rgb asm, add memory clobber. This fixes dithering for rgb555le, it appears gcc had moved the setup of the variables after the asm or something like that. Signed-off-by: Michael Niedermayer --- libswscale/x86/yuv2rgb_template.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c index 926e3fb9c4..624de14252 100644 --- a/libswscale/x86/yuv2rgb_template.c +++ b/libswscale/x86/yuv2rgb_template.c @@ -138,6 +138,7 @@ : "+r" (index), "+r" (image) \ : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \ "r" (py - 2*index) \ + : "memory" \ ); \ } \ @@ -145,6 +146,7 @@ : "+r" (index), "+r" (image) \ : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), \ "r" (py - 2*index), "r" (pa - 2*index) \ + : "memory" \ ); \ } \