1 ;******************************************************************************
4 ;* This file is part of FFmpeg.
6 ;* FFmpeg is free software; you can redistribute it and/or
7 ;* modify it under the terms of the GNU Lesser General Public
8 ;* License as published by the Free Software Foundation; either
9 ;* version 2.1 of the License, or (at your option) any later version.
11 ;* FFmpeg is distributed in the hope that it will be useful,
12 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;* Lesser General Public License for more details.
16 ;* You should have received a copy of the GNU Lesser General Public
17 ;* License along with FFmpeg; if not, write to the Free Software
18 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 ;******************************************************************************
21 %include "libavutil/x86/x86util.asm"
29 cglobal opus_deemphasis
, 4, 4, 8, out, in, weights
, len
31 cglobal opus_deemphasis
, 5, 5, 8, out, in, coeff
, weights
, len
34 VBROADCASTSS m0
, coeffm
43 shufps m6
, m4
, m4
, q1111
44 shufps m7
, m4
, m4
, q2222
47 movaps m1
, [inq
] ; x0, x1, x2, x3
49 pslldq m2
, m1
, 4 ; 0, x0, x1, x2
50 pslldq m3
, m1
, 8 ; 0, 0, x0, x1
52 fmaddps m2
, m2
, m5
, m1
; x + c1*x[0-2]
53 pslldq m1
, 12 ; 0, 0, 0, x0
55 fmaddps m2
, m3
, m6
, m2
; x + c1*x[0-2] + c2*x[0-1]
56 fmaddps m1
, m1
, m7
, m2
; x + c1*x[0-2] + c2*x[0-1] + c3*x[0]
57 fmaddps m0
, m0
, m4
, m1
; x + c1*x[0-2] + c2*x[0-1] + c3*x[0] + c*s
60 shufps m0
, m0
, q3333
; new state
75 cglobal opus_postfilter
, 4, 4, 8, data
, period
, gains
, len
76 VBROADCASTSS m0
, [gainsq
+ 0]
77 VBROADCASTSS m1
, [gainsq
+ 4]
78 VBROADCASTSS m2
, [gainsq
+ 8]
84 movups m3
, [dataq
+ periodq
]
88 movups m4
, [dataq
+ periodq
+ 4]
89 movups m5
, [dataq
+ periodq
+ 8]
90 movups m6
, [dataq
+ periodq
+ 12]
91 movups m7
, [dataq
+ periodq
+ 16]
93 fmaddps m3
, m7
, m2
, m3
96 fmaddps m5
, m5
, m0
, [dataq
]
97 fmaddps m6
, m6
, m1
, m3
105 sub lend
, mmsize
>> 2