vp8_asm_stubs.c 16.7 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar's avatar
John Koleszar committed
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
6
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS.  All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
John Koleszar's avatar
John Koleszar committed
9
10
11
12
13
 */


#include "vpx_ports/config.h"
#include "vpx_ports/mem.h"
John Koleszar's avatar
John Koleszar committed
14
#include "vp8/common/subpixel.h"
John Koleszar's avatar
John Koleszar committed
15

16
17
18
19
#if CONFIG_SIXTEENTH_SUBPEL_UV
extern const short vp8_six_tap_mmx[16][6*8];
extern const short vp8_bilinear_filters_mmx[16][2*8];
#else
John Koleszar's avatar
John Koleszar committed
20
21
extern const short vp8_six_tap_mmx[8][6*8];
extern const short vp8_bilinear_filters_mmx[8][2*8];
22
23
24
#endif

//#define ANNOUNCE_FUNCTION
John Koleszar's avatar
John Koleszar committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

extern void vp8_filter_block1d_h6_mmx
(
    unsigned char   *src_ptr,
    unsigned short  *output_ptr,
    unsigned int    src_pixels_per_line,
    unsigned int    pixel_step,
    unsigned int    output_height,
    unsigned int    output_width,
    const short      *vp8_filter
);
extern void vp8_filter_block1dc_v6_mmx
(
    unsigned short *src_ptr,
    unsigned char  *output_ptr,
    int             output_pitch,
    unsigned int    pixels_per_line,
    unsigned int    pixel_step,
    unsigned int    output_height,
    unsigned int    output_width,
    const short    *vp8_filter
);
extern void vp8_filter_block1d8_h6_sse2
(
    unsigned char  *src_ptr,
    unsigned short *output_ptr,
    unsigned int    src_pixels_per_line,
    unsigned int    pixel_step,
    unsigned int    output_height,
    unsigned int    output_width,
    const short    *vp8_filter
);
extern void vp8_filter_block1d16_h6_sse2
(
    unsigned char  *src_ptr,
    unsigned short *output_ptr,
    unsigned int    src_pixels_per_line,
    unsigned int    pixel_step,
    unsigned int    output_height,
    unsigned int    output_width,
    const short    *vp8_filter
);
extern void vp8_filter_block1d8_v6_sse2
(
    unsigned short *src_ptr,
    unsigned char *output_ptr,
    int dst_ptich,
    unsigned int pixels_per_line,
    unsigned int pixel_step,
    unsigned int output_height,
    unsigned int output_width,
    const short    *vp8_filter
);
78
79
80
81
82
83
84
85
86
87
88
extern void vp8_filter_block1d16_v6_sse2
(
    unsigned short *src_ptr,
    unsigned char *output_ptr,
    int dst_ptich,
    unsigned int pixels_per_line,
    unsigned int pixel_step,
    unsigned int output_height,
    unsigned int output_width,
    const short    *vp8_filter
);
John Koleszar's avatar
John Koleszar committed
89
90
91
92
93
94
95
96
extern void vp8_unpack_block1d16_h6_sse2
(
    unsigned char  *src_ptr,
    unsigned short *output_ptr,
    unsigned int    src_pixels_per_line,
    unsigned int    output_height,
    unsigned int    output_width
);
97
extern void vp8_filter_block1d8_h6_only_sse2
John Koleszar's avatar
John Koleszar committed
98
99
100
(
    unsigned char  *src_ptr,
    unsigned int    src_pixels_per_line,
101
102
    unsigned char  *output_ptr,
    int dst_ptich,
John Koleszar's avatar
John Koleszar committed
103
    unsigned int    output_height,
104
    const short    *vp8_filter
John Koleszar's avatar
John Koleszar committed
105
);
106
extern void vp8_filter_block1d16_h6_only_sse2
John Koleszar's avatar
John Koleszar committed
107
(
108
109
110
    unsigned char  *src_ptr,
    unsigned int    src_pixels_per_line,
    unsigned char  *output_ptr,
John Koleszar's avatar
John Koleszar committed
111
    int dst_ptich,
112
113
    unsigned int    output_height,
    const short    *vp8_filter
John Koleszar's avatar
John Koleszar committed
114
);
115
extern void vp8_filter_block1d8_v6_only_sse2
John Koleszar's avatar
John Koleszar committed
116
(
117
118
    unsigned char *src_ptr,
    unsigned int   src_pixels_per_line,
John Koleszar's avatar
John Koleszar committed
119
120
    unsigned char *output_ptr,
    int dst_ptich,
121
122
    unsigned int   output_height,
    const short   *vp8_filter
John Koleszar's avatar
John Koleszar committed
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
);
extern prototype_subpixel_predict(vp8_bilinear_predict8x8_mmx);


#if HAVE_MMX
void vp8_sixtap_predict4x4_mmx
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
138
139
140
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict4x4_mmx\n");
#endif
141
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 16*16);  /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
    const short *HFilter, *VFilter;
    HFilter = vp8_six_tap_mmx[xoffset];
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 9, 8, HFilter);
    VFilter = vp8_six_tap_mmx[yoffset];
    vp8_filter_block1dc_v6_mmx(FData2 + 8, dst_ptr, dst_pitch, 8, 4 , 4, 4, VFilter);

}


void vp8_sixtap_predict16x16_mmx
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{

162
163
164
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict16x16_mmx\n");
#endif
165
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24);  /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

    const short *HFilter, *VFilter;


    HFilter = vp8_six_tap_mmx[xoffset];

    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),    FData2,   src_pixels_per_line, 1, 21, 32, HFilter);
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,  FData2 + 4, src_pixels_per_line, 1, 21, 32, HFilter);
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 8,  FData2 + 8, src_pixels_per_line, 1, 21, 32, HFilter);
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 12, FData2 + 12, src_pixels_per_line, 1, 21, 32, HFilter);

    VFilter = vp8_six_tap_mmx[yoffset];
    vp8_filter_block1dc_v6_mmx(FData2 + 32, dst_ptr,   dst_pitch, 32, 16 , 16, 16, VFilter);
    vp8_filter_block1dc_v6_mmx(FData2 + 36, dst_ptr + 4, dst_pitch, 32, 16 , 16, 16, VFilter);
    vp8_filter_block1dc_v6_mmx(FData2 + 40, dst_ptr + 8, dst_pitch, 32, 16 , 16, 16, VFilter);
    vp8_filter_block1dc_v6_mmx(FData2 + 44, dst_ptr + 12, dst_pitch, 32, 16 , 16, 16, VFilter);

}


void vp8_sixtap_predict8x8_mmx
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{

197
198
199
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x8_mmx\n");
#endif
200
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256);    /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

    const short *HFilter, *VFilter;

    HFilter = vp8_six_tap_mmx[xoffset];
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),    FData2,   src_pixels_per_line, 1, 13, 16, HFilter);
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,  FData2 + 4, src_pixels_per_line, 1, 13, 16, HFilter);

    VFilter = vp8_six_tap_mmx[yoffset];
    vp8_filter_block1dc_v6_mmx(FData2 + 16, dst_ptr,   dst_pitch, 16, 8 , 8, 8, VFilter);
    vp8_filter_block1dc_v6_mmx(FData2 + 20, dst_ptr + 4, dst_pitch, 16, 8 , 8, 8, VFilter);

}


void vp8_sixtap_predict8x4_mmx
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
225
226
227
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x4_mmx\n");
#endif
228
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256);    /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273

    const short *HFilter, *VFilter;

    HFilter = vp8_six_tap_mmx[xoffset];
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),    FData2,   src_pixels_per_line, 1, 9, 16, HFilter);
    vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,  FData2 + 4, src_pixels_per_line, 1, 9, 16, HFilter);

    VFilter = vp8_six_tap_mmx[yoffset];
    vp8_filter_block1dc_v6_mmx(FData2 + 16, dst_ptr,   dst_pitch, 16, 8 , 4, 8, VFilter);
    vp8_filter_block1dc_v6_mmx(FData2 + 20, dst_ptr + 4, dst_pitch, 16, 8 , 4, 8, VFilter);

}



void vp8_bilinear_predict16x16_mmx
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
    vp8_bilinear_predict8x8_mmx(src_ptr,   src_pixels_per_line, xoffset, yoffset, dst_ptr,   dst_pitch);
    vp8_bilinear_predict8x8_mmx(src_ptr + 8, src_pixels_per_line, xoffset, yoffset, dst_ptr + 8, dst_pitch);
    vp8_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line,   src_pixels_per_line, xoffset, yoffset, dst_ptr + dst_pitch * 8,   dst_pitch);
    vp8_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line + 8, src_pixels_per_line, xoffset, yoffset, dst_ptr + dst_pitch * 8 + 8, dst_pitch);
}
#endif


#if HAVE_SSE2
void vp8_sixtap_predict16x16_sse2
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch

)
{
274
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24);    /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
275
276

    const short *HFilter, *VFilter;
277
278
279
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict16x16_sse2\n");
#endif
John Koleszar's avatar
John Koleszar committed
280
281
282

    if (xoffset)
    {
283
284
285
286
287
288
289
290
291
        if (yoffset)
        {
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2,   src_pixels_per_line, 1, 21, 32, HFilter);
            VFilter = vp8_six_tap_mmx[yoffset];
            vp8_filter_block1d16_v6_sse2(FData2 + 32, dst_ptr,   dst_pitch, 32, 16 , 16, dst_pitch, VFilter);
        }
        else
        {
292
            /* First-pass only */
293
294
295
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d16_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, HFilter);
        }
John Koleszar's avatar
John Koleszar committed
296
297
298
    }
    else
    {
299
        /* Second-pass only */
John Koleszar's avatar
John Koleszar committed
300
        VFilter = vp8_six_tap_mmx[yoffset];
301
302
        vp8_unpack_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2,   src_pixels_per_line, 21, 32);
        vp8_filter_block1d16_v6_sse2(FData2 + 32, dst_ptr,   dst_pitch, 32, 16 , 16, dst_pitch, VFilter);
John Koleszar's avatar
John Koleszar committed
303
304
305
306
307
308
309
310
311
312
313
314
315
316
    }
}


void vp8_sixtap_predict8x8_sse2
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
317
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256);  /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
318
    const short *HFilter, *VFilter;
319
320
321
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x8_sse2\n");
#endif
John Koleszar's avatar
John Koleszar committed
322
323
324

    if (xoffset)
    {
325
326
327
328
329
330
331
332
333
        if (yoffset)
        {
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2,   src_pixels_per_line, 1, 13, 16, HFilter);
            VFilter = vp8_six_tap_mmx[yoffset];
            vp8_filter_block1d8_v6_sse2(FData2 + 16, dst_ptr,   dst_pitch, 16, 8 , 8, dst_pitch, VFilter);
        }
        else
        {
334
            /* First-pass only */
335
336
337
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 8, HFilter);
        }
John Koleszar's avatar
John Koleszar committed
338
339
340
    }
    else
    {
341
        /* Second-pass only */
John Koleszar's avatar
John Koleszar committed
342
        VFilter = vp8_six_tap_mmx[yoffset];
343
        vp8_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, VFilter);
John Koleszar's avatar
John Koleszar committed
344
345
346
347
348
349
350
351
352
353
354
355
356
357
    }
}


void vp8_sixtap_predict8x4_sse2
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
358
    DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256);  /* Temp data bufffer used in filtering */
John Koleszar's avatar
John Koleszar committed
359
    const short *HFilter, *VFilter;
360
361
362
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x4_sse2\n");
#endif
John Koleszar's avatar
John Koleszar committed
363
364
365

    if (xoffset)
    {
366
367
368
369
370
371
372
373
374
        if (yoffset)
        {
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2,   src_pixels_per_line, 1, 9, 16, HFilter);
            VFilter = vp8_six_tap_mmx[yoffset];
            vp8_filter_block1d8_v6_sse2(FData2 + 16, dst_ptr,   dst_pitch, 16, 8 , 4, dst_pitch, VFilter);
        }
        else
        {
375
            /* First-pass only */
376
377
378
            HFilter = vp8_six_tap_mmx[xoffset];
            vp8_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, HFilter);
        }
John Koleszar's avatar
John Koleszar committed
379
380
381
    }
    else
    {
382
        /* Second-pass only */
John Koleszar's avatar
John Koleszar committed
383
        VFilter = vp8_six_tap_mmx[yoffset];
384
        vp8_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, VFilter);
John Koleszar's avatar
John Koleszar committed
385
386
    }
}
387

John Koleszar's avatar
John Koleszar committed
388
#endif
389

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
#if HAVE_SSSE3

extern void vp8_filter_block1d8_h6_ssse3
(
    unsigned char  *src_ptr,
    unsigned int    src_pixels_per_line,
    unsigned char  *output_ptr,
    unsigned int    output_pitch,
    unsigned int    output_height,
    unsigned int    vp8_filter_index
);

extern void vp8_filter_block1d16_h6_ssse3
(
    unsigned char  *src_ptr,
    unsigned int    src_pixels_per_line,
    unsigned char  *output_ptr,
    unsigned int    output_pitch,
    unsigned int    output_height,
    unsigned int    vp8_filter_index
);

extern void vp8_filter_block1d16_v6_ssse3
(
    unsigned char *src_ptr,
    unsigned int   src_pitch,
    unsigned char *output_ptr,
    unsigned int   out_pitch,
    unsigned int   output_height,
    unsigned int   vp8_filter_index
);

extern void vp8_filter_block1d8_v6_ssse3
(
    unsigned char *src_ptr,
    unsigned int   src_pitch,
    unsigned char *output_ptr,
    unsigned int   out_pitch,
    unsigned int   output_height,
    unsigned int   vp8_filter_index
);

extern void vp8_filter_block1d4_h6_ssse3
(
    unsigned char  *src_ptr,
    unsigned int    src_pixels_per_line,
    unsigned char  *output_ptr,
    unsigned int    output_pitch,
    unsigned int    output_height,
    unsigned int    vp8_filter_index
);

extern void vp8_filter_block1d4_v6_ssse3
(
    unsigned char *src_ptr,
    unsigned int   src_pitch,
    unsigned char *output_ptr,
    unsigned int   out_pitch,
    unsigned int   output_height,
    unsigned int   vp8_filter_index
);

void vp8_sixtap_predict16x16_ssse3
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch

)
{
    DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 24*24);
464
465
466
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict16x16_ssse3\n");
#endif
467
468
469
470
471
472
473
474
475
476

    if (xoffset)
    {
        if (yoffset)
        {
            vp8_filter_block1d16_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 16, 21, xoffset);
            vp8_filter_block1d16_v6_ssse3(FData2 , 16, dst_ptr, dst_pitch, 16, yoffset);
        }
        else
        {
477
            /* First-pass only */
478
479
480
481
482
            vp8_filter_block1d16_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, xoffset);
        }
    }
    else
    {
483
        /* Second-pass only */
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
        vp8_filter_block1d16_v6_ssse3(src_ptr - (2 * src_pixels_per_line) , src_pixels_per_line, dst_ptr, dst_pitch, 16, yoffset);
    }
}

void vp8_sixtap_predict8x8_ssse3
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
    DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
499
500
501
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x8_ssse3\n");
#endif
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516

    if (xoffset)
    {
        if (yoffset)
        {
            vp8_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 8, 13, xoffset);
            vp8_filter_block1d8_v6_ssse3(FData2, 8, dst_ptr, dst_pitch, 8, yoffset);
        }
        else
        {
            vp8_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 8, xoffset);
        }
    }
    else
    {
517
        /* Second-pass only */
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
        vp8_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, yoffset);
    }
}


void vp8_sixtap_predict8x4_ssse3
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
    DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
534
535
536
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict8x4_ssse3\n");
#endif
537
538
539
540
541
542
543
544
545
546

    if (xoffset)
    {
        if (yoffset)
        {
            vp8_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 8, 9, xoffset);
            vp8_filter_block1d8_v6_ssse3(FData2, 8, dst_ptr, dst_pitch, 4, yoffset);
        }
        else
        {
547
            /* First-pass only */
548
549
550
551
552
            vp8_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, xoffset);
        }
    }
    else
    {
553
        /* Second-pass only */
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
        vp8_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, yoffset);
    }
}

void vp8_sixtap_predict4x4_ssse3
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
  DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 4*9);
569
570
571
#ifdef ANNOUNCE_FUNCTION
    printf("vp8_sixtap_predict4x4_ssse3\n");
#endif
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592

  if (xoffset)
  {
      if (yoffset)
      {
          vp8_filter_block1d4_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 4, 9, xoffset);
          vp8_filter_block1d4_v6_ssse3(FData2, 4, dst_ptr, dst_pitch, 4, yoffset);
      }
      else
      {
          vp8_filter_block1d4_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, xoffset);
      }
  }
  else
  {
      vp8_filter_block1d4_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, yoffset);
  }

}

#endif