[FFmpeg-cvslog] avfilter/x86/vf_blend.asm: hardmix: do same with two pxor instructions less

Paul B Mahol git at videolan.org
Wed Oct 7 23:14:54 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Oct  7 23:12:09 2015 +0200| [624a1a0e690e97ff47de76ab1084b98ae7d93e56] | committer: Paul B Mahol

avfilter/x86/vf_blend.asm: hardmix: do same with two pxor instructions less

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=624a1a0e690e97ff47de76ab1084b98ae7d93e56
---

 libavfilter/x86/vf_blend.asm |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm
index 97327c6..f0fb2ea 100644
--- a/libavfilter/x86/vf_blend.asm
+++ b/libavfilter/x86/vf_blend.asm
@@ -27,6 +27,7 @@ SECTION_RODATA
 
 pw_128: times 8 dw 128
 pw_255: times 8 dw 255
+pb_127: times 16 db 127
 pb_128: times 16 db 128
 pb_255: times 16 db 255
 
@@ -275,13 +276,14 @@ cglobal blend_darken, 9, 11, 2, 0, top, top_linesize, bottom, bottom_linesize, d
     jg .nextrow
 REP_RET
 
-cglobal blend_hardmix, 9, 11, 4, 0, top, top_linesize, bottom, bottom_linesize, dst, dst_linesize, width, start, end
+cglobal blend_hardmix, 9, 11, 5, 0, top, top_linesize, bottom, bottom_linesize, dst, dst_linesize, width, start, end
     add      topq, widthq
     add   bottomq, widthq
     add      dstq, widthq
     sub      endq, startq
     mova       m2, [pb_255]
     mova       m3, [pb_128]
+    mova       m4, [pb_127]
     neg    widthq
 .nextrow:
     mov       r10q, widthq
@@ -290,9 +292,8 @@ cglobal blend_hardmix, 9, 11, 4, 0, top, top_linesize, bottom, bottom_linesize,
     .loop:
         movu            m0, [topq + x]
         movu            m1, [bottomq + x]
-        pxor            m1, m2
+        pxor            m1, m4
         pxor            m0, m3
-        pxor            m1, m3
         pcmpgtb         m1, m0
         pxor            m1, m2
         mova    [dstq + x], m1



More information about the ffmpeg-cvslog mailing list