1 ;*****************************************************************************
2 ;* x86-optimized functions for interlace filter
4 ;* Copyright (C) 2014 Kieran Kunhya <kierank@obe.tv>
5 ;* Copyright (c) 2014 Michael Niedermayer <michaelni@gmx.at>
6 ;* Copyright (c) 2017 Thomas Mundt <tmundt75@gmail.com>
8 ;* This file is part of FFmpeg.
10 ;* FFmpeg is free software; you can redistribute it and/or modify
11 ;* it under the terms of the GNU General Public License as published by
12 ;* the Free Software Foundation; either version 2 of the License, or
13 ;* (at your option) any later version.
15 ;* FFmpeg is distributed in the hope that it will be useful,
16 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;* GNU General Public License for more details.
20 ;* You should have received a copy of the GNU General Public License along
21 ;* with FFmpeg; if not, write to the Free Software Foundation, Inc.,
22 ;* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 ;******************************************************************************
25 %include "libavutil/x86/x86util.asm"
44 mova m1, [mrefq+hq+mmsize]
46 pavg%1 m1, [prefq+hq+mmsize]
49 pxor m2, m6, [srcq+hq]
50 pxor m3, m6, [srcq+hq+mmsize]
56 mova [dstq+hq+mmsize], m1
64 cglobal lowpass_line, 5, 5, 7, dst, h, src, mref, pref
67 cglobal lowpass_line_16, 5, 5, 7, dst, h, src, mref, pref
72 %macro LOWPASS_LINE_COMPLEX 0
73 cglobal lowpass_line_complex, 5, 5, 8, dst, h, src, mref, pref
103 mova m2, [srcq+mrefq*2]
104 mova m4, [srcq+prefq*2]
134 cglobal lowpass_line_complex_12, 5, 5, 8, 16, dst, h, src, mref, pref, clip_max
135 movd m7, DWORD clip_maxm
139 mova m0, [srcq+mrefq]
140 mova m1, [srcq+mrefq+mmsize]
141 mova m2, [srcq+prefq]
142 mova m3, [srcq+prefq+mmsize]
148 mova m3, [srcq+mmsize]
159 mova m2, [srcq+2*mrefq]
160 mova m3, [srcq+2*mrefq+mmsize]
161 mova m4, [srcq+2*prefq]
162 mova m5, [srcq+2*prefq+mmsize]
176 pmaxsw m1, [srcq+mmsize]
178 pminsw m3, [srcq+mmsize]
186 mova [dstq+mmsize], m1