1 ;*****************************************************************************
2 ;* x86-optimized functions for interlace filter
4 ;* Copyright (C) 2015 Ronald S. Bultje <rsbultje@gmail.com>
6 ;* This file is part of FFmpeg.
8 ;* FFmpeg is free software; you can redistribute it and/or
9 ;* modify it under the terms of the GNU Lesser General Public
10 ;* License as published by the Free Software Foundation; either
11 ;* version 2.1 of the License, or (at your option) any later version.
13 ;* FFmpeg is distributed in the hope that it will be useful,
14 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;* Lesser General Public License for more details.
18 ;* You should have received a copy of the GNU Lesser General Public
19 ;* License along with FFmpeg; if not, write to the Free Software
20 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 ;******************************************************************************
23 %include "libavutil/x86/x86util.asm"
27 %macro SSE_LINE_FN 2 ; 8 or 16, byte or word
31 cglobal sse_line_%1 %+ bit, 0, 6, 8, res, buf, w, px1, px2, ref
33 cglobal sse_line_%1 %+ bit, 0, 7, 8, res, buf, reshigh, w, px1, px2, ref
39 cglobal sse_line_%1 %+ bit, 3, 5, 8, buf, ref, w, px1, px2
47 movu m0, [bufq+mmsize*0]
48 movu m1, [bufq+mmsize*1]
49 movu m2, [refq+mmsize*0]
50 movu m3, [refq+mmsize*1]
67 movu m2, [bufq+mmsize*2]
68 movu m3, [bufq+mmsize*3]
69 movu m4, [refq+mmsize*2]
70 movu m5, [refq+mmsize*3]
114 ; deal with cases where w % 32 != 0
118 movzx px1d, %2 [bufq+wq*(%1/8)-(%1/8)]
119 movzx px2d, %2 [refq+wq*(%1/8)-(%1/8)]
134 ; for %1=8, no need to zero edx on x86-32, since edx=wd, which is zero