vp9_asm_stubs.c 28.1 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2014 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
#include <assert.h>
John Koleszar's avatar
John Koleszar committed
12

13
#include "./vpx_config.h"
14
#include "./vp9_rtcd.h"
John Koleszar's avatar
John Koleszar committed
15
#include "vpx_ports/mem.h"
16

17 18
typedef void filter8_1dfunction (
  const unsigned char *src_ptr,
19
  const ptrdiff_t src_pitch,
20
  unsigned char *output_ptr,
21
  ptrdiff_t out_pitch,
22 23 24
  unsigned int output_height,
  const short *filter
);
25

26
#define FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \
27
  void vp9_convolve8_##name##_##opt(const uint8_t *src, ptrdiff_t src_stride, \
28 29 30 31
                                   uint8_t *dst, ptrdiff_t dst_stride, \
                                   const int16_t *filter_x, int x_step_q4, \
                                   const int16_t *filter_y, int y_step_q4, \
                                   int w, int h) { \
32
  if (step_q4 == 16 && filter[3] != 128) { \
33 34
    if (filter[0] || filter[1] || filter[2]) { \
      while (w >= 16) { \
35 36 37 38 39 40
        vp9_filter_block1d16_##dir##8_##avg##opt(src_start, \
                                                 src_stride, \
                                                 dst, \
                                                 dst_stride, \
                                                 h, \
                                                 filter); \
41 42 43 44 45
        src += 16; \
        dst += 16; \
        w -= 16; \
      } \
      while (w >= 8) { \
46 47 48 49 50 51
        vp9_filter_block1d8_##dir##8_##avg##opt(src_start, \
                                                src_stride, \
                                                dst, \
                                                dst_stride, \
                                                h, \
                                                filter); \
52 53 54 55 56
        src += 8; \
        dst += 8; \
        w -= 8; \
      } \
      while (w >= 4) { \
57 58 59 60 61 62
        vp9_filter_block1d4_##dir##8_##avg##opt(src_start, \
                                                src_stride, \
                                                dst, \
                                                dst_stride, \
                                                h, \
                                                filter); \
63 64 65 66 67 68
        src += 4; \
        dst += 4; \
        w -= 4; \
      } \
    } else { \
      while (w >= 16) { \
69 70 71 72 73 74
        vp9_filter_block1d16_##dir##2_##avg##opt(src, \
                                                 src_stride, \
                                                 dst, \
                                                 dst_stride, \
                                                 h, \
                                                 filter); \
75 76 77 78 79
        src += 16; \
        dst += 16; \
        w -= 16; \
      } \
      while (w >= 8) { \
80 81 82 83 84 85
        vp9_filter_block1d8_##dir##2_##avg##opt(src, \
                                                src_stride, \
                                                dst, \
                                                dst_stride, \
                                                h, \
                                                filter); \
86 87 88 89 90
        src += 8; \
        dst += 8; \
        w -= 8; \
      } \
      while (w >= 4) { \
91 92 93 94 95 96
        vp9_filter_block1d4_##dir##2_##avg##opt(src, \
                                                src_stride, \
                                                dst, \
                                                dst_stride, \
                                                h, \
                                                filter); \
97 98 99 100
        src += 4; \
        dst += 4; \
        w -= 4; \
      } \
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
    } \
  } \
  if (w) { \
    vp9_convolve8_##name##_c(src, src_stride, dst, dst_stride, \
                             filter_x, x_step_q4, filter_y, y_step_q4, \
                             w, h); \
  } \
}

#define FUN_CONV_2D(avg, opt) \
void vp9_convolve8_##avg##opt(const uint8_t *src, ptrdiff_t src_stride, \
                              uint8_t *dst, ptrdiff_t dst_stride, \
                              const int16_t *filter_x, int x_step_q4, \
                              const int16_t *filter_y, int y_step_q4, \
                              int w, int h) { \
  assert(w <= 64); \
  assert(h <= 64); \
  if (x_step_q4 == 16 && y_step_q4 == 16) { \
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
    if (filter_x[0] || filter_x[1] || filter_x[2] || filter_x[3] == 128 || \
        filter_y[0] || filter_y[1] || filter_y[2] || filter_y[3] == 128) { \
      DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 71); \
      vp9_convolve8_horiz_##opt(src - 3 * src_stride, src_stride, fdata2, 64, \
                                filter_x, x_step_q4, filter_y, y_step_q4, \
                                w, h + 7); \
      vp9_convolve8_##avg##vert_##opt(fdata2 + 3 * 64, 64, dst, dst_stride, \
                                      filter_x, x_step_q4, filter_y, \
                                      y_step_q4, w, h); \
    } else { \
      DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 65); \
      vp9_convolve8_horiz_##opt(src, src_stride, fdata2, 64, \
                                filter_x, x_step_q4, filter_y, y_step_q4, \
                                w, h + 1); \
      vp9_convolve8_##avg##vert_##opt(fdata2, 64, dst, dst_stride, \
                                      filter_x, x_step_q4, filter_y, \
                                      y_step_q4, w, h); \
    } \
137 138 139 140 141
  } else { \
    vp9_convolve8_##avg##c(src, src_stride, dst, dst_stride, \
                           filter_x, x_step_q4, filter_y, y_step_q4, w, h); \
  } \
}
142 143 144

#if CONFIG_VP9_HIGHBITDEPTH

145
typedef void highbd_filter8_1dfunction (
146 147 148 149 150 151 152 153 154 155
  const uint16_t *src_ptr,
  const ptrdiff_t src_pitch,
  uint16_t *output_ptr,
  ptrdiff_t out_pitch,
  unsigned int output_height,
  const int16_t *filter,
  int bd
);

#define HIGH_FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \
156 157 158 159 160 161 162 163 164
  void vp9_highbd_convolve8_##name##_##opt(const uint8_t *src8, \
                                           ptrdiff_t src_stride, \
                                           uint8_t *dst8, \
                                           ptrdiff_t dst_stride, \
                                           const int16_t *filter_x, \
                                           int x_step_q4, \
                                           const int16_t *filter_y, \
                                           int y_step_q4, \
                                           int w, int h, int bd) { \
165 166 167 168 169
  if (step_q4 == 16 && filter[3] != 128) { \
    uint16_t *src = CONVERT_TO_SHORTPTR(src8); \
    uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \
    if (filter[0] || filter[1] || filter[2]) { \
      while (w >= 16) { \
170 171 172 173 174 175 176
        vp9_highbd_filter_block1d16_##dir##8_##avg##opt(src_start, \
                                                        src_stride, \
                                                        dst, \
                                                        dst_stride, \
                                                        h, \
                                                        filter, \
                                                        bd); \
177 178 179 180 181
        src += 16; \
        dst += 16; \
        w -= 16; \
      } \
      while (w >= 8) { \
182 183 184 185 186 187 188
        vp9_highbd_filter_block1d8_##dir##8_##avg##opt(src_start, \
                                                       src_stride, \
                                                       dst, \
                                                       dst_stride, \
                                                       h, \
                                                       filter, \
                                                       bd); \
189 190 191 192 193
        src += 8; \
        dst += 8; \
        w -= 8; \
      } \
      while (w >= 4) { \
194 195 196 197 198 199 200
        vp9_highbd_filter_block1d4_##dir##8_##avg##opt(src_start, \
                                                       src_stride, \
                                                       dst, \
                                                       dst_stride, \
                                                       h, \
                                                       filter, \
                                                       bd); \
201 202 203 204 205 206
        src += 4; \
        dst += 4; \
        w -= 4; \
      } \
    } else { \
      while (w >= 16) { \
207 208 209 210 211 212 213
        vp9_highbd_filter_block1d16_##dir##2_##avg##opt(src, \
                                                        src_stride, \
                                                        dst, \
                                                        dst_stride, \
                                                        h, \
                                                        filter, \
                                                        bd); \
214 215 216 217 218
        src += 16; \
        dst += 16; \
        w -= 16; \
      } \
      while (w >= 8) { \
219 220 221 222 223 224 225
        vp9_highbd_filter_block1d8_##dir##2_##avg##opt(src, \
                                                       src_stride, \
                                                       dst, \
                                                       dst_stride, \
                                                       h, \
                                                       filter, \
                                                       bd); \
226 227 228 229 230
        src += 8; \
        dst += 8; \
        w -= 8; \
      } \
      while (w >= 4) { \
231 232 233 234 235 236 237
        vp9_highbd_filter_block1d4_##dir##2_##avg##opt(src, \
                                                       src_stride, \
                                                       dst, \
                                                       dst_stride, \
                                                       h, \
                                                       filter, \
                                                       bd); \
238 239 240 241 242 243 244
        src += 4; \
        dst += 4; \
        w -= 4; \
      } \
    } \
  } \
  if (w) { \
245 246 247
    vp9_highbd_convolve8_##name##_c(src8, src_stride, dst8, dst_stride, \
                                    filter_x, x_step_q4, filter_y, y_step_q4, \
                                    w, h, bd); \
248 249 250 251
  } \
}

#define HIGH_FUN_CONV_2D(avg, opt) \
252 253 254 255 256
void vp9_highbd_convolve8_##avg##opt(const uint8_t *src, ptrdiff_t src_stride, \
                                     uint8_t *dst, ptrdiff_t dst_stride, \
                                     const int16_t *filter_x, int x_step_q4, \
                                     const int16_t *filter_y, int y_step_q4, \
                                     int w, int h, int bd) { \
257 258 259 260 261 262
  assert(w <= 64); \
  assert(h <= 64); \
  if (x_step_q4 == 16 && y_step_q4 == 16) { \
    if (filter_x[0] || filter_x[1] || filter_x[2] || filter_x[3] == 128 || \
        filter_y[0] || filter_y[1] || filter_y[2] || filter_y[3] == 128) { \
      DECLARE_ALIGNED_ARRAY(16, uint16_t, fdata2, 64 * 71); \
263 264 265 266 267 268 269 270 271 272
      vp9_highbd_convolve8_horiz_##opt(src - 3 * src_stride, src_stride, \
                                       CONVERT_TO_BYTEPTR(fdata2), 64, \
                                       filter_x, x_step_q4, \
                                       filter_y, y_step_q4, \
                                       w, h + 7, bd); \
      vp9_highbd_convolve8_##avg##vert_##opt(CONVERT_TO_BYTEPTR(fdata2) + 192, \
                                             64, dst, dst_stride, \
                                             filter_x, x_step_q4, \
                                             filter_y, y_step_q4, \
                                             w, h, bd); \
273 274
    } else { \
      DECLARE_ALIGNED_ARRAY(16, uint16_t, fdata2, 64 * 65); \
275 276 277 278 279 280 281 282 283 284
      vp9_highbd_convolve8_horiz_##opt(src, src_stride, \
                                       CONVERT_TO_BYTEPTR(fdata2), 64, \
                                       filter_x, x_step_q4, \
                                       filter_y, y_step_q4, \
                                       w, h + 1, bd); \
      vp9_highbd_convolve8_##avg##vert_##opt(CONVERT_TO_BYTEPTR(fdata2), 64, \
                                             dst, dst_stride, \
                                             filter_x, x_step_q4, \
                                             filter_y, y_step_q4, \
                                             w, h, bd); \
285 286
    } \
  } else { \
287 288 289
    vp9_highbd_convolve8_##avg##c(src, src_stride, dst, dst_stride, \
                                  filter_x, x_step_q4, filter_y, y_step_q4, w, \
                                  h, bd); \
290 291 292 293
  } \
}
#endif  // CONFIG_VP9_HIGHBITDEPTH

Johann's avatar
Johann committed
294
#if HAVE_AVX2 && HAVE_SSSE3
levytamar82's avatar
levytamar82 committed
295 296
filter8_1dfunction vp9_filter_block1d16_v8_avx2;
filter8_1dfunction vp9_filter_block1d16_h8_avx2;
levytamar82's avatar
levytamar82 committed
297
filter8_1dfunction vp9_filter_block1d4_v8_ssse3;
Johann's avatar
Johann committed
298
#if ARCH_X86_64
levytamar82's avatar
levytamar82 committed
299 300 301 302 303 304
filter8_1dfunction vp9_filter_block1d8_v8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d8_h8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d4_h8_intrin_ssse3;
#define vp9_filter_block1d8_v8_avx2 vp9_filter_block1d8_v8_intrin_ssse3
#define vp9_filter_block1d8_h8_avx2 vp9_filter_block1d8_h8_intrin_ssse3
#define vp9_filter_block1d4_h8_avx2 vp9_filter_block1d4_h8_intrin_ssse3
Johann's avatar
Johann committed
305
#else  // ARCH_X86
levytamar82's avatar
levytamar82 committed
306 307 308
filter8_1dfunction vp9_filter_block1d8_v8_ssse3;
filter8_1dfunction vp9_filter_block1d8_h8_ssse3;
filter8_1dfunction vp9_filter_block1d4_h8_ssse3;
levytamar82's avatar
levytamar82 committed
309 310 311
#define vp9_filter_block1d8_v8_avx2 vp9_filter_block1d8_v8_ssse3
#define vp9_filter_block1d8_h8_avx2 vp9_filter_block1d8_h8_ssse3
#define vp9_filter_block1d4_h8_avx2 vp9_filter_block1d4_h8_ssse3
Johann's avatar
Johann committed
312
#endif  // ARCH_X86_64 / ARCH_X86
levytamar82's avatar
levytamar82 committed
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
filter8_1dfunction vp9_filter_block1d16_v2_ssse3;
filter8_1dfunction vp9_filter_block1d16_h2_ssse3;
filter8_1dfunction vp9_filter_block1d8_v2_ssse3;
filter8_1dfunction vp9_filter_block1d8_h2_ssse3;
filter8_1dfunction vp9_filter_block1d4_v2_ssse3;
filter8_1dfunction vp9_filter_block1d4_h2_ssse3;
#define vp9_filter_block1d4_v8_avx2 vp9_filter_block1d4_v8_ssse3
#define vp9_filter_block1d16_v2_avx2 vp9_filter_block1d16_v2_ssse3
#define vp9_filter_block1d16_h2_avx2 vp9_filter_block1d16_h2_ssse3
#define vp9_filter_block1d8_v2_avx2  vp9_filter_block1d8_v2_ssse3
#define vp9_filter_block1d8_h2_avx2  vp9_filter_block1d8_h2_ssse3
#define vp9_filter_block1d4_v2_avx2  vp9_filter_block1d4_v2_ssse3
#define vp9_filter_block1d4_h2_avx2  vp9_filter_block1d4_h2_ssse3
// void vp9_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride,
//                                uint8_t *dst, ptrdiff_t dst_stride,
//                                const int16_t *filter_x, int x_step_q4,
//                                const int16_t *filter_y, int y_step_q4,
//                                int w, int h);
// void vp9_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride,
//                               uint8_t *dst, ptrdiff_t dst_stride,
//                               const int16_t *filter_x, int x_step_q4,
//                               const int16_t *filter_y, int y_step_q4,
//                               int w, int h);
FUN_CONV_1D(horiz, x_step_q4, filter_x, h, src, , avx2);
FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , avx2);
338

levytamar82's avatar
levytamar82 committed
339 340 341 342 343 344
// void vp9_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride,
//                          uint8_t *dst, ptrdiff_t dst_stride,
//                          const int16_t *filter_x, int x_step_q4,
//                          const int16_t *filter_y, int y_step_q4,
//                          int w, int h);
FUN_CONV_2D(, avx2);
Johann's avatar
Johann committed
345
#endif  // HAVE_AX2 && HAVE_SSSE3
346
#if HAVE_SSSE3
Johann's avatar
Johann committed
347
#if ARCH_X86_64
348 349 350 351 352 353 354 355 356 357 358
filter8_1dfunction vp9_filter_block1d16_v8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d16_h8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d8_v8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d8_h8_intrin_ssse3;
filter8_1dfunction vp9_filter_block1d4_v8_ssse3;
filter8_1dfunction vp9_filter_block1d4_h8_intrin_ssse3;
#define vp9_filter_block1d16_v8_ssse3 vp9_filter_block1d16_v8_intrin_ssse3
#define vp9_filter_block1d16_h8_ssse3 vp9_filter_block1d16_h8_intrin_ssse3
#define vp9_filter_block1d8_v8_ssse3 vp9_filter_block1d8_v8_intrin_ssse3
#define vp9_filter_block1d8_h8_ssse3 vp9_filter_block1d8_h8_intrin_ssse3
#define vp9_filter_block1d4_h8_ssse3 vp9_filter_block1d4_h8_intrin_ssse3
Johann's avatar
Johann committed
359
#else  // ARCH_X86
360 361 362 363 364 365
filter8_1dfunction vp9_filter_block1d16_v8_ssse3;
filter8_1dfunction vp9_filter_block1d16_h8_ssse3;
filter8_1dfunction vp9_filter_block1d8_v8_ssse3;
filter8_1dfunction vp9_filter_block1d8_h8_ssse3;
filter8_1dfunction vp9_filter_block1d4_v8_ssse3;
filter8_1dfunction vp9_filter_block1d4_h8_ssse3;
Johann's avatar
Johann committed
366
#endif  // ARCH_X86_64 / ARCH_X86
367 368 369 370 371 372
filter8_1dfunction vp9_filter_block1d16_v8_avg_ssse3;
filter8_1dfunction vp9_filter_block1d16_h8_avg_ssse3;
filter8_1dfunction vp9_filter_block1d8_v8_avg_ssse3;
filter8_1dfunction vp9_filter_block1d8_h8_avg_ssse3;
filter8_1dfunction vp9_filter_block1d4_v8_avg_ssse3;
filter8_1dfunction vp9_filter_block1d4_h8_avg_ssse3;
373

374 375 376 377 378 379 380 381 382 383 384 385
filter8_1dfunction vp9_filter_block1d16_v2_ssse3;
filter8_1dfunction vp9_filter_block1d16_h2_ssse3;
filter8_1dfunction vp9_filter_block1d8_v2_ssse3;
filter8_1dfunction vp9_filter_block1d8_h2_ssse3;
filter8_1dfunction vp9_filter_block1d4_v2_ssse3;
filter8_1dfunction vp9_filter_block1d4_h2_ssse3;
filter8_1dfunction vp9_filter_block1d16_v2_avg_ssse3;
filter8_1dfunction vp9_filter_block1d16_h2_avg_ssse3;
filter8_1dfunction vp9_filter_block1d8_v2_avg_ssse3;
filter8_1dfunction vp9_filter_block1d8_h2_avg_ssse3;
filter8_1dfunction vp9_filter_block1d4_v2_avg_ssse3;
filter8_1dfunction vp9_filter_block1d4_h2_avg_ssse3;
386

387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
// void vp9_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                                uint8_t *dst, ptrdiff_t dst_stride,
//                                const int16_t *filter_x, int x_step_q4,
//                                const int16_t *filter_y, int y_step_q4,
//                                int w, int h);
// void vp9_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                               uint8_t *dst, ptrdiff_t dst_stride,
//                               const int16_t *filter_x, int x_step_q4,
//                               const int16_t *filter_y, int y_step_q4,
//                               int w, int h);
// void vp9_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                                    uint8_t *dst, ptrdiff_t dst_stride,
//                                    const int16_t *filter_x, int x_step_q4,
//                                    const int16_t *filter_y, int y_step_q4,
//                                    int w, int h);
// void vp9_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                                   uint8_t *dst, ptrdiff_t dst_stride,
//                                   const int16_t *filter_x, int x_step_q4,
//                                   const int16_t *filter_y, int y_step_q4,
//                                   int w, int h);
407 408 409
FUN_CONV_1D(horiz, x_step_q4, filter_x, h, src, , ssse3);
FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , ssse3);
FUN_CONV_1D(avg_horiz, x_step_q4, filter_x, h, src, avg_, ssse3);
410
FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_,
411
            ssse3);
412 413 414 415 416 417 418 419 420 421 422 423 424

// void vp9_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                          uint8_t *dst, ptrdiff_t dst_stride,
//                          const int16_t *filter_x, int x_step_q4,
//                          const int16_t *filter_y, int y_step_q4,
//                          int w, int h);
// void vp9_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride,
//                              uint8_t *dst, ptrdiff_t dst_stride,
//                              const int16_t *filter_x, int x_step_q4,
//                              const int16_t *filter_y, int y_step_q4,
//                              int w, int h);
FUN_CONV_2D(, ssse3);
FUN_CONV_2D(avg_ , ssse3);
Johann's avatar
Johann committed
425
#endif  // HAVE_SSSE3
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440

#if HAVE_SSE2
filter8_1dfunction vp9_filter_block1d16_v8_sse2;
filter8_1dfunction vp9_filter_block1d16_h8_sse2;
filter8_1dfunction vp9_filter_block1d8_v8_sse2;
filter8_1dfunction vp9_filter_block1d8_h8_sse2;
filter8_1dfunction vp9_filter_block1d4_v8_sse2;
filter8_1dfunction vp9_filter_block1d4_h8_sse2;
filter8_1dfunction vp9_filter_block1d16_v8_avg_sse2;
filter8_1dfunction vp9_filter_block1d16_h8_avg_sse2;
filter8_1dfunction vp9_filter_block1d8_v8_avg_sse2;
filter8_1dfunction vp9_filter_block1d8_h8_avg_sse2;
filter8_1dfunction vp9_filter_block1d4_v8_avg_sse2;
filter8_1dfunction vp9_filter_block1d4_h8_avg_sse2;

441 442 443 444 445 446 447 448 449 450 451 452 453
filter8_1dfunction vp9_filter_block1d16_v2_sse2;
filter8_1dfunction vp9_filter_block1d16_h2_sse2;
filter8_1dfunction vp9_filter_block1d8_v2_sse2;
filter8_1dfunction vp9_filter_block1d8_h2_sse2;
filter8_1dfunction vp9_filter_block1d4_v2_sse2;
filter8_1dfunction vp9_filter_block1d4_h2_sse2;
filter8_1dfunction vp9_filter_block1d16_v2_avg_sse2;
filter8_1dfunction vp9_filter_block1d16_h2_avg_sse2;
filter8_1dfunction vp9_filter_block1d8_v2_avg_sse2;
filter8_1dfunction vp9_filter_block1d8_h2_avg_sse2;
filter8_1dfunction vp9_filter_block1d4_v2_avg_sse2;
filter8_1dfunction vp9_filter_block1d4_h2_avg_sse2;

454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
// void vp9_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                               uint8_t *dst, ptrdiff_t dst_stride,
//                               const int16_t *filter_x, int x_step_q4,
//                               const int16_t *filter_y, int y_step_q4,
//                               int w, int h);
// void vp9_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                              uint8_t *dst, ptrdiff_t dst_stride,
//                              const int16_t *filter_x, int x_step_q4,
//                              const int16_t *filter_y, int y_step_q4,
//                              int w, int h);
// void vp9_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                                   uint8_t *dst, ptrdiff_t dst_stride,
//                                   const int16_t *filter_x, int x_step_q4,
//                                   const int16_t *filter_y, int y_step_q4,
//                                   int w, int h);
// void vp9_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                                  uint8_t *dst, ptrdiff_t dst_stride,
//                                  const int16_t *filter_x, int x_step_q4,
//                                  const int16_t *filter_y, int y_step_q4,
//                                  int w, int h);
474 475 476 477
FUN_CONV_1D(horiz, x_step_q4, filter_x, h, src, , sse2);
FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , sse2);
FUN_CONV_1D(avg_horiz, x_step_q4, filter_x, h, src, avg_, sse2);
FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_, sse2);
478 479 480 481 482 483 484 485 486 487 488 489 490

// void vp9_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                         uint8_t *dst, ptrdiff_t dst_stride,
//                         const int16_t *filter_x, int x_step_q4,
//                         const int16_t *filter_y, int y_step_q4,
//                         int w, int h);
// void vp9_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                             uint8_t *dst, ptrdiff_t dst_stride,
//                             const int16_t *filter_x, int x_step_q4,
//                             const int16_t *filter_y, int y_step_q4,
//                             int w, int h);
FUN_CONV_2D(, sse2);
FUN_CONV_2D(avg_ , sse2);
491 492

#if CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64
493 494 495 496 497 498 499 500 501 502 503 504
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_v8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_h8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_v8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_h8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_v8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_h8_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_v8_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_h8_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_v8_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_h8_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_v8_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_h8_avg_sse2;
505

506 507 508 509 510 511 512 513 514 515 516 517
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_v2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_h2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_v2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_h2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_v2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_h2_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_v2_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d16_h2_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_v2_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d8_h2_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_v2_avg_sse2;
highbd_filter8_1dfunction vp9_highbd_filter_block1d4_h2_avg_sse2;
518

519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
// void vp9_highbd_convolve8_horiz_sse2(const uint8_t *src,
//                                      ptrdiff_t src_stride,
//                                      uint8_t *dst,
//                                      ptrdiff_t dst_stride,
//                                      const int16_t *filter_x,
//                                      int x_step_q4,
//                                      const int16_t *filter_y,
//                                      int y_step_q4,
//                                      int w, int h, int bd);
// void vp9_highbd_convolve8_vert_sse2(const uint8_t *src,
//                                     ptrdiff_t src_stride,
//                                     uint8_t *dst,
//                                     ptrdiff_t dst_stride,
//                                     const int16_t *filter_x,
//                                     int x_step_q4,
//                                     const int16_t *filter_y,
//                                     int y_step_q4,
//                                     int w, int h, int bd);
// void vp9_highbd_convolve8_avg_horiz_sse2(const uint8_t *src,
//                                          ptrdiff_t src_stride,
//                                          uint8_t *dst,
//                                          ptrdiff_t dst_stride,
//                                          const int16_t *filter_x,
//                                          int x_step_q4,
//                                          const int16_t *filter_y,
//                                          int y_step_q4,
//                                          int w, int h, int bd);
// void vp9_highbd_convolve8_avg_vert_sse2(const uint8_t *src,
//                                         ptrdiff_t src_stride,
//                                         uint8_t *dst,
//                                         ptrdiff_t dst_stride,
//                                         const int16_t *filter_x,
//                                         int x_step_q4,
//                                         const int16_t *filter_y,
//                                         int y_step_q4,
//                                         int w, int h, int bd);
555 556 557 558 559 560
HIGH_FUN_CONV_1D(horiz, x_step_q4, filter_x, h, src, , sse2);
HIGH_FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , sse2);
HIGH_FUN_CONV_1D(avg_horiz, x_step_q4, filter_x, h, src, avg_, sse2);
HIGH_FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_,
                 sse2);

561 562 563 564 565 566 567 568 569 570
// void vp9_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                                uint8_t *dst, ptrdiff_t dst_stride,
//                                const int16_t *filter_x, int x_step_q4,
//                                const int16_t *filter_y, int y_step_q4,
//                                int w, int h, int bd);
// void vp9_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride,
//                                    uint8_t *dst, ptrdiff_t dst_stride,
//                                    const int16_t *filter_x, int x_step_q4,
//                                    const int16_t *filter_y, int y_step_q4,
//                                    int w, int h, int bd);
571 572 573
HIGH_FUN_CONV_2D(, sse2);
HIGH_FUN_CONV_2D(avg_ , sse2);
#endif  // CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64
Johann's avatar
Johann committed
574
#endif  // HAVE_SSE2