Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / libavfilter / x86 / vf_interlace.asm
CommitLineData
f6fa7814
DM
1;*****************************************************************************
2;* x86-optimized functions for interlace filter
3;*
4;* Copyright (C) 2014 Kieran Kunhya <kierank@obe.tv>
5;* Copyright (c) 2014 Michael Niedermayer <michaelni@gmx.at>
6;*
7;* This file is part of FFmpeg.
8;*
9;* FFmpeg is free software; you can redistribute it and/or modify
10;* it under the terms of the GNU General Public License as published by
11;* the Free Software Foundation; either version 2 of the License, or
12;* (at your option) any later version.
13;*
14;* FFmpeg is distributed in the hope that it will be useful,
15;* but WITHOUT ANY WARRANTY; without even the implied warranty of
16;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;* GNU General Public License for more details.
18;*
19;* You should have received a copy of the GNU General Public License along
20;* with FFmpeg; if not, write to the Free Software Foundation, Inc.,
21;* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22;******************************************************************************
23
24%include "libavutil/x86/x86util.asm"
25
26SECTION_RODATA
27
28SECTION .text
29
30%macro LOWPASS_LINE 0
31cglobal lowpass_line, 5, 5, 7
32 add r0, r1
33 add r2, r1
34 add r3, r1
35 add r4, r1
36 neg r1
37
38 pcmpeqb m6, m6
39
40.loop
41 mova m0, [r3+r1]
42 mova m1, [r3+r1+mmsize]
43 pavgb m0, [r4+r1]
44 pavgb m1, [r4+r1+mmsize]
45 pxor m0, m6
46 pxor m1, m6
47 pxor m2, m6, [r2+r1]
48 pxor m3, m6, [r2+r1+mmsize]
49 pavgb m0, m2
50 pavgb m1, m3
51 pxor m0, m6
52 pxor m1, m6
53 mova [r0+r1], m0
54 mova [r0+r1+mmsize], m1
55
56 add r1, 2*mmsize
57 jl .loop
58REP_RET
59%endmacro
60
61INIT_XMM sse2
62LOWPASS_LINE
63
64INIT_XMM avx
65LOWPASS_LINE