annotate x86/h264dsp_mmx.c @ 12471:d821f7c64fc9 libavcodec

Remove use of deprecated functions av_image_fill_pointers/linesizes in libavcodec/utils.c, fix warnings.
author stefano
date Tue, 07 Sep 2010 21:24:03 +0000
parents a5ddb39627fd
children 9fef0a8ddd63
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
1 /*
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
2 * Copyright (c) 2004-2005 Michael Niedermayer, Loren Merritt
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
3 *
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
4 * This file is part of FFmpeg.
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
5 *
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
10 *
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
14 * Lesser General Public License for more details.
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
15 *
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
19 */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
20
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
21 #include "libavutil/x86_cpu.h"
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
22 #include "libavcodec/h264dsp.h"
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
23 #include "dsputil_mmx.h"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
24
11369
98970e51365a Remove DECLARE_ALIGNED_{8,16} macros
mru
parents: 11017
diff changeset
25 DECLARE_ALIGNED(8, static const uint64_t, ff_pb_3_1 ) = 0x0103010301030103ULL;
98970e51365a Remove DECLARE_ALIGNED_{8,16} macros
mru
parents: 11017
diff changeset
26 DECLARE_ALIGNED(8, static const uint64_t, ff_pb_7_3 ) = 0x0307030703070307ULL;
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
27
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
28 /***********************************/
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
29 /* IDCT */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
30
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
31 #define SUMSUB_BADC( a, b, c, d ) \
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
32 "paddw "#b", "#a" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
33 "paddw "#d", "#c" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
34 "paddw "#b", "#b" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
35 "paddw "#d", "#d" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
36 "psubw "#a", "#b" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
37 "psubw "#c", "#d" \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
38
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
39 #define SUMSUBD2_AB( a, b, t ) \
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
40 "movq "#b", "#t" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
41 "psraw $1 , "#b" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
42 "paddw "#a", "#b" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
43 "psraw $1 , "#a" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
44 "psubw "#t", "#a" \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
45
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
46 #define IDCT4_1D( s02, s13, d02, d13, t ) \
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
47 SUMSUB_BA ( s02, d02 )\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
48 SUMSUBD2_AB( s13, d13, t )\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
49 SUMSUB_BADC( d13, s02, s13, d02 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
50
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
51 #define STORE_DIFF_4P( p, t, z ) \
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
52 "psraw $6, "#p" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
53 "movd (%0), "#t" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
54 "punpcklbw "#z", "#t" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
55 "paddsw "#t", "#p" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
56 "packuswb "#z", "#p" \n\t"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
57 "movd "#p", (%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
58
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
59 static void ff_h264_idct_add_mmx(uint8_t *dst, int16_t *block, int stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
60 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
61 /* Load dct coeffs */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
62 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
63 "movq (%0), %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
64 "movq 8(%0), %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
65 "movq 16(%0), %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
66 "movq 24(%0), %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
67 :: "r"(block) );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
68
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
69 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
70 /* mm1=s02+s13 mm2=s02-s13 mm4=d02+d13 mm0=d02-d13 */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
71 IDCT4_1D( %%mm2, %%mm1, %%mm0, %%mm3, %%mm4 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
72
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
73 "movq %0, %%mm6 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
74 /* in: 1,4,0,2 out: 1,2,3,0 */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
75 TRANSPOSE4( %%mm3, %%mm1, %%mm0, %%mm2, %%mm4 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
76
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
77 "paddw %%mm6, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
78
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
79 /* mm2=s02+s13 mm3=s02-s13 mm4=d02+d13 mm1=d02-d13 */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
80 IDCT4_1D( %%mm4, %%mm2, %%mm3, %%mm0, %%mm1 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
81
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
82 "pxor %%mm7, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
83 :: "m"(ff_pw_32));
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
84
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
85 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
86 STORE_DIFF_4P( %%mm0, %%mm1, %%mm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
87 "add %1, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
88 STORE_DIFF_4P( %%mm2, %%mm1, %%mm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
89 "add %1, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
90 STORE_DIFF_4P( %%mm3, %%mm1, %%mm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
91 "add %1, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
92 STORE_DIFF_4P( %%mm4, %%mm1, %%mm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
93 : "+r"(dst)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
94 : "r" ((x86_reg)stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
95 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
96 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
97
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
98 static inline void h264_idct8_1d(int16_t *block)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
99 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
100 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
101 "movq 112(%0), %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
102 "movq 80(%0), %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
103 "movq 48(%0), %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
104 "movq 16(%0), %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
105
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
106 "movq %%mm0, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
107 "movq %%mm5, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
108 "psraw $1, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
109 "psraw $1, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
110 "paddw %%mm0, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
111 "paddw %%mm5, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
112 "paddw %%mm7, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
113 "paddw %%mm0, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
114 "psubw %%mm5, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
115 "paddw %%mm3, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
116
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
117 "psubw %%mm3, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
118 "psubw %%mm3, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
119 "paddw %%mm7, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
120 "psubw %%mm7, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
121 "psraw $1, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
122 "psraw $1, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
123 "psubw %%mm3, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
124 "psubw %%mm7, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
125
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
126 "movq %%mm4, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
127 "movq %%mm1, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
128 "psraw $2, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
129 "psraw $2, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
130 "paddw %%mm5, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
131 "psraw $2, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
132 "paddw %%mm0, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
133 "psraw $2, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
134 "psubw %%mm4, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
135 "psubw %%mm0, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
136
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
137 "movq 32(%0), %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
138 "movq 96(%0), %%mm6 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
139 "movq %%mm2, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
140 "movq %%mm6, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
141 "psraw $1, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
142 "psraw $1, %%mm6 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
143 "psubw %%mm0, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
144 "paddw %%mm2, %%mm6 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
145
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
146 "movq (%0), %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
147 "movq 64(%0), %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
148 SUMSUB_BA( %%mm0, %%mm2 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
149 SUMSUB_BA( %%mm6, %%mm0 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
150 SUMSUB_BA( %%mm4, %%mm2 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
151 SUMSUB_BA( %%mm7, %%mm6 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
152 SUMSUB_BA( %%mm5, %%mm4 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
153 SUMSUB_BA( %%mm3, %%mm2 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
154 SUMSUB_BA( %%mm1, %%mm0 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
155 :: "r"(block)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
156 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
157 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
158
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
159 static void ff_h264_idct8_add_mmx(uint8_t *dst, int16_t *block, int stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
160 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
161 int i;
11369
98970e51365a Remove DECLARE_ALIGNED_{8,16} macros
mru
parents: 11017
diff changeset
162 DECLARE_ALIGNED(8, int16_t, b2)[64];
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
163
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
164 block[0] += 32;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
165
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
166 for(i=0; i<2; i++){
11369
98970e51365a Remove DECLARE_ALIGNED_{8,16} macros
mru
parents: 11017
diff changeset
167 DECLARE_ALIGNED(8, uint64_t, tmp);
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
168
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
169 h264_idct8_1d(block+4*i);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
170
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
171 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
172 "movq %%mm7, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
173 TRANSPOSE4( %%mm0, %%mm2, %%mm4, %%mm6, %%mm7 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
174 "movq %%mm0, 8(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
175 "movq %%mm6, 24(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
176 "movq %%mm7, 40(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
177 "movq %%mm4, 56(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
178 "movq %0, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
179 TRANSPOSE4( %%mm7, %%mm5, %%mm3, %%mm1, %%mm0 )
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
180 "movq %%mm7, (%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
181 "movq %%mm1, 16(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
182 "movq %%mm0, 32(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
183 "movq %%mm3, 48(%1) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
184 : "=m"(tmp)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
185 : "r"(b2+32*i)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
186 : "memory"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
187 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
188 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
189
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
190 for(i=0; i<2; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
191 h264_idct8_1d(b2+4*i);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
192
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
193 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
194 "psraw $6, %%mm7 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
195 "psraw $6, %%mm6 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
196 "psraw $6, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
197 "psraw $6, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
198 "psraw $6, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
199 "psraw $6, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
200 "psraw $6, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
201 "psraw $6, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
202
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
203 "movq %%mm7, (%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
204 "movq %%mm5, 16(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
205 "movq %%mm3, 32(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
206 "movq %%mm1, 48(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
207 "movq %%mm0, 64(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
208 "movq %%mm2, 80(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
209 "movq %%mm4, 96(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
210 "movq %%mm6, 112(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
211 :: "r"(b2+4*i)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
212 : "memory"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
213 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
214 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
215
12435
fe78a4548d12 Put ff_ prefix on non-static {put_signed,put,add}_pixels_clamped_mmx()
rbultje
parents: 12414
diff changeset
216 ff_add_pixels_clamped_mmx(b2, dst, stride);
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
217 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
218
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
219 #define STORE_DIFF_8P( p, d, t, z )\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
220 "movq "#d", "#t" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
221 "psraw $6, "#p" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
222 "punpcklbw "#z", "#t" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
223 "paddsw "#t", "#p" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
224 "packuswb "#p", "#p" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
225 "movq "#p", "#d" \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
226
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
227 #define H264_IDCT8_1D_SSE2(a,b,c,d,e,f,g,h)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
228 "movdqa "#c", "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
229 "movdqa "#g", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
230 "psraw $1, "#c" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
231 "psraw $1, "#g" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
232 "psubw "#e", "#c" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
233 "paddw "#a", "#g" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
234 "movdqa "#b", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
235 "psraw $1, "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
236 "paddw "#b", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
237 "paddw "#d", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
238 "paddw "#f", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
239 "movdqa "#f", "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
240 "psraw $1, "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
241 "paddw "#f", "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
242 "paddw "#h", "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
243 "psubw "#b", "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
244 "psubw "#d", "#b" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
245 "psubw "#d", "#f" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
246 "paddw "#h", "#b" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
247 "psubw "#h", "#f" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
248 "psraw $1, "#d" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
249 "psraw $1, "#h" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
250 "psubw "#d", "#b" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
251 "psubw "#h", "#f" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
252 "movdqa "#e", "#d" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
253 "movdqa "#a", "#h" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
254 "psraw $2, "#d" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
255 "psraw $2, "#h" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
256 "paddw "#f", "#d" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
257 "paddw "#b", "#h" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
258 "psraw $2, "#f" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
259 "psraw $2, "#b" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
260 "psubw "#f", "#e" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
261 "psubw "#a", "#b" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
262 "movdqa 0x00(%1), "#a" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
263 "movdqa 0x40(%1), "#f" \n"\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
264 SUMSUB_BA(f, a)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
265 SUMSUB_BA(g, f)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
266 SUMSUB_BA(c, a)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
267 SUMSUB_BA(e, g)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
268 SUMSUB_BA(b, c)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
269 SUMSUB_BA(h, a)\
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
270 SUMSUB_BA(d, f)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
271
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
272 static void ff_h264_idct8_add_sse2(uint8_t *dst, int16_t *block, int stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
273 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
274 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
275 "movdqa 0x10(%1), %%xmm1 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
276 "movdqa 0x20(%1), %%xmm2 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
277 "movdqa 0x30(%1), %%xmm3 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
278 "movdqa 0x50(%1), %%xmm5 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
279 "movdqa 0x60(%1), %%xmm6 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
280 "movdqa 0x70(%1), %%xmm7 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
281 H264_IDCT8_1D_SSE2(%%xmm0, %%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
282 TRANSPOSE8(%%xmm4, %%xmm1, %%xmm7, %%xmm3, %%xmm5, %%xmm0, %%xmm2, %%xmm6, (%1))
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
283 "paddw %4, %%xmm4 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
284 "movdqa %%xmm4, 0x00(%1) \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
285 "movdqa %%xmm2, 0x40(%1) \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
286 H264_IDCT8_1D_SSE2(%%xmm4, %%xmm0, %%xmm6, %%xmm3, %%xmm2, %%xmm5, %%xmm7, %%xmm1)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
287 "movdqa %%xmm6, 0x60(%1) \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
288 "movdqa %%xmm7, 0x70(%1) \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
289 "pxor %%xmm7, %%xmm7 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
290 STORE_DIFF_8P(%%xmm2, (%0), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
291 STORE_DIFF_8P(%%xmm0, (%0,%2), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
292 STORE_DIFF_8P(%%xmm1, (%0,%2,2), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
293 STORE_DIFF_8P(%%xmm3, (%0,%3), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
294 "lea (%0,%2,4), %0 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
295 STORE_DIFF_8P(%%xmm5, (%0), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
296 STORE_DIFF_8P(%%xmm4, (%0,%2), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
297 "movdqa 0x60(%1), %%xmm0 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
298 "movdqa 0x70(%1), %%xmm1 \n"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
299 STORE_DIFF_8P(%%xmm0, (%0,%2,2), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
300 STORE_DIFF_8P(%%xmm1, (%0,%3), %%xmm6, %%xmm7)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
301 :"+r"(dst)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
302 :"r"(block), "r"((x86_reg)stride), "r"((x86_reg)3L*stride), "m"(ff_pw_32)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
303 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
304 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
305
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
306 static void ff_h264_idct_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
307 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
308 int dc = (block[0] + 32) >> 6;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
309 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
310 "movd %0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
311 "pshufw $0, %%mm0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
312 "pxor %%mm1, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
313 "psubw %%mm0, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
314 "packuswb %%mm0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
315 "packuswb %%mm1, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
316 ::"r"(dc)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
317 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
318 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
319 "movd %0, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
320 "movd %1, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
321 "movd %2, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
322 "movd %3, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
323 "paddusb %%mm0, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
324 "paddusb %%mm0, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
325 "paddusb %%mm0, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
326 "paddusb %%mm0, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
327 "psubusb %%mm1, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
328 "psubusb %%mm1, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
329 "psubusb %%mm1, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
330 "psubusb %%mm1, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
331 "movd %%mm2, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
332 "movd %%mm3, %1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
333 "movd %%mm4, %2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
334 "movd %%mm5, %3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
335 :"+m"(*(uint32_t*)(dst+0*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
336 "+m"(*(uint32_t*)(dst+1*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
337 "+m"(*(uint32_t*)(dst+2*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
338 "+m"(*(uint32_t*)(dst+3*stride))
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
339 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
340 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
341
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
342 static void ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
343 {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
344 int dc = (block[0] + 32) >> 6;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
345 int y;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
346 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
347 "movd %0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
348 "pshufw $0, %%mm0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
349 "pxor %%mm1, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
350 "psubw %%mm0, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
351 "packuswb %%mm0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
352 "packuswb %%mm1, %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
353 ::"r"(dc)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
354 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
355 for(y=2; y--; dst += 4*stride){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
356 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
357 "movq %0, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
358 "movq %1, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
359 "movq %2, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
360 "movq %3, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
361 "paddusb %%mm0, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
362 "paddusb %%mm0, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
363 "paddusb %%mm0, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
364 "paddusb %%mm0, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
365 "psubusb %%mm1, %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
366 "psubusb %%mm1, %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
367 "psubusb %%mm1, %%mm4 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
368 "psubusb %%mm1, %%mm5 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
369 "movq %%mm2, %0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
370 "movq %%mm3, %1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
371 "movq %%mm4, %2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
372 "movq %%mm5, %3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
373 :"+m"(*(uint64_t*)(dst+0*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
374 "+m"(*(uint64_t*)(dst+1*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
375 "+m"(*(uint64_t*)(dst+2*stride)),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
376 "+m"(*(uint64_t*)(dst+3*stride))
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
377 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
378 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
379 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
380
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
381 //FIXME this table is a duplicate from h264data.h, and will be removed once the tables from, h264 have been split
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
382 static const uint8_t scan8[16 + 2*4]={
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
383 4+1*8, 5+1*8, 4+2*8, 5+2*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
384 6+1*8, 7+1*8, 6+2*8, 7+2*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
385 4+3*8, 5+3*8, 4+4*8, 5+4*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
386 6+3*8, 7+3*8, 6+4*8, 7+4*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
387 1+1*8, 2+1*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
388 1+2*8, 2+2*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
389 1+4*8, 2+4*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
390 1+5*8, 2+5*8,
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
391 };
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
392
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
393 static void ff_h264_idct_add16_mmx(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
394 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
395 for(i=0; i<16; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
396 if(nnzc[ scan8[i] ])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
397 ff_h264_idct_add_mmx(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
398 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
399 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
400
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
401 static void ff_h264_idct8_add4_mmx(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
402 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
403 for(i=0; i<16; i+=4){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
404 if(nnzc[ scan8[i] ])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
405 ff_h264_idct8_add_mmx(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
406 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
407 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
408
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
409
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
410 static void ff_h264_idct_add16_mmx2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
411 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
412 for(i=0; i<16; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
413 int nnz = nnzc[ scan8[i] ];
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
414 if(nnz){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
415 if(nnz==1 && block[i*16]) ff_h264_idct_dc_add_mmx2(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
416 else ff_h264_idct_add_mmx (dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
417 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
418 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
419 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
420
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
421 static void ff_h264_idct_add16intra_mmx(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
422 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
423 for(i=0; i<16; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
424 if(nnzc[ scan8[i] ] || block[i*16])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
425 ff_h264_idct_add_mmx(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
426 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
427 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
428
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
429 static void ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
430 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
431 for(i=0; i<16; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
432 if(nnzc[ scan8[i] ]) ff_h264_idct_add_mmx (dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
433 else if(block[i*16]) ff_h264_idct_dc_add_mmx2(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
434 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
435 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
436
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
437 static void ff_h264_idct8_add4_mmx2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
438 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
439 for(i=0; i<16; i+=4){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
440 int nnz = nnzc[ scan8[i] ];
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
441 if(nnz){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
442 if(nnz==1 && block[i*16]) ff_h264_idct8_dc_add_mmx2(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
443 else ff_h264_idct8_add_mmx (dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
444 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
445 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
446 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
447
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
448 static void ff_h264_idct8_add4_sse2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
449 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
450 for(i=0; i<16; i+=4){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
451 int nnz = nnzc[ scan8[i] ];
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
452 if(nnz){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
453 if(nnz==1 && block[i*16]) ff_h264_idct8_dc_add_mmx2(dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
454 else ff_h264_idct8_add_sse2 (dst + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
455 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
456 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
457 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
458
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
459 static void ff_h264_idct_add8_mmx(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
460 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
461 for(i=16; i<16+8; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
462 if(nnzc[ scan8[i] ] || block[i*16])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
463 ff_h264_idct_add_mmx (dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
464 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
465 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
466
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
467 static void ff_h264_idct_add8_mmx2(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
468 int i;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
469 for(i=16; i<16+8; i++){
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
470 if(nnzc[ scan8[i] ])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
471 ff_h264_idct_add_mmx (dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
472 else if(block[i*16])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
473 ff_h264_idct_dc_add_mmx2(dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
474 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
475 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
476
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 8519
diff changeset
477 #if CONFIG_GPL && HAVE_YASM
8510
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
478 static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
479 {
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
480 __asm__ volatile(
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
481 "movd %0, %%mm0 \n\t" // 0 0 X D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
482 "punpcklwd %1, %%mm0 \n\t" // x X d D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
483 "paddsw %2, %%mm0 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
484 "psraw $6, %%mm0 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
485 "punpcklwd %%mm0, %%mm0 \n\t" // d d D D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
486 "pxor %%mm1, %%mm1 \n\t" // 0 0 0 0
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
487 "psubw %%mm0, %%mm1 \n\t" // -d-d-D-D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
488 "packuswb %%mm1, %%mm0 \n\t" // -d-d-D-D d d D D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
489 "pshufw $0xFA, %%mm0, %%mm1 \n\t" // -d-d-d-d-D-D-D-D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
490 "punpcklwd %%mm0, %%mm0 \n\t" // d d d d D D D D
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
491 ::"m"(block[ 0]),
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
492 "m"(block[16]),
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
493 "m"(ff_pw_32)
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
494 );
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
495 __asm__ volatile(
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
496 "movq %0, %%mm2 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
497 "movq %1, %%mm3 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
498 "movq %2, %%mm4 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
499 "movq %3, %%mm5 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
500 "paddusb %%mm0, %%mm2 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
501 "paddusb %%mm0, %%mm3 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
502 "paddusb %%mm0, %%mm4 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
503 "paddusb %%mm0, %%mm5 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
504 "psubusb %%mm1, %%mm2 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
505 "psubusb %%mm1, %%mm3 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
506 "psubusb %%mm1, %%mm4 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
507 "psubusb %%mm1, %%mm5 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
508 "movq %%mm2, %0 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
509 "movq %%mm3, %1 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
510 "movq %%mm4, %2 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
511 "movq %%mm5, %3 \n\t"
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
512 :"+m"(*(uint64_t*)(dst+0*stride)),
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
513 "+m"(*(uint64_t*)(dst+1*stride)),
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
514 "+m"(*(uint64_t*)(dst+2*stride)),
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
515 "+m"(*(uint64_t*)(dst+3*stride))
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
516 );
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
517 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
518
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
519 extern void ff_x264_add8x4_idct_sse2(uint8_t *dst, int16_t *block, int stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
520
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
521 static void ff_h264_idct_add16_sse2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
522 int i;
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
523 for(i=0; i<16; i+=2)
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
524 if(nnzc[ scan8[i+0] ]|nnzc[ scan8[i+1] ])
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
525 ff_x264_add8x4_idct_sse2 (dst + block_offset[i], block + i*16, stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
526 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
527
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
528 static void ff_h264_idct_add16intra_sse2(uint8_t *dst, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
529 int i;
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
530 for(i=0; i<16; i+=2){
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
531 if(nnzc[ scan8[i+0] ]|nnzc[ scan8[i+1] ])
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
532 ff_x264_add8x4_idct_sse2 (dst + block_offset[i], block + i*16, stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
533 else if(block[i*16]|block[i*16+16])
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
534 ff_h264_idct_dc_add8_mmx2(dst + block_offset[i], block + i*16, stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
535 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
536 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
537
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
538 static void ff_h264_idct_add8_sse2(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
539 int i;
8758
93980b03673e fix typo in h264dsp_mmx (no effect currently as the function is not used), approved by Dark Shikari on IRC
bcoudurier
parents: 8590
diff changeset
540 for(i=16; i<16+8; i+=2){
8510
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
541 if(nnzc[ scan8[i+0] ]|nnzc[ scan8[i+1] ])
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
542 ff_x264_add8x4_idct_sse2 (dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
543 else if(block[i*16]|block[i*16+16])
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
544 ff_h264_idct_dc_add8_mmx2(dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
545 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
546 }
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
547 #endif
cea216e44ee3 Add x264 SSE2 iDCT functions to H.264 decoder.
darkshikari
parents: 8430
diff changeset
548
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
549 /***********************************/
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
550 /* deblocking */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
551
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
552 static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2],
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
553 int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
554 int dir;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
555 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
556 "movq %0, %%mm7 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
557 "movq %1, %%mm6 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
558 ::"m"(ff_pb_1), "m"(ff_pb_3)
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
559 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
560 if(field)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
561 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
562 "movq %0, %%mm6 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
563 ::"m"(ff_pb_3_1)
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
564 );
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
565 __asm__ volatile(
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
566 "movq %%mm6, %%mm5 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
567 "paddb %%mm5, %%mm5 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
568 :);
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
569
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
570 // could do a special case for dir==0 && edges==1, but it only reduces the
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
571 // average filter time by 1.2%
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
572 for( dir=1; dir>=0; dir-- ) {
10953
eb9a2581f50e Attempt to fix asm compilation failure.
michael
parents: 10943
diff changeset
573 const x86_reg d_idx = dir ? -8 : -1;
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
574 const int mask_mv = dir ? mask_mv1 : mask_mv0;
11369
98970e51365a Remove DECLARE_ALIGNED_{8,16} macros
mru
parents: 11017
diff changeset
575 DECLARE_ALIGNED(8, const uint64_t, mask_dir) = dir ? 0 : 0xffffffffffffffffULL;
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
576 int b_idx, edge;
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
577 for( b_idx=12, edge=0; edge<edges; edge+=step, b_idx+=8*step ) {
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
578 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
579 "pand %0, %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
580 ::"m"(mask_dir)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
581 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
582 if(!(mask_mv & edge)) {
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
583 if(bidir) {
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
584 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
585 "movd (%1,%0), %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
586 "punpckldq 40(%1,%0), %%mm2 \n" // { ref0[bn], ref1[bn] }
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
587 "pshufw $0x44, (%1), %%mm0 \n" // { ref0[b], ref0[b] }
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
588 "pshufw $0x44, 40(%1), %%mm1 \n" // { ref1[b], ref1[b] }
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
589 "pshufw $0x4E, %%mm2, %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
590 "psubb %%mm2, %%mm0 \n" // { ref0[b]!=ref0[bn], ref0[b]!=ref1[bn] }
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
591 "psubb %%mm3, %%mm1 \n" // { ref1[b]!=ref1[bn], ref1[b]!=ref0[bn] }
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
592 "1: \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
593 "por %%mm1, %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
594 "movq (%2,%0,4), %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
595 "movq 8(%2,%0,4), %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
596 "movq %%mm1, %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
597 "movq %%mm2, %%mm4 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
598 "psubw (%2), %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
599 "psubw 8(%2), %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
600 "psubw 160(%2), %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
601 "psubw 168(%2), %%mm4 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
602 "packsswb %%mm2, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
603 "packsswb %%mm4, %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
604 "paddb %%mm6, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
605 "paddb %%mm6, %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
606 "psubusb %%mm5, %%mm1 \n" // abs(mv[b] - mv[bn]) >= limit
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
607 "psubusb %%mm5, %%mm3 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
608 "packsswb %%mm3, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
609 "add $40, %0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
610 "cmp $40, %0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
611 "jl 1b \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
612 "sub $80, %0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
613 "pshufw $0x4E, %%mm1, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
614 "por %%mm1, %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
615 "pshufw $0x4E, %%mm0, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
616 "pminub %%mm1, %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
617 ::"r"(d_idx),
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
618 "r"(ref[0]+b_idx),
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
619 "r"(mv[0]+b_idx)
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
620 );
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
621 } else {
10938
2a50b786b888 Fix h264_loop_filter_strength_mmx2() so it works with b frames.
michael
parents: 10937
diff changeset
622 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
623 "movd (%1), %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
624 "psubb (%1,%0), %%mm0 \n" // ref[b] != ref[bn]
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
625 "movq (%2), %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
626 "movq 8(%2), %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
627 "psubw (%2,%0,4), %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
628 "psubw 8(%2,%0,4), %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
629 "packsswb %%mm2, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
630 "paddb %%mm6, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
631 "psubusb %%mm5, %%mm1 \n" // abs(mv[b] - mv[bn]) >= limit
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
632 "packsswb %%mm1, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
633 "por %%mm1, %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
634 ::"r"(d_idx),
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
635 "r"(ref[0]+b_idx),
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
636 "r"(mv[0]+b_idx)
10938
2a50b786b888 Fix h264_loop_filter_strength_mmx2() so it works with b frames.
michael
parents: 10937
diff changeset
637 );
2a50b786b888 Fix h264_loop_filter_strength_mmx2() so it works with b frames.
michael
parents: 10937
diff changeset
638 }
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
639 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
640 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
641 "movd %0, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
642 "por %1, %%mm1 \n" // nnz[b] || nnz[bn]
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
643 ::"m"(nnz[b_idx]),
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
644 "m"(nnz[b_idx+d_idx])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
645 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
646 __asm__ volatile(
11017
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
647 "pminub %%mm7, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
648 "pminub %%mm7, %%mm0 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
649 "psllw $1, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
650 "pxor %%mm2, %%mm2 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
651 "pmaxub %%mm0, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
652 "punpcklbw %%mm2, %%mm1 \n"
aa10bb3c244c optimize h264_loop_filter_strength_mmx2
lorenm
parents: 10961
diff changeset
653 "movq %%mm1, %0 \n"
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
654 :"=m"(*bS[dir][edge])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
655 ::"memory"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
656 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
657 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
658 edges = 4;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
659 step = 1;
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
660 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
661 __asm__ volatile(
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
662 "movq (%0), %%mm0 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
663 "movq 8(%0), %%mm1 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
664 "movq 16(%0), %%mm2 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
665 "movq 24(%0), %%mm3 \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
666 TRANSPOSE4(%%mm0, %%mm1, %%mm2, %%mm3, %%mm4)
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
667 "movq %%mm0, (%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
668 "movq %%mm3, 8(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
669 "movq %%mm4, 16(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
670 "movq %%mm2, 24(%0) \n\t"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
671 ::"r"(bS[0])
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
672 :"memory"
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
673 );
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
674 }
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
675
12454
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
676 #define LF_FUNC(DIR, TYPE, OPT) \
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
677 void ff_x264_deblock_ ## DIR ## _ ## TYPE ## _ ## OPT (uint8_t *pix, int stride, \
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
678 int alpha, int beta, int8_t *tc0);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
679 #define LF_IFUNC(DIR, TYPE, OPT) \
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
680 void ff_x264_deblock_ ## DIR ## _ ## TYPE ## _ ## OPT (uint8_t *pix, int stride, \
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
681 int alpha, int beta);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
682
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
683 LF_FUNC (h, chroma, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
684 LF_IFUNC(h, chroma_intra, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
685 LF_FUNC (v, chroma, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
686 LF_IFUNC(v, chroma_intra, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
687
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
688 LF_FUNC (h, luma, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
689 LF_IFUNC(h, luma_intra, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
690 #if HAVE_YASM && ARCH_X86_32
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
691 LF_FUNC (v8, luma, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
692 static void ff_x264_deblock_v_luma_mmxext(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
693 {
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
694 if((tc0[0] & tc0[1]) >= 0)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
695 ff_x264_deblock_v8_luma_mmxext(pix+0, stride, alpha, beta, tc0);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
696 if((tc0[2] & tc0[3]) >= 0)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
697 ff_x264_deblock_v8_luma_mmxext(pix+8, stride, alpha, beta, tc0+2);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
698 }
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
699 LF_IFUNC(v8, luma_intra, mmxext)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
700 static void ff_x264_deblock_v_luma_intra_mmxext(uint8_t *pix, int stride, int alpha, int beta)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
701 {
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
702 ff_x264_deblock_v8_luma_intra_mmxext(pix+0, stride, alpha, beta);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
703 ff_x264_deblock_v8_luma_intra_mmxext(pix+8, stride, alpha, beta);
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
704 }
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
705 #endif
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
706
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
707 LF_FUNC (h, luma, sse2)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
708 LF_IFUNC(h, luma_intra, sse2)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
709 LF_FUNC (v, luma, sse2)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
710 LF_IFUNC(v, luma_intra, sse2)
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
711
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
712 /***********************************/
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
713 /* weighted prediction */
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
714
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
715 #define H264_WEIGHT(W, H, OPT) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
716 void ff_h264_weight_ ## W ## x ## H ## _ ## OPT(uint8_t *dst, \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
717 int stride, int log2_denom, int weight, int offset);
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
718
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
719 #define H264_BIWEIGHT(W, H, OPT) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
720 void ff_h264_biweight_ ## W ## x ## H ## _ ## OPT(uint8_t *dst, \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
721 uint8_t *src, int stride, int log2_denom, int weightd, \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
722 int weights, int offset);
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
723
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
724 #define H264_BIWEIGHT_MMX(W,H) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
725 H264_WEIGHT (W, H, mmx2) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
726 H264_BIWEIGHT(W, H, mmx2)
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
727
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
728 #define H264_BIWEIGHT_MMX_SSE(W,H) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
729 H264_BIWEIGHT_MMX(W, H) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
730 H264_WEIGHT (W, H, sse2) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
731 H264_BIWEIGHT (W, H, sse2) \
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
732 H264_BIWEIGHT (W, H, ssse3)
8430
7768bdfd4f7b Rename libavcodec/i386/ --> libavcodec/x86/.
diego
parents:
diff changeset
733
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
734 H264_BIWEIGHT_MMX_SSE(16, 16)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
735 H264_BIWEIGHT_MMX_SSE(16, 8)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
736 H264_BIWEIGHT_MMX_SSE( 8, 16)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
737 H264_BIWEIGHT_MMX_SSE( 8, 8)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
738 H264_BIWEIGHT_MMX_SSE( 8, 4)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
739 H264_BIWEIGHT_MMX ( 4, 8)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
740 H264_BIWEIGHT_MMX ( 4, 4)
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
741 H264_BIWEIGHT_MMX ( 4, 2)
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
742
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
743 void ff_h264dsp_init_x86(H264DSPContext *c)
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
744 {
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
745 int mm_flags = mm_support();
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
746
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
747 if (mm_flags & AV_CPU_FLAG_MMX) {
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
748 c->h264_idct_dc_add=
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
749 c->h264_idct_add= ff_h264_idct_add_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
750 c->h264_idct8_dc_add=
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
751 c->h264_idct8_add= ff_h264_idct8_add_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
752
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
753 c->h264_idct_add16 = ff_h264_idct_add16_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
754 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
755 c->h264_idct_add8 = ff_h264_idct_add8_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
756 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
757
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
758 if (mm_flags & AV_CPU_FLAG_MMX2) {
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
759 c->h264_idct_dc_add= ff_h264_idct_dc_add_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
760 c->h264_idct8_dc_add= ff_h264_idct8_dc_add_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
761 c->h264_idct_add16 = ff_h264_idct_add16_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
762 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
763 c->h264_idct_add8 = ff_h264_idct_add8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
764 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
765
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
766 c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
767 }
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
768 if(mm_flags & AV_CPU_FLAG_SSE2){
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
769 c->h264_idct8_add = ff_h264_idct8_add_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
770 c->h264_idct8_add4= ff_h264_idct8_add4_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
771 }
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
772
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
773 #if HAVE_YASM
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
774 if (mm_flags & AV_CPU_FLAG_MMX2){
12454
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
775 c->h264_v_loop_filter_chroma= ff_x264_deblock_v_chroma_mmxext;
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
776 c->h264_h_loop_filter_chroma= ff_x264_deblock_h_chroma_mmxext;
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
777 c->h264_v_loop_filter_chroma_intra= ff_x264_deblock_v_chroma_intra_mmxext;
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
778 c->h264_h_loop_filter_chroma_intra= ff_x264_deblock_h_chroma_intra_mmxext;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
779 #if ARCH_X86_32
12454
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
780 c->h264_v_loop_filter_luma= ff_x264_deblock_v_luma_mmxext;
f4355cd85faa Port latest x264 deblock asm (before they moved to using NV12 as internal
rbultje
parents: 12451
diff changeset
781 c->h264_h_loop_filter_luma= ff_x264_deblock_h_luma_mmxext;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
782 c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_mmxext;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
783 c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_mmxext;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
784 #endif
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
785 c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
786 c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
787 c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
788 c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
789 c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
790 c->weight_h264_pixels_tab[5]= ff_h264_weight_4x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
791 c->weight_h264_pixels_tab[6]= ff_h264_weight_4x4_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
792 c->weight_h264_pixels_tab[7]= ff_h264_weight_4x2_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
793
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
794 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
795 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
796 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
797 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
798 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
799 c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
800 c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
801 c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
802
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
803 if (mm_flags&AV_CPU_FLAG_SSE2) {
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
804 c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
805 c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
806 c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
807 c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
808 c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
809
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
810 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_sse2;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
811 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
812 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_sse2;
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
813 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_sse2;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
814 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_sse2;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
815
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
816 #if ARCH_X86_64 || !defined(__ICC) || __ICC > 1110
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
817 c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
818 c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
819 c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
820 c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
821 #endif
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
822 #if CONFIG_GPL
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
823 c->h264_idct_add16 = ff_h264_idct_add16_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
824 c->h264_idct_add8 = ff_h264_idct_add8_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
825 c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2;
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
826 #endif
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
827 }
12456
a5ddb39627fd Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents: 12454
diff changeset
828 if (mm_flags&AV_CPU_FLAG_SSSE3) {
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
829 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
830 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3;
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
831 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3;
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
832 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3;
12451
4c3e6ff1237e Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
rbultje
parents: 12450
diff changeset
833 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3;
12450
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
834 }
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
835 }
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
836 #endif
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
837 }
3941687b4fa9 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
rbultje
parents: 12438
diff changeset
838 }