History

rv40dsp x86: MMX/MMX2/3DNow/SSE2/SSSE3 implementations of MC

Code mostly inspired by vp8's MC, however: - its MMX2 horizontal filter is worse because it can't take advantage of the coefficient redundancy - that same coefficient redundancy allows better code for non-SSSE3 versions Benchmark (rounded to tens of unit): V8x8 H8x8 2D8x8 V16x16 H16x16 2D16x16 C 445 358 985 1785 1559 3280 MMX* 219 271 478 714 929 1443 SSE2 131 158 294 425 515 892 SSSE3 120 122 248 387 390 763 End result is overall around a 15% speedup for SSSE3 version (on 6 sequences); all loop filter functions now take around 55% of decoding time, while luma MC dsp functions are around 6%, chroma ones are 1.3% and biweight around 2.3%.

Christophe Gisquet committed 14 years ago

Commit 110d0cd1 parent 706b9984 files · +480 −3Browse files

Unified · Split

4 files
  1. libavcodec/x86/dsputil_mmx.c +16 −0
  2. libavcodec/x86/dsputil_mmx.h +5 −0
  3. libavcodec/x86/rv40dsp.asm +313 −3
  4. libavcodec/x86/rv40dsp_init.c +146 −0
libavcodec/x86/dsputil_mmx.c+16−0
@@ -1791,6 +1791,22 @@ QPEL_2TAP(avg_, 16, 3dnow) · 1790 unmodified lines
1791QPEL_2TAP(put_, 8, 3dnow)1791QPEL_2TAP(put_, 8, 3dnow)
1792QPEL_2TAP(avg_, 8, 3dnow)1792QPEL_2TAP(avg_, 8, 3dnow)
1793 1793
1794void ff_put_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, int stride)
1795{
1796 put_pixels8_xy2_mmx(dst, src, stride, 8);
1797}
1798void ff_put_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, int stride)
1799{
1800 put_pixels16_xy2_mmx(dst, src, stride, 16);
1801}
1802void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, int stride)
1803{
1804 avg_pixels8_xy2_mmx(dst, src, stride, 8);
1805}
1806void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, int stride)
1807{
1808 avg_pixels16_xy2_mmx(dst, src, stride, 16);
1809}
1794 1810
1795#if HAVE_YASM1811#if HAVE_YASM
1796typedef void emu_edge_core_func(uint8_t *buf, const uint8_t *src,1812typedef void emu_edge_core_func(uint8_t *buf, const uint8_t *src,
libavcodec/x86/dsputil_mmx.h+5−0
@@ -199,6 +199,11 @@ void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride); · 198 unmodified lines
199void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);199void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);
200void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);200void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);
201 201
202void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
203void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
204void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
205void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
206
202void ff_mmx_idct(DCTELEM *block);207void ff_mmx_idct(DCTELEM *block);
203void ff_mmxext_idct(DCTELEM *block);208void ff_mmxext_idct(DCTELEM *block);
204 209
libavcodec/x86/rv40dsp.asm+313−3
@@ -1,5 +1,7 @@
1;******************************************************************************1;******************************************************************************
2;* MMX/SSE2-optimized functions for the RV40 decoder2;* MMX/SSE2-optimized functions for the RV40 decoder
3;* Copyright (c) 2010 Ronald S. Bultje <rsbultje@gmail.com>
4;* Copyright (c) 2010 Jason Garrett-Glaser <darkshikari@gmail.com>
3;* Copyright (C) 2012 Christophe Gisquet <christophe.gisquet@gmail.com>5;* Copyright (C) 2012 Christophe Gisquet <christophe.gisquet@gmail.com>
4;*6;*
5;* This file is part of Libav.7;* This file is part of Libav.
@@ -25,11 +27,319 @@ · 19 unmodified lines
25SECTION_RODATA27SECTION_RODATA
26 28
27align 1629align 16
28shift_round: times 8 dw 1 << (16 - 6)30pw_1024: times 8 dw 1 << (16 - 6) ; pw_1024
29cextern pw_1631
32sixtap_filter_hb_m: times 8 db 1, -5
33 times 8 db 52, 20
34 ; multiplied by 2 to have the same shift
35 times 8 db 2, -10
36 times 8 db 40, 40
37 ; back to normal
38 times 8 db 1, -5
39 times 8 db 20, 52
40
41sixtap_filter_v_m: times 8 dw 1
42 times 8 dw -5
43 times 8 dw 52
44 times 8 dw 20
45 ; multiplied by 2 to have the same shift
46 times 8 dw 2
47 times 8 dw -10
48 times 8 dw 40
49 times 8 dw 40
50 ; back to normal
51 times 8 dw 1
52 times 8 dw -5
53 times 8 dw 20
54 times 8 dw 52
55
56%ifdef PIC
57%define sixtap_filter_hw picregq
58%define sixtap_filter_hb picregq
59%define sixtap_filter_v picregq
60%define npicregs 1
61%else
62%define sixtap_filter_hw sixtap_filter_hw_m
63%define sixtap_filter_hb sixtap_filter_hb_m
64%define sixtap_filter_v sixtap_filter_v_m
65%define npicregs 0
66%endif
67
68filter_h6_shuf1: db 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8
69filter_h6_shuf2: db 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10
70filter_h6_shuf3: db 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11
71
72cextern pw_32
73cextern pw_16
74cextern pw_512
30 75
31SECTION .text76SECTION .text
32 77
78;-----------------------------------------------------------------------------
79; subpel MC functions:
80;
81; void [put|rv40]_rv40_qpel_[h|v]_<opt>(uint8_t *dst, int deststride,
82; uint8_t *src, int srcstride,
83; int len, int m);
84;----------------------------------------------------------------------
85%macro LOAD 2
86%if WIN64
87 movsxd %1q, %1d
88%endif
89%ifdef PIC
90 add %1q, picregq
91%else
92 add %1q, %2
93%endif
94%endmacro
95
96%macro STORE 3
97%ifidn %3, avg
98 movh %2, [dstq]
99%endif
100 packuswb %1, %1
101%ifidn %3, avg
102%if cpuflag(3dnow)
103 pavgusb %1, %2
104%else
105 pavgb %1, %2
106%endif
107%endif
108 movh [dstq], %1
109%endmacro
110
111%macro FILTER_V 1
112cglobal %1_rv40_qpel_v, 6,6+npicregs,12, dst, dststride, src, srcstride, height, my, picreg
113%ifdef PIC
114 lea picregq, [sixtap_filter_v_m]
115%endif
116 pxor m7, m7
117 LOAD my, sixtap_filter_v
118
119 ; read 5 lines
120 sub srcq, srcstrideq
121 sub srcq, srcstrideq
122 movh m0, [srcq]
123 movh m1, [srcq+srcstrideq]
124 movh m2, [srcq+srcstrideq*2]
125 lea srcq, [srcq+srcstrideq*2]
126 add srcq, srcstrideq
127 movh m3, [srcq]
128 movh m4, [srcq+srcstrideq]
129 punpcklbw m0, m7
130 punpcklbw m1, m7
131 punpcklbw m2, m7
132 punpcklbw m3, m7
133 punpcklbw m4, m7
134
135%ifdef m8
136 mova m8, [myq+ 0]
137 mova m9, [myq+16]
138 mova m10, [myq+32]
139 mova m11, [myq+48]
140%define COEFF05 m8
141%define COEFF14 m9
142%define COEFF2 m10
143%define COEFF3 m11
144%else
145%define COEFF05 [myq+ 0]
146%define COEFF14 [myq+16]
147%define COEFF2 [myq+32]
148%define COEFF3 [myq+48]
149%endif
150.nextrow:
151 mova m6, m1
152 movh m5, [srcq+2*srcstrideq] ; read new row
153 paddw m6, m4
154 punpcklbw m5, m7
155 pmullw m6, COEFF14
156 paddw m0, m5
157 pmullw m0, COEFF05
158 paddw m6, m0
159 mova m0, m1
160 paddw m6, [pw_32]
161 mova m1, m2
162 pmullw m2, COEFF2
163 paddw m6, m2
164 mova m2, m3
165 pmullw m3, COEFF3
166 paddw m6, m3
167
168 ; round/clip/store
169 mova m3, m4
170 psraw m6, 6
171 mova m4, m5
172 STORE m6, m5, %1
173
174 ; go to next line
175 add dstq, dststrideq
176 add srcq, srcstrideq
177 dec heightd ; next row
178 jg .nextrow
179 REP_RET
180%endmacro
181
182%macro FILTER_H 1
183cglobal %1_rv40_qpel_h, 6, 6+npicregs, 12, dst, dststride, src, srcstride, height, mx, picreg
184%ifdef PIC
185 lea picregq, [sixtap_filter_v_m]
186%endif
187 pxor m7, m7
188 LOAD mx, sixtap_filter_v
189 mova m6, [pw_32]
190%ifdef m8
191 mova m8, [mxq+ 0]
192 mova m9, [mxq+16]
193 mova m10, [mxq+32]
194 mova m11, [mxq+48]
195%define COEFF05 m8
196%define COEFF14 m9
197%define COEFF2 m10
198%define COEFF3 m11
199%else
200%define COEFF05 [mxq+ 0]
201%define COEFF14 [mxq+16]
202%define COEFF2 [mxq+32]
203%define COEFF3 [mxq+48]
204%endif
205.nextrow:
206 movq m0, [srcq-2]
207 movq m5, [srcq+3]
208 movq m1, [srcq-1]
209 movq m4, [srcq+2]
210 punpcklbw m0, m7
211 punpcklbw m5, m7
212 punpcklbw m1, m7
213 punpcklbw m4, m7
214 movq m2, [srcq-0]
215 movq m3, [srcq+1]
216 paddw m0, m5
217 paddw m1, m4
218 punpcklbw m2, m7
219 punpcklbw m3, m7
220 pmullw m0, COEFF05
221 pmullw m1, COEFF14
222 pmullw m2, COEFF2
223 pmullw m3, COEFF3
224 paddw m0, m6
225 paddw m1, m2
226 paddw m0, m3
227 paddw m0, m1
228 psraw m0, 6
229 STORE m0, m1, %1
230
231 ; go to next line
232 add dstq, dststrideq
233 add srcq, srcstrideq
234 dec heightd ; next row
235 jg .nextrow
236 REP_RET
237%endmacro
238
239%if ARCH_X86_32
240INIT_MMX mmx
241FILTER_V put
242FILTER_H put
243
244INIT_MMX mmx2
245FILTER_V avg
246FILTER_H avg
247
248INIT_MMX 3dnow
249FILTER_V avg
250FILTER_H avg
251%endif
252
253INIT_XMM sse2
254FILTER_H put
255FILTER_H avg
256FILTER_V put
257FILTER_V avg
258
259%macro FILTER_SSSE3 1
260cglobal %1_rv40_qpel_v, 6,6+npicregs,8, dst, dststride, src, srcstride, height, my, picreg
261%ifdef PIC
262 lea picregq, [sixtap_filter_hb_m]
263%endif
264
265 ; read 5 lines
266 sub srcq, srcstrideq
267 LOAD my, sixtap_filter_hb
268 sub srcq, srcstrideq
269 movh m0, [srcq]
270 movh m1, [srcq+srcstrideq]
271 movh m2, [srcq+srcstrideq*2]
272 lea srcq, [srcq+srcstrideq*2]
273 add srcq, srcstrideq
274 mova m5, [myq]
275 movh m3, [srcq]
276 movh m4, [srcq+srcstrideq]
277 lea srcq, [srcq+2*srcstrideq]
278
279.nextrow:
280 mova m6, m2
281 punpcklbw m0, m1
282 punpcklbw m6, m3
283 pmaddubsw m0, m5
284 pmaddubsw m6, [myq+16]
285 movh m7, [srcq] ; read new row
286 paddw m6, m0
287 mova m0, m1
288 mova m1, m2
289 mova m2, m3
290 mova m3, m4
291 mova m4, m7
292 punpcklbw m7, m3
293 pmaddubsw m7, m5
294 paddw m6, m7
295 pmulhrsw m6, [pw_512]
296 STORE m6, m7, %1
297
298 ; go to next line
299 add dstq, dststrideq
300 add srcq, srcstrideq
301 dec heightd ; next row
302 jg .nextrow
303 REP_RET
304
305cglobal %1_rv40_qpel_h, 6,6+npicregs,8, dst, dststride, src, srcstride, height, mx, picreg
306%ifdef PIC
307 lea picregq, [sixtap_filter_hb_m]
308%endif
309 mova m3, [filter_h6_shuf2]
310 mova m4, [filter_h6_shuf3]
311 LOAD mx, sixtap_filter_hb
312 mova m5, [mxq] ; set up 6tap filter in bytes
313 mova m6, [mxq+16]
314 mova m7, [filter_h6_shuf1]
315
316.nextrow:
317 movu m0, [srcq-2]
318 mova m1, m0
319 mova m2, m0
320 pshufb m0, m7
321 pshufb m1, m3
322 pshufb m2, m4
323 pmaddubsw m0, m5
324 pmaddubsw m1, m6
325 pmaddubsw m2, m5
326 paddw m0, m1
327 paddw m0, m2
328 pmulhrsw m0, [pw_512]
329 STORE m0, m1, %1
330
331 ; go to next line
332 add dstq, dststrideq
333 add srcq, srcstrideq
334 dec heightd ; next row
335 jg .nextrow
336 REP_RET
337%endmacro
338
339INIT_XMM ssse3
340FILTER_SSSE3 put
341FILTER_SSSE3 avg
342
33; %1=5bits weights?, %2=dst %3=src1 %4=src3 %5=stride if sse2343; %1=5bits weights?, %2=dst %3=src1 %4=src3 %5=stride if sse2
34%macro RV40_WCORE 4-5344%macro RV40_WCORE 4-5
35 movh m4, [%3 + r6 + 0]345 movh m4, [%3 + r6 + 0]
@@ -143,7 +453,7 @@ SECTION .text · 107 unmodified lines
143%macro RV40_WEIGHT 3453%macro RV40_WEIGHT 3
144cglobal rv40_weight_func_%1_%2, 6, 7, 8454cglobal rv40_weight_func_%1_%2, 6, 7, 8
145%if cpuflag(ssse3)455%if cpuflag(ssse3)
146 mova m1, [shift_round]456 mova m1, [pw_1024]
147%else457%else
148 mova m1, [pw_16]458 mova m1, [pw_16]
149%endif459%endif
libavcodec/x86/rv40dsp_init.c+146−0
@@ -22,8 +22,11 @@ · 21 unmodified lines
22/**22/**
23 * @file23 * @file
24 * RV40 decoder motion compensation functions x86-optimised24 * RV40 decoder motion compensation functions x86-optimised
25 * 2,0 and 0,2 have h264 equivalents.
26 * 3,3 is bugged in the rv40 format and maps to _xy2 version
25 */27 */
26 28
29#include "libavcodec/x86/dsputil_mmx.h"
27#include "libavcodec/rv34dsp.h"30#include "libavcodec/rv34dsp.h"
28 31
29void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,32void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
@@ -53,6 +56,132 @@ DECLARE_WEIGHT(mmx) · 23 unmodified lines
53DECLARE_WEIGHT(sse2)56DECLARE_WEIGHT(sse2)
54DECLARE_WEIGHT(ssse3)57DECLARE_WEIGHT(ssse3)
55 58
59/** @{ */
60/**
61 * Define one qpel function.
62 * LOOPSIZE must be already set to the number of pixels processed per
63 * iteration in the inner loop of the called functions.
64 * COFF(x) must be already defined so as to provide the offset into any
65 * array of coeffs used by the called function for the qpel position x.
66 */
67#define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT) \
68static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst, \
69 uint8_t *src, \
70 int stride) \
71{ \
72 int i; \
73 if (PH && PV) { \
74 DECLARE_ALIGNED(16, uint8_t, tmp)[SIZE * (SIZE + 5)]; \
75 uint8_t *tmpptr = tmp + SIZE * 2; \
76 src -= stride * 2; \
77 \
78 for (i = 0; i < SIZE; i += LOOPSIZE) \
79 ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride, \
80 SIZE + 5, HCOFF(PH)); \
81 for (i = 0; i < SIZE; i += LOOPSIZE) \
82 ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i, \
83 SIZE, SIZE, VCOFF(PV)); \
84 } else if (PV) { \
85 for (i = 0; i < SIZE; i += LOOPSIZE) \
86 ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i, \
87 stride, SIZE, VCOFF(PV)); \
88 } else { \
89 for (i = 0; i < SIZE; i += LOOPSIZE) \
90 ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i, \
91 stride, SIZE, HCOFF(PH)); \
92 } \
93};
94
95/** Declare functions for sizes 8 and 16 and given operations
96 * and qpel position. */
97#define QPEL_FUNCS_DECL(OP, PH, PV, OPT) \
98 QPEL_FUNC_DECL(OP, 8, PH, PV, OPT) \
99 QPEL_FUNC_DECL(OP, 16, PH, PV, OPT)
100
101/** Declare all functions for all sizes and qpel positions */
102#define QPEL_MC_DECL(OP, OPT) \
103void ff_ ##OP ##rv40_qpel_h ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
104 const uint8_t *src, \
105 ptrdiff_t srcStride, \
106 int len, int m); \
107void ff_ ##OP ##rv40_qpel_v ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
108 const uint8_t *src, \
109 ptrdiff_t srcStride, \
110 int len, int m); \
111QPEL_FUNCS_DECL(OP, 0, 1, OPT) \
112QPEL_FUNCS_DECL(OP, 0, 3, OPT) \
113QPEL_FUNCS_DECL(OP, 1, 0, OPT) \
114QPEL_FUNCS_DECL(OP, 1, 1, OPT) \
115QPEL_FUNCS_DECL(OP, 1, 2, OPT) \
116QPEL_FUNCS_DECL(OP, 1, 3, OPT) \
117QPEL_FUNCS_DECL(OP, 2, 1, OPT) \
118QPEL_FUNCS_DECL(OP, 2, 2, OPT) \
119QPEL_FUNCS_DECL(OP, 2, 3, OPT) \
120QPEL_FUNCS_DECL(OP, 3, 0, OPT) \
121QPEL_FUNCS_DECL(OP, 3, 1, OPT) \
122QPEL_FUNCS_DECL(OP, 3, 2, OPT)
123/** @} */
124
125#define LOOPSIZE 8
126#define HCOFF(x) (32 * (x - 1))
127#define VCOFF(x) (32 * (x - 1))
128QPEL_MC_DECL(put_, _ssse3)
129QPEL_MC_DECL(avg_, _ssse3)
130
131#undef LOOPSIZE
132#undef HCOFF
133#undef VCOFF
134#define LOOPSIZE 8
135#define HCOFF(x) (64 * (x - 1))
136#define VCOFF(x) (64 * (x - 1))
137QPEL_MC_DECL(put_, _sse2)
138QPEL_MC_DECL(avg_, _sse2)
139
140#if ARCH_X86_32
141#undef LOOPSIZE
142#undef HCOFF
143#undef VCOFF
144#define LOOPSIZE 4
145#define HCOFF(x) (64 * (x - 1))
146#define VCOFF(x) (64 * (x - 1))
147
148QPEL_MC_DECL(put_, _mmx)
149
150#define ff_put_rv40_qpel_h_mmx2 ff_put_rv40_qpel_h_mmx
151#define ff_put_rv40_qpel_v_mmx2 ff_put_rv40_qpel_v_mmx
152QPEL_MC_DECL(avg_, _mmx2)
153
154#define ff_put_rv40_qpel_h_3dnow ff_put_rv40_qpel_h_mmx
155#define ff_put_rv40_qpel_v_3dnow ff_put_rv40_qpel_v_mmx
156QPEL_MC_DECL(avg_, _3dnow)
157#endif
158
159/** @{ */
160/** Set one function */
161#define QPEL_FUNC_SET(OP, SIZE, PH, PV, OPT) \
162 c-> OP ## pixels_tab[2 - SIZE / 8][4 * PV + PH] = OP ## rv40_qpel ##SIZE ## _mc ##PH ##PV ##OPT;
163
164/** Set functions put and avg for sizes 8 and 16 and a given qpel position */
165#define QPEL_FUNCS_SET(OP, PH, PV, OPT) \
166 QPEL_FUNC_SET(OP, 8, PH, PV, OPT) \
167 QPEL_FUNC_SET(OP, 16, PH, PV, OPT)
168
169/** Set all functions for all sizes and qpel positions */
170#define QPEL_MC_SET(OP, OPT) \
171QPEL_FUNCS_SET (OP, 0, 1, OPT) \
172QPEL_FUNCS_SET (OP, 0, 3, OPT) \
173QPEL_FUNCS_SET (OP, 1, 0, OPT) \
174QPEL_FUNCS_SET (OP, 1, 1, OPT) \
175QPEL_FUNCS_SET (OP, 1, 2, OPT) \
176QPEL_FUNCS_SET (OP, 1, 3, OPT) \
177QPEL_FUNCS_SET (OP, 2, 1, OPT) \
178QPEL_FUNCS_SET (OP, 2, 2, OPT) \
179QPEL_FUNCS_SET (OP, 2, 3, OPT) \
180QPEL_FUNCS_SET (OP, 3, 0, OPT) \
181QPEL_FUNCS_SET (OP, 3, 1, OPT) \
182QPEL_FUNCS_SET (OP, 3, 2, OPT)
183/** @} */
184
56void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)185void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
57{186{
58#if HAVE_YASM187#if HAVE_YASM
@@ -65,25 +194,42 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp) · 6 unmodified lines
65 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx;194 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx;
66 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx;195 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx;
67 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmx;196 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmx;
197 c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_mmx;
198 c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_mmx;
199 c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_mmx;
200 c->avg_pixels_tab[1][15] = ff_avg_rv40_qpel8_mc33_mmx;
201#if ARCH_X86_32
202 QPEL_MC_SET(put_, _mmx)
203#endif
68 }204 }
69 if (mm_flags & AV_CPU_FLAG_MMX2) {205 if (mm_flags & AV_CPU_FLAG_MMX2) {
70 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;206 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
71 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;207 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;
208#if ARCH_X86_32
209 QPEL_MC_SET(avg_, _mmx2)
210#endif
72 } else if (mm_flags & AV_CPU_FLAG_3DNOW) {211 } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
73 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;212 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
74 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;213 c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_3dnow;
214#if ARCH_X86_32
215 QPEL_MC_SET(avg_, _3dnow)
216#endif
75 }217 }
76 if (mm_flags & AV_CPU_FLAG_SSE2) {218 if (mm_flags & AV_CPU_FLAG_SSE2) {
77 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;219 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;
78 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;220 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;
79 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;221 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;
80 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_sse2;222 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_sse2;
223 QPEL_MC_SET(put_, _sse2)
224 QPEL_MC_SET(avg_, _sse2)
81 }225 }
82 if (mm_flags & AV_CPU_FLAG_SSSE3) {226 if (mm_flags & AV_CPU_FLAG_SSSE3) {
83 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;227 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;
84 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;228 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;
85 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;229 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;
86 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_ssse3;230 c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_ssse3;
231 QPEL_MC_SET(put_, _ssse3)
232 QPEL_MC_SET(avg_, _ssse3)
87 }233 }
88#endif234#endif
89}235}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t