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
17911791 QPEL_2TAP(put_, 8, 3dnow)
17921792 QPEL_2TAP(avg_, 8, 3dnow)
17931793
1794+void 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+}
1798+void 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+}
1802+void 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+}
1806+void 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+}
17941810
17951811 #if HAVE_YASM
17961812 typedef 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
199199 void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);
200200 void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);
201201
202+void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
203+void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
204+void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
205+void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
206+
202207 void ff_mmx_idct(DCTELEM *block);
203208 void ff_mmxext_idct(DCTELEM *block);
204209
libavcodec/x86/rv40dsp.asm+313−3
@@ -1,5 +1,7 @@
11 ;******************************************************************************
22 ;* 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>
35 ;* Copyright (C) 2012 Christophe Gisquet <christophe.gisquet@gmail.com>
46 ;*
57 ;* This file is part of Libav.
@@ -25,11 +27,319 @@ · 19 unmodified lines
2527 SECTION_RODATA
2628
2729 align 16
28−shift_round: times 8 dw 1 << (16 - 6)
29−cextern pw_16
30+pw_1024: times 8 dw 1 << (16 - 6) ; pw_1024
31+
32+sixtap_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+
41+sixtap_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+
68+filter_h6_shuf1: db 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8
69+filter_h6_shuf2: db 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10
70+filter_h6_shuf3: db 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11
71+
72+cextern pw_32
73+cextern pw_16
74+cextern pw_512
3075
3176 SECTION .text
3277
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
112+cglobal %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
183+cglobal %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
240+INIT_MMX mmx
241+FILTER_V put
242+FILTER_H put
243+
244+INIT_MMX mmx2
245+FILTER_V avg
246+FILTER_H avg
247+
248+INIT_MMX 3dnow
249+FILTER_V avg
250+FILTER_H avg
251+%endif
252+
253+INIT_XMM sse2
254+FILTER_H put
255+FILTER_H avg
256+FILTER_V put
257+FILTER_V avg
258+
259+%macro FILTER_SSSE3 1
260+cglobal %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+
305+cglobal %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+
339+INIT_XMM ssse3
340+FILTER_SSSE3 put
341+FILTER_SSSE3 avg
342+
33343 ; %1=5bits weights?, %2=dst %3=src1 %4=src3 %5=stride if sse2
34344 %macro RV40_WCORE 4-5
35345 movh m4, [%3 + r6 + 0]
@@ -143,7 +453,7 @@ SECTION .text · 107 unmodified lines
143453 %macro RV40_WEIGHT 3
144454 cglobal rv40_weight_func_%1_%2, 6, 7, 8
145455 %if cpuflag(ssse3)
146− mova m1, [shift_round]
456+ mova m1, [pw_1024]
147457 %else
148458 mova m1, [pw_16]
149459 %endif
libavcodec/x86/rv40dsp_init.c+146−0
@@ -22,8 +22,11 @@ · 21 unmodified lines
2222 /**
2323 * @file
2424 * 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
2527 */
2628
29+#include "libavcodec/x86/dsputil_mmx.h"
2730 #include "libavcodec/rv34dsp.h"
2831
2932 void ff_put_rv40_chroma_mc8_mmx (uint8_t *dst, uint8_t *src,
@@ -53,6 +56,132 @@ DECLARE_WEIGHT(mmx) · 23 unmodified lines
5356 DECLARE_WEIGHT(sse2)
5457 DECLARE_WEIGHT(ssse3)
5558
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) \
68+static 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) \
103+void 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); \
107+void 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); \
111+QPEL_FUNCS_DECL(OP, 0, 1, OPT) \
112+QPEL_FUNCS_DECL(OP, 0, 3, OPT) \
113+QPEL_FUNCS_DECL(OP, 1, 0, OPT) \
114+QPEL_FUNCS_DECL(OP, 1, 1, OPT) \
115+QPEL_FUNCS_DECL(OP, 1, 2, OPT) \
116+QPEL_FUNCS_DECL(OP, 1, 3, OPT) \
117+QPEL_FUNCS_DECL(OP, 2, 1, OPT) \
118+QPEL_FUNCS_DECL(OP, 2, 2, OPT) \
119+QPEL_FUNCS_DECL(OP, 2, 3, OPT) \
120+QPEL_FUNCS_DECL(OP, 3, 0, OPT) \
121+QPEL_FUNCS_DECL(OP, 3, 1, OPT) \
122+QPEL_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))
128+QPEL_MC_DECL(put_, _ssse3)
129+QPEL_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))
137+QPEL_MC_DECL(put_, _sse2)
138+QPEL_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+
148+QPEL_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
152+QPEL_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
156+QPEL_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) \
171+QPEL_FUNCS_SET (OP, 0, 1, OPT) \
172+QPEL_FUNCS_SET (OP, 0, 3, OPT) \
173+QPEL_FUNCS_SET (OP, 1, 0, OPT) \
174+QPEL_FUNCS_SET (OP, 1, 1, OPT) \
175+QPEL_FUNCS_SET (OP, 1, 2, OPT) \
176+QPEL_FUNCS_SET (OP, 1, 3, OPT) \
177+QPEL_FUNCS_SET (OP, 2, 1, OPT) \
178+QPEL_FUNCS_SET (OP, 2, 2, OPT) \
179+QPEL_FUNCS_SET (OP, 2, 3, OPT) \
180+QPEL_FUNCS_SET (OP, 3, 0, OPT) \
181+QPEL_FUNCS_SET (OP, 3, 1, OPT) \
182+QPEL_FUNCS_SET (OP, 3, 2, OPT)
183+/** @} */
184+
56185 void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
57186 {
58187 #if HAVE_YASM
@@ -65,25 +194,42 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp) · 6 unmodified lines
65194 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx;
66195 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx;
67196 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
68204 }
69205 if (mm_flags & AV_CPU_FLAG_MMX2) {
70206 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
71207 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
72211 } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
73212 c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
74213 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
75217 }
76218 if (mm_flags & AV_CPU_FLAG_SSE2) {
77219 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;
78220 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;
79221 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;
80222 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)
81225 }
82226 if (mm_flags & AV_CPU_FLAG_SSSE3) {
83227 c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;
84228 c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;
85229 c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;
86230 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)
87233 }
88234 #endif
89235 }

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