diff options
Diffstat (limited to 'libavfilter/x86/vf_yadif.asm')
-rw-r--r-- | libavfilter/x86/vf_yadif.asm | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/libavfilter/x86/vf_yadif.asm b/libavfilter/x86/vf_yadif.asm index 3d8b2bc..a29620c 100644 --- a/libavfilter/x86/vf_yadif.asm +++ b/libavfilter/x86/vf_yadif.asm @@ -4,20 +4,20 @@ ;* Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at> ;* Copyright (c) 2013 Daniel Kang <daniel.d.kang@gmail.com> ;* -;* This file is part of Libav. +;* This file is part of FFmpeg. ;* -;* Libav is free software; you can redistribute it and/or +;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* -;* Libav is distributed in the hope that it will be useful, +;* FFmpeg is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public -;* License along with Libav; if not, write to the Free Software +;* License along with FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** @@ -39,11 +39,7 @@ SECTION .text pavgb m5, m3 pand m4, [pb_1] psubusb m5, m4 -%if mmsize == 16 - psrldq m5, 1 -%else - psrlq m5, 8 -%endif + RSHIFT m5, 1 punpcklbw m5, m7 mova m4, m2 psubusb m2, m3 @@ -51,13 +47,8 @@ SECTION .text pmaxub m2, m3 mova m3, m2 mova m4, m2 -%if mmsize == 16 - psrldq m3, 1 - psrldq m4, 2 -%else - psrlq m3, 8 - psrlq m4, 16 -%endif + RSHIFT m3, 1 + RSHIFT m4, 2 punpcklbw m2, m7 punpcklbw m3, m7 punpcklbw m4, m7 @@ -90,17 +81,17 @@ SECTION .text %endmacro %macro LOAD 2 - movh m%1, %2 - punpcklbw m%1, m7 + movh %1, %2 + punpcklbw %1, m7 %endmacro %macro FILTER 3 .loop%1: pxor m7, m7 - LOAD 0, [curq+t1] - LOAD 1, [curq+t0] - LOAD 2, [%2] - LOAD 3, [%3] + LOAD m0, [curq+t1] + LOAD m1, [curq+t0] + LOAD m2, [%2] + LOAD m3, [%3] mova m4, m3 paddw m3, m2 psraw m3, 1 @@ -109,8 +100,8 @@ SECTION .text mova [rsp+32], m1 psubw m2, m4 ABS1 m2, m4 - LOAD 3, [prevq+t1] - LOAD 4, [prevq+t0] + LOAD m3, [prevq+t1] + LOAD m4, [prevq+t0] psubw m3, m0 psubw m4, m1 ABS1 m3, m5 @@ -119,8 +110,8 @@ SECTION .text psrlw m2, 1 psrlw m3, 1 pmaxsw m2, m3 - LOAD 3, [nextq+t1] - LOAD 4, [nextq+t0] + LOAD m3, [nextq+t1] + LOAD m4, [nextq+t0] psubw m3, m0 psubw m4, m1 ABS1 m3, m5 @@ -166,10 +157,10 @@ SECTION .text mova m6, [rsp+48] cmp DWORD r8m, 2 jge .end%1 - LOAD 2, [%2+t1*2] - LOAD 4, [%3+t1*2] - LOAD 3, [%2+t0*2] - LOAD 5, [%3+t0*2] + LOAD m2, [%2+t1*2] + LOAD m4, [%3+t1*2] + LOAD m3, [%2+t0*2] + LOAD m5, [%3+t0*2] paddw m2, m4 paddw m3, m5 psrlw m2, 1 @@ -220,8 +211,6 @@ cglobal yadif_filter_line, 4, 6, 8, 80, dst, prev, cur, next, w, prefs, \ cglobal yadif_filter_line, 4, 7, 8, 80, dst, prev, cur, next, w, prefs, \ mrefs, parity, mode %endif - cmp DWORD wm, 0 - jle .ret %if ARCH_X86_32 mov r4, r5mp mov r5, r6mp |