1 ;******************************************************************************
2 ;* MMX-optimized H.263 loop filter
3 ;* Copyright (c) 2003-2013 Michael Niedermayer
4 ;* Copyright (c) 2013 Daniel Kang
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 cextern h263_loop_filter_strength
31 %macro H263_LOOP_FILTER
5
104 ; void ff_h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale)
105 cglobal h263_v_loop_filter
, 3,5
109 lea r4
, [h263_loop_filter_strength
]
110 movzx r3d
, BYTE [r4
+r2
]
118 H263_LOOP_FILTER r4
, r3
, r0
, r0
+r1
, r2d
126 %macro TRANSPOSE4X4
2
145 ; void ff_h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale)
147 cglobal h263_h_loop_filter
, 3,5,0,32
151 lea r4
, [h263_loop_filter_strength
]
152 movzx r3d
, BYTE [r4
+r2
]
161 TRANSPOSE4X4 r4
, rsp
+4
163 H263_LOOP_FILTER rsp
, rsp
+8, rsp
+16, rsp
+24, r2d