annotate x86/h264_weight_sse2.asm @ 12404:86f5aff0f8e8 libavcodec

removed an unnecessary blank line
author bindhammer
date Mon, 23 Aug 2010 13:19:48 +0000
parents 06bdd447f4f7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12367
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
1 ;*****************************************************************************
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
2 ;* SSE2-optimized weighted prediction code
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
3 ;*****************************************************************************
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
4 ;* Copyright (c) 2004-2005 Michael Niedermayer, Loren Merritt
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
5 ;* Copyright (C) 2010 Eli Friedman <eli.friedman@gmail.com>
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
6 ;*
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
7 ;* This file is part of FFmpeg.
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
8 ;*
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
9 ;* FFmpeg is free software; you can redistribute it and/or
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
10 ;* modify it under the terms of the GNU Lesser General Public
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
11 ;* License as published by the Free Software Foundation; either
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
12 ;* version 2.1 of the License, or (at your option) any later version.
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
13 ;*
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
14 ;* FFmpeg is distributed in the hope that it will be useful,
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
15 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
16 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
17 ;* Lesser General Public License for more details.
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
18 ;*
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
19 ;* You should have received a copy of the GNU Lesser General Public
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
20 ;* License along with FFmpeg; if not, write to the Free Software
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
21 ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
22 ;******************************************************************************
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
23
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
24 %include "x86inc.asm"
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
25
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
26 SECTION .text
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
27 INIT_XMM
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
28
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
29 ;-----------------------------------------------------------------------------
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
30 ; biweight pred:
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
31 ;
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
32 ; void h264_biweight_16x16_sse2(uint8_t *dst, uint8_t *src, int stride,
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
33 ; int log2_denom, int weightd, int weights,
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
34 ; int offset);
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
35 ;-----------------------------------------------------------------------------
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
36
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
37 %macro BIWEIGHT_SSE2_SETUP 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
38 add r6, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
39 or r6, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
40 add r3, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
41 movd m3, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
42 movd m4, r5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
43 movd m5, r6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
44 movd m6, r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
45 pslld m5, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
46 psrld m5, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
47 pshuflw m3, m3, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
48 pshuflw m4, m4, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
49 pshuflw m5, m5, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
50 punpcklqdq m3, m3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
51 punpcklqdq m4, m4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
52 punpcklqdq m5, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
53 pxor m7, m7
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
54 %endmacro
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
55
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
56 %macro BIWEIGHT_SSE2_STEPA 3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
57 movh m%1, [r0+%3]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
58 movh m%2, [r1+%3]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
59 punpcklbw m%1, m7
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
60 punpcklbw m%2, m7
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
61 pmullw m%1, m3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
62 pmullw m%2, m4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
63 paddsw m%1, m%2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
64 %endmacro
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
65
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
66 %macro BIWEIGHT_SSE2_STEPB 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
67 paddsw m0, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
68 paddsw m1, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
69 psraw m0, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
70 psraw m1, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
71 packuswb m0, m1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
72 %endmacro
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
73
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
74 cglobal h264_biweight_16x16_sse2, 7, 7, 8
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
75 BIWEIGHT_SSE2_SETUP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
76 mov r3, 16
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
77
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
78 .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
79 BIWEIGHT_SSE2_STEPA 0, 1, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
80 BIWEIGHT_SSE2_STEPA 1, 2, 8
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
81 BIWEIGHT_SSE2_STEPB
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
82 mova [r0], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
83 add r0, r2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
84 add r1, r2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
85 dec r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
86 jnz .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
87 REP_RET
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
88
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
89 cglobal h264_biweight_8x8_sse2, 7, 7, 8
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
90 BIWEIGHT_SSE2_SETUP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
91 mov r3, 4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
92 lea r4, [r2*2]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
93
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
94 .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
95 BIWEIGHT_SSE2_STEPA 0, 1, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
96 BIWEIGHT_SSE2_STEPA 1, 2, r2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
97 BIWEIGHT_SSE2_STEPB
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
98 movh [r0], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
99 movhps [r0+r2], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
100 add r0, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
101 add r1, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
102 dec r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
103 jnz .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
104 REP_RET
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
105
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
106 %macro BIWEIGHT_SSSE3_SETUP 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
107 add r6, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
108 or r6, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
109 add r3, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
110 movd m4, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
111 movd m0, r5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
112 movd m5, r6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
113 movd m6, r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
114 pslld m5, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
115 psrld m5, 1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
116 punpcklbw m4, m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
117 pshuflw m4, m4, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
118 pshuflw m5, m5, 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
119 punpcklqdq m4, m4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
120 punpcklqdq m5, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
121 %endmacro
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
122
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
123 %macro BIWEIGHT_SSSE3_OP 0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
124 pmaddubsw m0, m4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
125 pmaddubsw m2, m4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
126 paddsw m0, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
127 paddsw m2, m5
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
128 psraw m0, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
129 psraw m2, m6
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
130 packuswb m0, m2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
131 %endmacro
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
132
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
133 cglobal h264_biweight_16x16_ssse3, 7, 7, 8
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
134 BIWEIGHT_SSSE3_SETUP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
135 mov r3, 16
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
136
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
137 .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
138 movh m0, [r0]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
139 movh m2, [r0+8]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
140 movh m3, [r1+8]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
141 punpcklbw m0, [r1]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
142 punpcklbw m2, m3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
143 BIWEIGHT_SSSE3_OP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
144 mova [r0], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
145 add r0, r2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
146 add r1, r2
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
147 dec r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
148 jnz .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
149 REP_RET
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
150
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
151 cglobal h264_biweight_8x8_ssse3, 7, 7, 8
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
152 BIWEIGHT_SSSE3_SETUP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
153 mov r3, 4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
154 lea r4, [r2*2]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
155
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
156 .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
157 movh m0, [r0]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
158 movh m1, [r1]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
159 movh m2, [r0+r2]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
160 movh m3, [r1+r2]
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
161 punpcklbw m0, m1
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
162 punpcklbw m2, m3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
163 BIWEIGHT_SSSE3_OP
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
164 movh [r0], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
165 movhps [r0+r2], m0
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
166 add r0, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
167 add r1, r4
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
168 dec r3
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
169 jnz .nextrow
06bdd447f4f7 Add file missing in r24702
darkshikari
parents:
diff changeset
170 REP_RET