1 /*****************************************************************************
2 * mc-c.c: h264 encoder library (Motion Compensation)
3 *****************************************************************************
4 * Copyright (C) 2003-2008 x264 project
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7 * Loren Merritt <lorenm@u.washington.edu>
8 * Fiona Glaser <fiona@x264.com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
23 *****************************************************************************/
29 #include "common/common.h"
32 #define DECL_SUF( func, args )\
33 void func##_mmxext args;\
34 void func##_sse2 args;\
35 void func##_ssse3 args;
37 DECL_SUF( x264_pixel_avg_16x16, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
38 DECL_SUF( x264_pixel_avg_16x8, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
39 DECL_SUF( x264_pixel_avg_8x16, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
40 DECL_SUF( x264_pixel_avg_8x8, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
41 DECL_SUF( x264_pixel_avg_8x4, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
42 DECL_SUF( x264_pixel_avg_4x8, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
43 DECL_SUF( x264_pixel_avg_4x4, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
44 DECL_SUF( x264_pixel_avg_4x2, ( uint8_t *, int, uint8_t *, int, uint8_t *, int, int ))
46 #define MC_WEIGHT(w,type) \
47 void x264_mc_weight_w##w##_##type( uint8_t *,int, uint8_t *,int, const x264_weight_t *,int );
49 #define MC_WEIGHT_OFFSET(w,type) \
50 void x264_mc_offsetadd_w##w##_##type( uint8_t *,int, uint8_t *,int, const x264_weight_t *,int ); \
51 void x264_mc_offsetsub_w##w##_##type( uint8_t *,int, uint8_t *,int, const x264_weight_t *,int ); \
54 MC_WEIGHT_OFFSET( 4, mmxext )
55 MC_WEIGHT_OFFSET( 8, mmxext )
56 MC_WEIGHT_OFFSET( 12, mmxext )
57 MC_WEIGHT_OFFSET( 16, mmxext )
58 MC_WEIGHT_OFFSET( 20, mmxext )
59 MC_WEIGHT_OFFSET( 12, sse2 )
60 MC_WEIGHT_OFFSET( 16, sse2 )
61 MC_WEIGHT_OFFSET( 20, sse2 )
65 MC_WEIGHT( 12, ssse3 )
66 MC_WEIGHT( 16, ssse3 )
67 MC_WEIGHT( 20, ssse3 )
71 void x264_mc_copy_w4_mmx( uint8_t *, int, uint8_t *, int, int );
72 void x264_mc_copy_w8_mmx( uint8_t *, int, uint8_t *, int, int );
73 void x264_mc_copy_w16_mmx( uint8_t *, int, uint8_t *, int, int );
74 void x264_mc_copy_w16_sse2( uint8_t *, int, uint8_t *, int, int );
75 void x264_mc_copy_w16_sse3( uint8_t *, int, uint8_t *, int, int );
76 void x264_mc_copy_w16_aligned_sse2( uint8_t *, int, uint8_t *, int, int );
77 void x264_prefetch_fenc_mmxext( uint8_t *, int, uint8_t *, int, int );
78 void x264_prefetch_ref_mmxext( uint8_t *, int, int );
79 void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
80 uint8_t *dst, int i_dst_stride,
81 int dx, int dy, int i_width, int i_height );
82 void x264_mc_chroma_sse2( uint8_t *src, int i_src_stride,
83 uint8_t *dst, int i_dst_stride,
84 int dx, int dy, int i_width, int i_height );
85 void x264_mc_chroma_ssse3( uint8_t *src, int i_src_stride,
86 uint8_t *dst, int i_dst_stride,
87 int dx, int dy, int i_width, int i_height );
88 void x264_mc_chroma_ssse3_cache64( uint8_t *src, int i_src_stride,
89 uint8_t *dst, int i_dst_stride,
90 int dx, int dy, int i_width, int i_height );
91 void x264_plane_copy_core_mmxext( uint8_t *, int, uint8_t *, int, int w, int h);
92 void x264_plane_copy_c( uint8_t *, int, uint8_t *, int, int w, int h);
93 void *x264_memcpy_aligned_mmx( void * dst, const void * src, size_t n );
94 void *x264_memcpy_aligned_sse2( void * dst, const void * src, size_t n );
95 void x264_memzero_aligned_mmx( void * dst, int n );
96 void x264_memzero_aligned_sse2( void * dst, int n );
97 void x264_integral_init4h_sse4( uint16_t *sum, uint8_t *pix, int stride );
98 void x264_integral_init8h_sse4( uint16_t *sum, uint8_t *pix, int stride );
99 void x264_integral_init4v_mmx( uint16_t *sum8, uint16_t *sum4, int stride );
100 void x264_integral_init4v_sse2( uint16_t *sum8, uint16_t *sum4, int stride );
101 void x264_integral_init8v_mmx( uint16_t *sum8, int stride );
102 void x264_integral_init8v_sse2( uint16_t *sum8, int stride );
103 void x264_integral_init4v_ssse3( uint16_t *sum8, uint16_t *sum4, int stride );
104 void x264_mbtree_propagate_cost_sse2( int *dst, uint16_t *propagate_in, uint16_t *intra_costs,
105 uint16_t *inter_costs, uint16_t *inv_qscales, int len );
107 void x264_frame_init_lowres_core_##cpu( uint8_t *src0, uint8_t *dst0, uint8_t *dsth, uint8_t *dstv, uint8_t *dstc,\
108 int src_stride, int dst_stride, int width, int height );
110 LOWRES(cache32_mmxext)
114 #define PIXEL_AVG_W(width,cpu)\
115 void x264_pixel_avg2_w##width##_##cpu( uint8_t *, int, uint8_t *, int, uint8_t *, int );
116 /* This declares some functions that don't exist, but that isn't a problem. */
117 #define PIXEL_AVG_WALL(cpu)\
118 PIXEL_AVG_W(4,cpu); PIXEL_AVG_W(8,cpu); PIXEL_AVG_W(12,cpu); PIXEL_AVG_W(16,cpu); PIXEL_AVG_W(20,cpu);
120 PIXEL_AVG_WALL(mmxext)
121 PIXEL_AVG_WALL(cache32_mmxext)
122 PIXEL_AVG_WALL(cache64_mmxext)
123 PIXEL_AVG_WALL(cache64_sse2)
125 PIXEL_AVG_WALL(sse2_misalign)
126 PIXEL_AVG_WALL(cache64_ssse3)
128 #define PIXEL_AVG_WTAB(instr, name1, name2, name3, name4, name5)\
129 static void (* const x264_pixel_avg_wtab_##instr[6])( uint8_t *, int, uint8_t *, int, uint8_t *, int ) =\
132 x264_pixel_avg2_w4_##name1,\
133 x264_pixel_avg2_w8_##name2,\
134 x264_pixel_avg2_w12_##name3,\
135 x264_pixel_avg2_w16_##name4,\
136 x264_pixel_avg2_w20_##name5,\
139 /* w16 sse2 is faster than w12 mmx as long as the cacheline issue is resolved */
140 #define x264_pixel_avg2_w12_cache64_sse2 x264_pixel_avg2_w16_cache64_sse2
141 #define x264_pixel_avg2_w12_sse3 x264_pixel_avg2_w16_sse3
142 #define x264_pixel_avg2_w12_sse2 x264_pixel_avg2_w16_sse2
144 PIXEL_AVG_WTAB(mmxext, mmxext, mmxext, mmxext, mmxext, mmxext)
146 PIXEL_AVG_WTAB(cache32_mmxext, mmxext, cache32_mmxext, cache32_mmxext, cache32_mmxext, cache32_mmxext)
147 PIXEL_AVG_WTAB(cache64_mmxext, mmxext, cache64_mmxext, cache64_mmxext, cache64_mmxext, cache64_mmxext)
149 PIXEL_AVG_WTAB(sse2, mmxext, mmxext, sse2, sse2, sse2)
150 PIXEL_AVG_WTAB(sse2_misalign, mmxext, mmxext, sse2, sse2, sse2_misalign)
151 PIXEL_AVG_WTAB(cache64_sse2, mmxext, cache64_mmxext, cache64_sse2, cache64_sse2, cache64_sse2)
152 PIXEL_AVG_WTAB(cache64_ssse3, mmxext, cache64_mmxext, cache64_sse2, cache64_ssse3, cache64_sse2)
154 #define MC_COPY_WTAB(instr, name1, name2, name3)\
155 static void (* const x264_mc_copy_wtab_##instr[5])( uint8_t *, int, uint8_t *, int, int ) =\
158 x264_mc_copy_w4_##name1,\
159 x264_mc_copy_w8_##name2,\
161 x264_mc_copy_w16_##name3,\
164 MC_COPY_WTAB(mmx,mmx,mmx,mmx)
165 MC_COPY_WTAB(sse2,mmx,mmx,sse2)
167 #define MC_WEIGHT_WTAB(function, instr, name1, name2, w12version)\
168 static void (* x264_mc_##function##_wtab_##instr[6])( uint8_t *, int, uint8_t *, int, const x264_weight_t *, int ) =\
170 x264_mc_##function##_w4_##name1,\
171 x264_mc_##function##_w4_##name1,\
172 x264_mc_##function##_w8_##name2,\
173 x264_mc_##function##_w##w12version##_##instr,\
174 x264_mc_##function##_w16_##instr,\
175 x264_mc_##function##_w20_##instr,\
178 MC_WEIGHT_WTAB(weight,mmxext,mmxext,mmxext,12)
179 MC_WEIGHT_WTAB(offsetadd,mmxext,mmxext,mmxext,12)
180 MC_WEIGHT_WTAB(offsetsub,mmxext,mmxext,mmxext,12)
181 MC_WEIGHT_WTAB(weight,sse2,mmxext,sse2,16)
182 MC_WEIGHT_WTAB(offsetadd,sse2,mmxext,mmxext,16)
183 MC_WEIGHT_WTAB(offsetsub,sse2,mmxext,mmxext,16)
184 MC_WEIGHT_WTAB(weight,ssse3,ssse3,ssse3,16)
186 static void x264_weight_cache_mmxext( x264_t *h, x264_weight_t *w )
191 if( w->i_scale == 1<<w->i_denom )
193 if( w->i_offset < 0 )
194 w->weightfn = h->mc.offsetsub;
196 w->weightfn = h->mc.offsetadd;
197 memset( w->cachea, abs(w->i_offset), sizeof(w->cachea) );
200 w->weightfn = h->mc.weight;
201 den1 = 1 << (w->i_denom - 1) | w->i_offset << w->i_denom;
202 for( i = 0; i < 8; i++ )
204 w->cachea[i] = w->i_scale;
209 static void x264_weight_cache_ssse3( x264_t *h, x264_weight_t *w )
212 if( w->i_scale == 1<<w->i_denom )
214 if( w->i_offset < 0 )
215 w->weightfn = h->mc.offsetsub;
217 w->weightfn = h->mc.offsetadd;
219 memset( w->cachea, abs( w->i_offset ), sizeof(w->cachea) );
222 w->weightfn = h->mc.weight;
223 den1 = w->i_scale << (8 - w->i_denom);
227 w->cacheb[i] = w->i_offset;
231 static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
232 static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
234 #define MC_LUMA(name,instr1,instr2)\
235 static void mc_luma_##name( uint8_t *dst, int i_dst_stride,\
236 uint8_t *src[4], int i_src_stride,\
238 int i_width, int i_height, const x264_weight_t *weight )\
240 int qpel_idx = ((mvy&3)<<2) + (mvx&3);\
241 int offset = (mvy>>2)*i_src_stride + (mvx>>2);\
242 uint8_t *src1 = src[hpel_ref0[qpel_idx]] + offset + ((mvy&3) == 3) * i_src_stride;\
243 if( qpel_idx & 5 ) /* qpel interpolation needed */\
245 uint8_t *src2 = src[hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);\
246 x264_pixel_avg_wtab_##instr1[i_width>>2](\
247 dst, i_dst_stride, src1, i_src_stride,\
249 if( weight->weightfn )\
250 weight->weightfn[i_width>>2]( dst, i_dst_stride, dst, i_dst_stride, weight, i_height );\
252 else if( weight->weightfn )\
253 weight->weightfn[i_width>>2]( dst, i_dst_stride, src1, i_src_stride, weight, i_height );\
255 x264_mc_copy_wtab_##instr2[i_width>>2](dst, i_dst_stride, src1, i_src_stride, i_height );\
258 MC_LUMA(mmxext,mmxext,mmx)
260 MC_LUMA(cache32_mmxext,cache32_mmxext,mmx)
261 MC_LUMA(cache64_mmxext,cache64_mmxext,mmx)
263 MC_LUMA(sse2,sse2,sse2)
264 MC_LUMA(cache64_sse2,cache64_sse2,sse2)
265 MC_LUMA(cache64_ssse3,cache64_ssse3,sse2)
267 #define GET_REF(name)\
268 static uint8_t *get_ref_##name( uint8_t *dst, int *i_dst_stride,\
269 uint8_t *src[4], int i_src_stride,\
271 int i_width, int i_height, const x264_weight_t *weight )\
273 int qpel_idx = ((mvy&3)<<2) + (mvx&3);\
274 int offset = (mvy>>2)*i_src_stride + (mvx>>2);\
275 uint8_t *src1 = src[hpel_ref0[qpel_idx]] + offset + ((mvy&3) == 3) * i_src_stride;\
276 if( qpel_idx & 5 ) /* qpel interpolation needed */\
278 uint8_t *src2 = src[hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);\
279 x264_pixel_avg_wtab_##name[i_width>>2](\
280 dst, *i_dst_stride, src1, i_src_stride,\
282 if( weight->weightfn )\
283 weight->weightfn[i_width>>2]( dst, *i_dst_stride, dst, *i_dst_stride, weight, i_height );\
286 else if( weight->weightfn )\
288 weight->weightfn[i_width>>2]( dst, *i_dst_stride, src1, i_src_stride, weight, i_height );\
293 *i_dst_stride = i_src_stride;\
300 GET_REF(cache32_mmxext)
301 GET_REF(cache64_mmxext)
304 GET_REF(sse2_misalign)
305 GET_REF(cache64_sse2)
306 GET_REF(cache64_ssse3)
308 #define HPEL(align, cpu, cpuv, cpuc, cpuh)\
309 void x264_hpel_filter_v_##cpuv( uint8_t *dst, uint8_t *src, int16_t *buf, int stride, int width);\
310 void x264_hpel_filter_c_##cpuc( uint8_t *dst, int16_t *buf, int width );\
311 void x264_hpel_filter_h_##cpuh( uint8_t *dst, uint8_t *src, int width );\
312 static void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\
313 int stride, int width, int height, int16_t *buf )\
315 int realign = (intptr_t)src & (align-1);\
323 x264_hpel_filter_v_##cpuv( dstv, src, buf+8, stride, width );\
324 x264_hpel_filter_c_##cpuc( dstc, buf+8, width );\
325 x264_hpel_filter_h_##cpuh( dsth, src, width );\
334 HPEL(8, mmxext, mmxext, mmxext, mmxext)
335 HPEL(16, sse2_amd, mmxext, mmxext, sse2)
337 void x264_hpel_filter_sse2( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src, int stride, int width, int height, int16_t *buf );
338 void x264_hpel_filter_ssse3( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src, int stride, int width, int height, int16_t *buf );
340 HPEL(16, sse2, sse2, sse2, sse2)
341 HPEL(16, ssse3, ssse3, ssse3, ssse3)
343 HPEL(16, sse2_misalign, sse2, sse2_misalign, sse2)
345 static void x264_plane_copy_mmxext( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int w, int h)
347 if( w < 256 ) { // tiny resolutions don't want non-temporal hints. dunno the exact threshold.
348 x264_plane_copy_c( dst, i_dst, src, i_src, w, h );
349 } else if(i_src > 0) {
350 // have to use plain memcpy on the last line (in memory order) to avoid overreading src
351 x264_plane_copy_core_mmxext( dst, i_dst, src, i_src, (w+15)&~15, h-1 );
352 memcpy( dst+i_dst*(h-1), src+i_src*(h-1), w );
354 memcpy( dst, src, w );
355 x264_plane_copy_core_mmxext( dst+i_dst, i_dst, src+i_src, i_src, (w+15)&~15, h-1 );
359 void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
361 if( !(cpu&X264_CPU_MMX) )
364 pf->copy_16x16_unaligned = x264_mc_copy_w16_mmx;
365 pf->copy[PIXEL_16x16] = x264_mc_copy_w16_mmx;
366 pf->copy[PIXEL_8x8] = x264_mc_copy_w8_mmx;
367 pf->copy[PIXEL_4x4] = x264_mc_copy_w4_mmx;
368 pf->memcpy_aligned = x264_memcpy_aligned_mmx;
369 pf->memzero_aligned = x264_memzero_aligned_mmx;
370 pf->integral_init4v = x264_integral_init4v_mmx;
371 pf->integral_init8v = x264_integral_init8v_mmx;
373 if( !(cpu&X264_CPU_MMXEXT) )
376 pf->mc_luma = mc_luma_mmxext;
377 pf->get_ref = get_ref_mmxext;
378 pf->mc_chroma = x264_mc_chroma_mmxext;
380 pf->weight = x264_mc_weight_wtab_mmxext;
381 pf->offsetadd = x264_mc_offsetadd_wtab_mmxext;
382 pf->offsetsub = x264_mc_offsetsub_wtab_mmxext;
383 pf->weight_cache = x264_weight_cache_mmxext;
385 pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_mmxext;
386 pf->avg[PIXEL_16x8] = x264_pixel_avg_16x8_mmxext;
387 pf->avg[PIXEL_8x16] = x264_pixel_avg_8x16_mmxext;
388 pf->avg[PIXEL_8x8] = x264_pixel_avg_8x8_mmxext;
389 pf->avg[PIXEL_8x4] = x264_pixel_avg_8x4_mmxext;
390 pf->avg[PIXEL_4x8] = x264_pixel_avg_4x8_mmxext;
391 pf->avg[PIXEL_4x4] = x264_pixel_avg_4x4_mmxext;
392 pf->avg[PIXEL_4x2] = x264_pixel_avg_4x2_mmxext;
394 pf->plane_copy = x264_plane_copy_mmxext;
395 pf->hpel_filter = x264_hpel_filter_mmxext;
396 pf->frame_init_lowres_core = x264_frame_init_lowres_core_mmxext;
398 pf->prefetch_fenc = x264_prefetch_fenc_mmxext;
399 pf->prefetch_ref = x264_prefetch_ref_mmxext;
401 #ifdef ARCH_X86 // all x86_64 cpus with cacheline split issues use sse2 instead
402 if( cpu&X264_CPU_CACHELINE_32 )
404 pf->mc_luma = mc_luma_cache32_mmxext;
405 pf->get_ref = get_ref_cache32_mmxext;
406 pf->frame_init_lowres_core = x264_frame_init_lowres_core_cache32_mmxext;
408 else if( cpu&X264_CPU_CACHELINE_64 )
410 pf->mc_luma = mc_luma_cache64_mmxext;
411 pf->get_ref = get_ref_cache64_mmxext;
412 pf->frame_init_lowres_core = x264_frame_init_lowres_core_cache32_mmxext;
416 if( !(cpu&X264_CPU_SSE2) )
419 pf->memcpy_aligned = x264_memcpy_aligned_sse2;
420 pf->memzero_aligned = x264_memzero_aligned_sse2;
421 pf->integral_init4v = x264_integral_init4v_sse2;
422 pf->integral_init8v = x264_integral_init8v_sse2;
423 pf->hpel_filter = x264_hpel_filter_sse2_amd;
424 pf->mbtree_propagate_cost = x264_mbtree_propagate_cost_sse2;
426 if( cpu&X264_CPU_SSE2_IS_SLOW )
429 pf->weight = x264_mc_weight_wtab_sse2;
430 pf->offsetadd = x264_mc_offsetadd_wtab_sse2;
431 pf->offsetsub = x264_mc_offsetsub_wtab_sse2;
433 pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_sse2;
434 pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_sse2;
435 pf->avg[PIXEL_16x8] = x264_pixel_avg_16x8_sse2;
436 pf->avg[PIXEL_8x16] = x264_pixel_avg_8x16_sse2;
437 pf->avg[PIXEL_8x8] = x264_pixel_avg_8x8_sse2;
438 pf->avg[PIXEL_8x4] = x264_pixel_avg_8x4_sse2;
439 pf->hpel_filter = x264_hpel_filter_sse2;
440 if( cpu&X264_CPU_SSE_MISALIGN )
441 pf->hpel_filter = x264_hpel_filter_sse2_misalign;
442 pf->frame_init_lowres_core = x264_frame_init_lowres_core_sse2;
443 pf->mc_chroma = x264_mc_chroma_sse2;
445 if( cpu&X264_CPU_SSE2_IS_FAST )
447 pf->mc_luma = mc_luma_sse2;
448 pf->get_ref = get_ref_sse2;
449 if( cpu&X264_CPU_CACHELINE_64 )
451 pf->mc_luma = mc_luma_cache64_sse2;
452 pf->get_ref = get_ref_cache64_sse2;
454 if( cpu&X264_CPU_SSE_MISALIGN )
455 pf->get_ref = get_ref_sse2_misalign;
458 if( !(cpu&X264_CPU_SSSE3) )
461 pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_ssse3;
462 pf->avg[PIXEL_16x8] = x264_pixel_avg_16x8_ssse3;
463 pf->avg[PIXEL_8x16] = x264_pixel_avg_8x16_ssse3;
464 pf->avg[PIXEL_8x8] = x264_pixel_avg_8x8_ssse3;
465 pf->avg[PIXEL_8x4] = x264_pixel_avg_8x4_ssse3;
466 pf->avg[PIXEL_4x8] = x264_pixel_avg_4x8_ssse3;
467 pf->avg[PIXEL_4x4] = x264_pixel_avg_4x4_ssse3;
468 pf->avg[PIXEL_4x2] = x264_pixel_avg_4x2_ssse3;
470 pf->hpel_filter = x264_hpel_filter_ssse3;
471 pf->frame_init_lowres_core = x264_frame_init_lowres_core_ssse3;
472 pf->mc_chroma = x264_mc_chroma_ssse3;
473 if( cpu&X264_CPU_CACHELINE_64 )
475 pf->mc_chroma = x264_mc_chroma_ssse3_cache64;
476 pf->mc_luma = mc_luma_cache64_ssse3;
477 pf->get_ref = get_ref_cache64_ssse3;
479 /* ssse3 weight is slower on Nehalem, so only assign here. */
480 pf->weight_cache = x264_weight_cache_ssse3;
481 pf->weight = x264_mc_weight_wtab_ssse3;
484 if( cpu&X264_CPU_SHUFFLE_IS_FAST )
485 pf->integral_init4v = x264_integral_init4v_ssse3;
487 if( !(cpu&X264_CPU_SSE4) )
490 pf->integral_init4h = x264_integral_init4h_sse4;
491 pf->integral_init8h = x264_integral_init8h_sse4;