1 ;******************************************************************************
2 ;* MMX-optimized H.263 loop filter
4 ;* This file is part of Libav.
6 ;* Libav 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 ;* Libav 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 Libav; 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"
25 cextern h263_loop_filter_strength
29 %macro H263_LOOP_FILTER
5
102 ; void ff_h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale)
103 cglobal h263_v_loop_filter
, 3,5
107 lea r4
, [h263_loop_filter_strength
]
108 movzx r3d
, BYTE [r4
+r2
]
116 H263_LOOP_FILTER r4
, r3
, r0
, r0
+r1
, r2d
124 %macro TRANSPOSE4X4
2
143 ; void ff_h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale)
145 cglobal h263_h_loop_filter
, 3,5,0,32
149 lea r4
, [h263_loop_filter_strength
]
150 movzx r3d
, BYTE [r4
+r2
]
159 TRANSPOSE4X4 r4
, rsp
+4
161 H263_LOOP_FILTER rsp
, rsp
+8, rsp
+16, rsp
+24, r2d