summaryrefslogtreecommitdiffstats
path: root/libavfilter/x86/vf_blend.asm
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-06-27 12:27:10 -0300
committerJames Almer <jamrial@gmail.com>2017-06-27 13:17:23 -0300
commitfa50d9360ba36ba2ee8f85f2c59e8d6af20e833a (patch)
treeb9dd29169dcb75acda73773e025d286781a0f46e /libavfilter/x86/vf_blend.asm
parentd14179e3d49eb0f2533db16151e01abb0018b165 (diff)
downloadffmpeg-streaming-fa50d9360ba36ba2ee8f85f2c59e8d6af20e833a.zip
ffmpeg-streaming-fa50d9360ba36ba2ee8f85f2c59e8d6af20e833a.tar.gz
x86/vf_blend: add sse and ssse3 extremity functions
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/x86/vf_blend.asm')
-rw-r--r--libavfilter/x86/vf_blend.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm
index 33b1ad1..25f6f5a 100644
--- a/libavfilter/x86/vf_blend.asm
+++ b/libavfilter/x86/vf_blend.asm
@@ -286,6 +286,31 @@ BLEND_INIT difference, 3
jl .loop
BLEND_END
+BLEND_INIT extremity, 8
+ pxor m2, m2
+ mova m4, [pw_255]
+.nextrow:
+ mov xq, widthq
+
+ .loop:
+ movu m0, [topq + xq]
+ movu m1, [bottomq + xq]
+ punpckhbw m5, m0, m2
+ punpcklbw m0, m2
+ punpckhbw m6, m1, m2
+ punpcklbw m1, m2
+ psubw m3, m4, m0
+ psubw m7, m4, m5
+ psubw m3, m1
+ psubw m7, m6
+ ABS1 m3, m1
+ ABS1 m7, m6
+ packuswb m3, m7
+ mova [dstq + xq], m3
+ add xq, mmsize
+ jl .loop
+BLEND_END
+
BLEND_INIT negation, 5
pxor m2, m2
mova m4, [pw_255]
OpenPOWER on IntegriCloud