[FFmpeg-devel] [PATCH] sws: yuv2rgb asm, add memory clobber.

Michael Niedermayer michaelni at gmx.at
Wed Jan 11 20:53:04 CET 2012


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 <michaelni at gmx.at>
---
 libswscale/x86/yuv2rgb_template.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c
index 926e3fb..624de14 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"                                                \
         );                                                        \
     }                                                             \
 
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list