John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * 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. |
| 9 | */ |
| 10 | |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 11 | #include <string.h> |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 12 | #include "test/acm_random.h" |
| 13 | #include "test/register_state_check.h" |
| 14 | #include "test/util.h" |
| 15 | #include "third_party/googletest/src/include/gtest/gtest.h" |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 16 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 17 | #include "./vpx_config.h" |
| 18 | #include "./vp9_rtcd.h" |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 19 | #include "vp9/common/vp9_common.h" |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 20 | #include "vp9/common/vp9_filter.h" |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 21 | #include "vpx_mem/vpx_mem.h" |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 22 | #include "vpx_ports/mem.h" |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 23 | |
| 24 | namespace { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 25 | |
hkuang | db71c1b | 2014-09-19 22:47:28 -0700 | [diff] [blame] | 26 | static const unsigned int kMaxDimension = 64; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 27 | |
James Zern | dfc4e8f | 2014-07-16 18:48:20 -0700 | [diff] [blame] | 28 | typedef void (*ConvolveFunc)(const uint8_t *src, ptrdiff_t src_stride, |
| 29 | uint8_t *dst, ptrdiff_t dst_stride, |
| 30 | const int16_t *filter_x, int filter_x_stride, |
| 31 | const int16_t *filter_y, int filter_y_stride, |
| 32 | int w, int h); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 33 | |
| 34 | struct ConvolveFunctions { |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 35 | ConvolveFunctions(ConvolveFunc copy, ConvolveFunc avg, |
| 36 | ConvolveFunc h8, ConvolveFunc h8_avg, |
James Zern | dfc4e8f | 2014-07-16 18:48:20 -0700 | [diff] [blame] | 37 | ConvolveFunc v8, ConvolveFunc v8_avg, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 38 | ConvolveFunc hv8, ConvolveFunc hv8_avg, |
| 39 | int bd) |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 40 | : copy_(copy), avg_(avg), h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg), |
| 41 | v8_avg_(v8_avg), hv8_avg_(hv8_avg), use_highbd_(bd) {} |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 42 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 43 | ConvolveFunc copy_; |
| 44 | ConvolveFunc avg_; |
James Zern | dfc4e8f | 2014-07-16 18:48:20 -0700 | [diff] [blame] | 45 | ConvolveFunc h8_; |
| 46 | ConvolveFunc v8_; |
| 47 | ConvolveFunc hv8_; |
| 48 | ConvolveFunc h8_avg_; |
| 49 | ConvolveFunc v8_avg_; |
| 50 | ConvolveFunc hv8_avg_; |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 51 | int use_highbd_; // 0 if high bitdepth not used, else the actual bit depth. |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 52 | }; |
| 53 | |
James Zern | dfc4e8f | 2014-07-16 18:48:20 -0700 | [diff] [blame] | 54 | typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam; |
Joshua Litt | 51490e5 | 2013-11-18 17:07:55 -0800 | [diff] [blame] | 55 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 56 | // Reference 8-tap subpixel filter, slightly modified to fit into this test. |
| 57 | #define VP9_FILTER_WEIGHT 128 |
| 58 | #define VP9_FILTER_SHIFT 7 |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 59 | uint8_t clip_pixel(int x) { |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 60 | return x < 0 ? 0 : |
| 61 | x > 255 ? 255 : |
| 62 | x; |
| 63 | } |
| 64 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 65 | void filter_block2d_8_c(const uint8_t *src_ptr, |
| 66 | const unsigned int src_stride, |
| 67 | const int16_t *HFilter, |
| 68 | const int16_t *VFilter, |
| 69 | uint8_t *dst_ptr, |
| 70 | unsigned int dst_stride, |
| 71 | unsigned int output_width, |
| 72 | unsigned int output_height) { |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 73 | // Between passes, we use an intermediate buffer whose height is extended to |
| 74 | // have enough horizontally filtered values as input for the vertical pass. |
| 75 | // This buffer is allocated to be big enough for the largest block type we |
| 76 | // support. |
| 77 | const int kInterp_Extend = 4; |
| 78 | const unsigned int intermediate_height = |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 79 | (kInterp_Extend - 1) + output_height + kInterp_Extend; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 80 | unsigned int i, j; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 81 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 82 | // Size of intermediate_buffer is max_intermediate_height * filter_max_width, |
| 83 | // where max_intermediate_height = (kInterp_Extend - 1) + filter_max_height |
| 84 | // + kInterp_Extend |
| 85 | // = 3 + 16 + 4 |
| 86 | // = 23 |
| 87 | // and filter_max_width = 16 |
| 88 | // |
| 89 | uint8_t intermediate_buffer[71 * kMaxDimension]; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 90 | const int intermediate_next_stride = 1 - intermediate_height * output_width; |
| 91 | |
| 92 | // Horizontal pass (src -> transposed intermediate). |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 93 | uint8_t *output_ptr = intermediate_buffer; |
| 94 | const int src_next_row_stride = src_stride - output_width; |
| 95 | src_ptr -= (kInterp_Extend - 1) * src_stride + (kInterp_Extend - 1); |
| 96 | for (i = 0; i < intermediate_height; ++i) { |
| 97 | for (j = 0; j < output_width; ++j) { |
| 98 | // Apply filter... |
| 99 | const int temp = (src_ptr[0] * HFilter[0]) + |
| 100 | (src_ptr[1] * HFilter[1]) + |
| 101 | (src_ptr[2] * HFilter[2]) + |
| 102 | (src_ptr[3] * HFilter[3]) + |
| 103 | (src_ptr[4] * HFilter[4]) + |
| 104 | (src_ptr[5] * HFilter[5]) + |
| 105 | (src_ptr[6] * HFilter[6]) + |
| 106 | (src_ptr[7] * HFilter[7]) + |
| 107 | (VP9_FILTER_WEIGHT >> 1); // Rounding |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 108 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 109 | // Normalize back to 0-255... |
| 110 | *output_ptr = clip_pixel(temp >> VP9_FILTER_SHIFT); |
| 111 | ++src_ptr; |
| 112 | output_ptr += intermediate_height; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 113 | } |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 114 | src_ptr += src_next_row_stride; |
| 115 | output_ptr += intermediate_next_stride; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | // Vertical pass (transposed intermediate -> dst). |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 119 | src_ptr = intermediate_buffer; |
| 120 | const int dst_next_row_stride = dst_stride - output_width; |
| 121 | for (i = 0; i < output_height; ++i) { |
| 122 | for (j = 0; j < output_width; ++j) { |
| 123 | // Apply filter... |
| 124 | const int temp = (src_ptr[0] * VFilter[0]) + |
| 125 | (src_ptr[1] * VFilter[1]) + |
| 126 | (src_ptr[2] * VFilter[2]) + |
| 127 | (src_ptr[3] * VFilter[3]) + |
| 128 | (src_ptr[4] * VFilter[4]) + |
| 129 | (src_ptr[5] * VFilter[5]) + |
| 130 | (src_ptr[6] * VFilter[6]) + |
| 131 | (src_ptr[7] * VFilter[7]) + |
| 132 | (VP9_FILTER_WEIGHT >> 1); // Rounding |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 133 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 134 | // Normalize back to 0-255... |
| 135 | *dst_ptr++ = clip_pixel(temp >> VP9_FILTER_SHIFT); |
| 136 | src_ptr += intermediate_height; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 137 | } |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 138 | src_ptr += intermediate_next_stride; |
| 139 | dst_ptr += dst_next_row_stride; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 140 | } |
| 141 | } |
| 142 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 143 | void block2d_average_c(uint8_t *src, |
| 144 | unsigned int src_stride, |
| 145 | uint8_t *output_ptr, |
| 146 | unsigned int output_stride, |
| 147 | unsigned int output_width, |
| 148 | unsigned int output_height) { |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 149 | unsigned int i, j; |
| 150 | for (i = 0; i < output_height; ++i) { |
| 151 | for (j = 0; j < output_width; ++j) { |
| 152 | output_ptr[j] = (output_ptr[j] + src[i * src_stride + j] + 1) >> 1; |
| 153 | } |
| 154 | output_ptr += output_stride; |
| 155 | } |
| 156 | } |
| 157 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 158 | void filter_average_block2d_8_c(const uint8_t *src_ptr, |
| 159 | const unsigned int src_stride, |
| 160 | const int16_t *HFilter, |
| 161 | const int16_t *VFilter, |
| 162 | uint8_t *dst_ptr, |
| 163 | unsigned int dst_stride, |
| 164 | unsigned int output_width, |
| 165 | unsigned int output_height) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 166 | uint8_t tmp[kMaxDimension * kMaxDimension]; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 167 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 168 | assert(output_width <= kMaxDimension); |
| 169 | assert(output_height <= kMaxDimension); |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 170 | filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64, |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 171 | output_width, output_height); |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 172 | block2d_average_c(tmp, 64, dst_ptr, dst_stride, |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 173 | output_width, output_height); |
| 174 | } |
| 175 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 176 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 177 | void highbd_filter_block2d_8_c(const uint16_t *src_ptr, |
| 178 | const unsigned int src_stride, |
| 179 | const int16_t *HFilter, |
| 180 | const int16_t *VFilter, |
| 181 | uint16_t *dst_ptr, |
| 182 | unsigned int dst_stride, |
| 183 | unsigned int output_width, |
| 184 | unsigned int output_height, |
| 185 | int bd) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 186 | // Between passes, we use an intermediate buffer whose height is extended to |
| 187 | // have enough horizontally filtered values as input for the vertical pass. |
| 188 | // This buffer is allocated to be big enough for the largest block type we |
| 189 | // support. |
| 190 | const int kInterp_Extend = 4; |
| 191 | const unsigned int intermediate_height = |
| 192 | (kInterp_Extend - 1) + output_height + kInterp_Extend; |
| 193 | |
| 194 | /* Size of intermediate_buffer is max_intermediate_height * filter_max_width, |
| 195 | * where max_intermediate_height = (kInterp_Extend - 1) + filter_max_height |
| 196 | * + kInterp_Extend |
| 197 | * = 3 + 16 + 4 |
| 198 | * = 23 |
| 199 | * and filter_max_width = 16 |
| 200 | */ |
| 201 | uint16_t intermediate_buffer[71 * kMaxDimension]; |
| 202 | const int intermediate_next_stride = 1 - intermediate_height * output_width; |
| 203 | |
| 204 | // Horizontal pass (src -> transposed intermediate). |
| 205 | { |
| 206 | uint16_t *output_ptr = intermediate_buffer; |
| 207 | const int src_next_row_stride = src_stride - output_width; |
| 208 | unsigned int i, j; |
| 209 | src_ptr -= (kInterp_Extend - 1) * src_stride + (kInterp_Extend - 1); |
| 210 | for (i = 0; i < intermediate_height; ++i) { |
| 211 | for (j = 0; j < output_width; ++j) { |
| 212 | // Apply filter... |
| 213 | const int temp = (src_ptr[0] * HFilter[0]) + |
| 214 | (src_ptr[1] * HFilter[1]) + |
| 215 | (src_ptr[2] * HFilter[2]) + |
| 216 | (src_ptr[3] * HFilter[3]) + |
| 217 | (src_ptr[4] * HFilter[4]) + |
| 218 | (src_ptr[5] * HFilter[5]) + |
| 219 | (src_ptr[6] * HFilter[6]) + |
| 220 | (src_ptr[7] * HFilter[7]) + |
| 221 | (VP9_FILTER_WEIGHT >> 1); // Rounding |
| 222 | |
| 223 | // Normalize back to 0-255... |
Deb Mukherjee | d50716f | 2014-10-02 15:43:27 -0700 | [diff] [blame] | 224 | *output_ptr = clip_pixel_highbd(temp >> VP9_FILTER_SHIFT, bd); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 225 | ++src_ptr; |
| 226 | output_ptr += intermediate_height; |
| 227 | } |
| 228 | src_ptr += src_next_row_stride; |
| 229 | output_ptr += intermediate_next_stride; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | // Vertical pass (transposed intermediate -> dst). |
| 234 | { |
| 235 | uint16_t *src_ptr = intermediate_buffer; |
| 236 | const int dst_next_row_stride = dst_stride - output_width; |
| 237 | unsigned int i, j; |
| 238 | for (i = 0; i < output_height; ++i) { |
| 239 | for (j = 0; j < output_width; ++j) { |
| 240 | // Apply filter... |
| 241 | const int temp = (src_ptr[0] * VFilter[0]) + |
| 242 | (src_ptr[1] * VFilter[1]) + |
| 243 | (src_ptr[2] * VFilter[2]) + |
| 244 | (src_ptr[3] * VFilter[3]) + |
| 245 | (src_ptr[4] * VFilter[4]) + |
| 246 | (src_ptr[5] * VFilter[5]) + |
| 247 | (src_ptr[6] * VFilter[6]) + |
| 248 | (src_ptr[7] * VFilter[7]) + |
| 249 | (VP9_FILTER_WEIGHT >> 1); // Rounding |
| 250 | |
| 251 | // Normalize back to 0-255... |
Deb Mukherjee | d50716f | 2014-10-02 15:43:27 -0700 | [diff] [blame] | 252 | *dst_ptr++ = clip_pixel_highbd(temp >> VP9_FILTER_SHIFT, bd); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 253 | src_ptr += intermediate_height; |
| 254 | } |
| 255 | src_ptr += intermediate_next_stride; |
| 256 | dst_ptr += dst_next_row_stride; |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 261 | void highbd_block2d_average_c(uint16_t *src, |
| 262 | unsigned int src_stride, |
| 263 | uint16_t *output_ptr, |
| 264 | unsigned int output_stride, |
| 265 | unsigned int output_width, |
| 266 | unsigned int output_height, |
| 267 | int bd) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 268 | unsigned int i, j; |
| 269 | for (i = 0; i < output_height; ++i) { |
| 270 | for (j = 0; j < output_width; ++j) { |
| 271 | output_ptr[j] = (output_ptr[j] + src[i * src_stride + j] + 1) >> 1; |
| 272 | } |
| 273 | output_ptr += output_stride; |
| 274 | } |
| 275 | } |
| 276 | |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 277 | void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr, |
| 278 | const unsigned int src_stride, |
| 279 | const int16_t *HFilter, |
| 280 | const int16_t *VFilter, |
| 281 | uint16_t *dst_ptr, |
| 282 | unsigned int dst_stride, |
| 283 | unsigned int output_width, |
| 284 | unsigned int output_height, |
| 285 | int bd) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 286 | uint16_t tmp[kMaxDimension * kMaxDimension]; |
| 287 | |
| 288 | assert(output_width <= kMaxDimension); |
| 289 | assert(output_height <= kMaxDimension); |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 290 | highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64, |
| 291 | output_width, output_height, bd); |
| 292 | highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride, |
| 293 | output_width, output_height, bd); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 294 | } |
| 295 | #endif // CONFIG_VP9_HIGHBITDEPTH |
| 296 | |
James Zern | dfc4e8f | 2014-07-16 18:48:20 -0700 | [diff] [blame] | 297 | class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 298 | public: |
| 299 | static void SetUpTestCase() { |
| 300 | // Force input_ to be unaligned, output to be 16 byte aligned. |
| 301 | input_ = reinterpret_cast<uint8_t*>( |
James Zern | b0e5775 | 2013-05-02 12:29:34 -0700 | [diff] [blame] | 302 | vpx_memalign(kDataAlignment, kInputBufferSize + 1)) + 1; |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 303 | output_ = reinterpret_cast<uint8_t*>( |
James Zern | b0e5775 | 2013-05-02 12:29:34 -0700 | [diff] [blame] | 304 | vpx_memalign(kDataAlignment, kOutputBufferSize)); |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 305 | output_ref_ = reinterpret_cast<uint8_t*>( |
| 306 | vpx_memalign(kDataAlignment, kOutputBufferSize)); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 307 | #if CONFIG_VP9_HIGHBITDEPTH |
| 308 | input16_ = reinterpret_cast<uint16_t*>( |
| 309 | vpx_memalign(kDataAlignment, |
| 310 | (kInputBufferSize + 1) * sizeof(uint16_t))) + 1; |
| 311 | output16_ = reinterpret_cast<uint16_t*>( |
| 312 | vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 313 | output16_ref_ = reinterpret_cast<uint16_t*>( |
| 314 | vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 315 | #endif |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 316 | } |
| 317 | |
| 318 | static void TearDownTestCase() { |
| 319 | vpx_free(input_ - 1); |
| 320 | input_ = NULL; |
| 321 | vpx_free(output_); |
| 322 | output_ = NULL; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 323 | vpx_free(output_ref_); |
| 324 | output_ref_ = NULL; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 325 | #if CONFIG_VP9_HIGHBITDEPTH |
| 326 | vpx_free(input16_ - 1); |
| 327 | input16_ = NULL; |
| 328 | vpx_free(output16_); |
| 329 | output16_ = NULL; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 330 | vpx_free(output16_ref_); |
| 331 | output16_ref_ = NULL; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 332 | #endif |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 333 | } |
| 334 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 335 | protected: |
| 336 | static const int kDataAlignment = 16; |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 337 | static const int kOuterBlockSize = 256; |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 338 | static const int kInputStride = kOuterBlockSize; |
| 339 | static const int kOutputStride = kOuterBlockSize; |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 340 | static const int kInputBufferSize = kOuterBlockSize * kOuterBlockSize; |
| 341 | static const int kOutputBufferSize = kOuterBlockSize * kOuterBlockSize; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 342 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 343 | int Width() const { return GET_PARAM(0); } |
| 344 | int Height() const { return GET_PARAM(1); } |
| 345 | int BorderLeft() const { |
| 346 | const int center = (kOuterBlockSize - Width()) / 2; |
| 347 | return (center + (kDataAlignment - 1)) & ~(kDataAlignment - 1); |
| 348 | } |
| 349 | int BorderTop() const { return (kOuterBlockSize - Height()) / 2; } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 350 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 351 | bool IsIndexInBorder(int i) { |
| 352 | return (i < BorderTop() * kOuterBlockSize || |
| 353 | i >= (BorderTop() + Height()) * kOuterBlockSize || |
| 354 | i % kOuterBlockSize < BorderLeft() || |
| 355 | i % kOuterBlockSize >= (BorderLeft() + Width())); |
| 356 | } |
| 357 | |
| 358 | virtual void SetUp() { |
| 359 | UUT_ = GET_PARAM(2); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 360 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 361 | if (UUT_->use_highbd_ != 0) |
| 362 | mask_ = (1 << UUT_->use_highbd_) - 1; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 363 | else |
| 364 | mask_ = 255; |
| 365 | #endif |
Johann | 158c80c | 2013-05-23 12:50:41 -0700 | [diff] [blame] | 366 | /* Set up guard blocks for an inner block centered in the outer block */ |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 367 | for (int i = 0; i < kOutputBufferSize; ++i) { |
| 368 | if (IsIndexInBorder(i)) |
| 369 | output_[i] = 255; |
| 370 | else |
| 371 | output_[i] = 0; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 372 | } |
| 373 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 374 | ::libvpx_test::ACMRandom prng; |
Yaowu Xu | 077144d | 2014-05-23 12:23:29 -0700 | [diff] [blame] | 375 | for (int i = 0; i < kInputBufferSize; ++i) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 376 | if (i & 1) { |
Yaowu Xu | 077144d | 2014-05-23 12:23:29 -0700 | [diff] [blame] | 377 | input_[i] = 255; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 378 | #if CONFIG_VP9_HIGHBITDEPTH |
| 379 | input16_[i] = mask_; |
| 380 | #endif |
| 381 | } else { |
Yaowu Xu | 077144d | 2014-05-23 12:23:29 -0700 | [diff] [blame] | 382 | input_[i] = prng.Rand8Extremes(); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 383 | #if CONFIG_VP9_HIGHBITDEPTH |
| 384 | input16_[i] = prng.Rand16() & mask_; |
| 385 | #endif |
| 386 | } |
Yaowu Xu | 077144d | 2014-05-23 12:23:29 -0700 | [diff] [blame] | 387 | } |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 388 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 389 | |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 390 | void SetConstantInput(int value) { |
| 391 | memset(input_, value, kInputBufferSize); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 392 | #if CONFIG_VP9_HIGHBITDEPTH |
| 393 | vpx_memset16(input16_, value, kInputBufferSize); |
| 394 | #endif |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 395 | } |
| 396 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 397 | void CopyOutputToRef() { |
| 398 | vpx_memcpy(output_ref_, output_, kOutputBufferSize); |
| 399 | #if CONFIG_VP9_HIGHBITDEPTH |
| 400 | vpx_memcpy(output16_ref_, output16_, kOutputBufferSize); |
| 401 | #endif |
| 402 | } |
| 403 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 404 | void CheckGuardBlocks() { |
| 405 | for (int i = 0; i < kOutputBufferSize; ++i) { |
| 406 | if (IsIndexInBorder(i)) |
| 407 | EXPECT_EQ(255, output_[i]); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 408 | } |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 409 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 410 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 411 | uint8_t *input() const { |
| 412 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 413 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 414 | return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 415 | } else { |
| 416 | return CONVERT_TO_BYTEPTR(input16_ + BorderTop() * kOuterBlockSize + |
| 417 | BorderLeft()); |
| 418 | } |
| 419 | #else |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 420 | return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 421 | #endif |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 422 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 423 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 424 | uint8_t *output() const { |
| 425 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 426 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 427 | return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 428 | } else { |
| 429 | return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize + |
| 430 | BorderLeft()); |
| 431 | } |
| 432 | #else |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 433 | return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 434 | #endif |
| 435 | } |
| 436 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 437 | uint8_t *output_ref() const { |
| 438 | #if CONFIG_VP9_HIGHBITDEPTH |
| 439 | if (UUT_->use_highbd_ == 0) { |
| 440 | return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 441 | } else { |
| 442 | return CONVERT_TO_BYTEPTR(output16_ref_ + BorderTop() * kOuterBlockSize + |
| 443 | BorderLeft()); |
| 444 | } |
| 445 | #else |
| 446 | return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 447 | #endif |
| 448 | } |
| 449 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 450 | uint16_t lookup(uint8_t *list, int index) const { |
| 451 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 452 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 453 | return list[index]; |
| 454 | } else { |
| 455 | return CONVERT_TO_SHORTPTR(list)[index]; |
| 456 | } |
| 457 | #else |
| 458 | return list[index]; |
| 459 | #endif |
| 460 | } |
| 461 | |
| 462 | void assign_val(uint8_t *list, int index, uint16_t val) const { |
| 463 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 464 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 465 | list[index] = (uint8_t) val; |
| 466 | } else { |
| 467 | CONVERT_TO_SHORTPTR(list)[index] = val; |
| 468 | } |
| 469 | #else |
| 470 | list[index] = (uint8_t) val; |
| 471 | #endif |
| 472 | } |
| 473 | |
| 474 | void wrapper_filter_average_block2d_8_c(const uint8_t *src_ptr, |
| 475 | const unsigned int src_stride, |
| 476 | const int16_t *HFilter, |
| 477 | const int16_t *VFilter, |
| 478 | uint8_t *dst_ptr, |
| 479 | unsigned int dst_stride, |
| 480 | unsigned int output_width, |
| 481 | unsigned int output_height) { |
| 482 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 483 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 484 | filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, |
| 485 | dst_ptr, dst_stride, output_width, |
| 486 | output_height); |
| 487 | } else { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 488 | highbd_filter_average_block2d_8_c(CONVERT_TO_SHORTPTR(src_ptr), |
| 489 | src_stride, HFilter, VFilter, |
| 490 | CONVERT_TO_SHORTPTR(dst_ptr), |
| 491 | dst_stride, output_width, output_height, |
| 492 | UUT_->use_highbd_); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 493 | } |
| 494 | #else |
| 495 | filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, |
| 496 | dst_ptr, dst_stride, output_width, |
| 497 | output_height); |
| 498 | #endif |
| 499 | } |
| 500 | |
| 501 | void wrapper_filter_block2d_8_c(const uint8_t *src_ptr, |
| 502 | const unsigned int src_stride, |
| 503 | const int16_t *HFilter, |
| 504 | const int16_t *VFilter, |
| 505 | uint8_t *dst_ptr, |
| 506 | unsigned int dst_stride, |
| 507 | unsigned int output_width, |
| 508 | unsigned int output_height) { |
| 509 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 510 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 511 | filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, |
| 512 | dst_ptr, dst_stride, output_width, output_height); |
| 513 | } else { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 514 | highbd_filter_block2d_8_c(CONVERT_TO_SHORTPTR(src_ptr), src_stride, |
| 515 | HFilter, VFilter, |
| 516 | CONVERT_TO_SHORTPTR(dst_ptr), dst_stride, |
| 517 | output_width, output_height, UUT_->use_highbd_); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 518 | } |
| 519 | #else |
| 520 | filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, |
| 521 | dst_ptr, dst_stride, output_width, output_height); |
| 522 | #endif |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 523 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 524 | |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 525 | const ConvolveFunctions* UUT_; |
| 526 | static uint8_t* input_; |
| 527 | static uint8_t* output_; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 528 | static uint8_t* output_ref_; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 529 | #if CONFIG_VP9_HIGHBITDEPTH |
| 530 | static uint16_t* input16_; |
| 531 | static uint16_t* output16_; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 532 | static uint16_t* output16_ref_; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 533 | int mask_; |
| 534 | #endif |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 535 | }; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 536 | |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 537 | uint8_t* ConvolveTest::input_ = NULL; |
| 538 | uint8_t* ConvolveTest::output_ = NULL; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 539 | uint8_t* ConvolveTest::output_ref_ = NULL; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 540 | #if CONFIG_VP9_HIGHBITDEPTH |
| 541 | uint16_t* ConvolveTest::input16_ = NULL; |
| 542 | uint16_t* ConvolveTest::output16_ = NULL; |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 543 | uint16_t* ConvolveTest::output16_ref_ = NULL; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 544 | #endif |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 545 | |
| 546 | TEST_P(ConvolveTest, GuardBlocks) { |
| 547 | CheckGuardBlocks(); |
| 548 | } |
| 549 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 550 | TEST_P(ConvolveTest, Copy) { |
| 551 | uint8_t* const in = input(); |
| 552 | uint8_t* const out = output(); |
| 553 | |
| 554 | ASM_REGISTER_STATE_CHECK( |
| 555 | UUT_->copy_(in, kInputStride, out, kOutputStride, NULL, 0, NULL, 0, |
| 556 | Width(), Height())); |
| 557 | |
| 558 | CheckGuardBlocks(); |
| 559 | |
| 560 | for (int y = 0; y < Height(); ++y) |
| 561 | for (int x = 0; x < Width(); ++x) |
| 562 | ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 563 | lookup(in, y * kInputStride + x)) |
| 564 | << "(" << x << "," << y << ")"; |
| 565 | } |
| 566 | |
| 567 | TEST_P(ConvolveTest, Avg) { |
| 568 | uint8_t* const in = input(); |
| 569 | uint8_t* const out = output(); |
| 570 | uint8_t* const out_ref = output_ref(); |
| 571 | CopyOutputToRef(); |
| 572 | |
| 573 | ASM_REGISTER_STATE_CHECK( |
| 574 | UUT_->avg_(in, kInputStride, out, kOutputStride, NULL, 0, NULL, 0, |
| 575 | Width(), Height())); |
| 576 | |
| 577 | CheckGuardBlocks(); |
| 578 | |
| 579 | for (int y = 0; y < Height(); ++y) |
| 580 | for (int x = 0; x < Width(); ++x) |
| 581 | ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 582 | ROUND_POWER_OF_TWO(lookup(in, y * kInputStride + x) + |
| 583 | lookup(out_ref, y * kOutputStride + x), 1)) |
| 584 | << "(" << x << "," << y << ")"; |
| 585 | } |
| 586 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 587 | TEST_P(ConvolveTest, CopyHoriz) { |
| 588 | uint8_t* const in = input(); |
| 589 | uint8_t* const out = output(); |
James Zern | e7b599f | 2013-06-17 23:11:01 -0700 | [diff] [blame] | 590 | DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 591 | |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 592 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 593 | UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
| 594 | Width(), Height())); |
| 595 | |
| 596 | CheckGuardBlocks(); |
| 597 | |
| 598 | for (int y = 0; y < Height(); ++y) |
| 599 | for (int x = 0; x < Width(); ++x) |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 600 | ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 601 | lookup(in, y * kInputStride + x)) |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 602 | << "(" << x << "," << y << ")"; |
| 603 | } |
| 604 | |
| 605 | TEST_P(ConvolveTest, CopyVert) { |
| 606 | uint8_t* const in = input(); |
| 607 | uint8_t* const out = output(); |
James Zern | e7b599f | 2013-06-17 23:11:01 -0700 | [diff] [blame] | 608 | DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 609 | |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 610 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 611 | UUT_->v8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
| 612 | Width(), Height())); |
| 613 | |
| 614 | CheckGuardBlocks(); |
| 615 | |
| 616 | for (int y = 0; y < Height(); ++y) |
| 617 | for (int x = 0; x < Width(); ++x) |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 618 | ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 619 | lookup(in, y * kInputStride + x)) |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 620 | << "(" << x << "," << y << ")"; |
| 621 | } |
| 622 | |
| 623 | TEST_P(ConvolveTest, Copy2D) { |
| 624 | uint8_t* const in = input(); |
| 625 | uint8_t* const out = output(); |
James Zern | e7b599f | 2013-06-17 23:11:01 -0700 | [diff] [blame] | 626 | DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 627 | |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 628 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 629 | UUT_->hv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
| 630 | Width(), Height())); |
| 631 | |
| 632 | CheckGuardBlocks(); |
| 633 | |
| 634 | for (int y = 0; y < Height(); ++y) |
| 635 | for (int x = 0; x < Width(); ++x) |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 636 | ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 637 | lookup(in, y * kInputStride + x)) |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 638 | << "(" << x << "," << y << ")"; |
| 639 | } |
| 640 | |
Dmitry Kovalev | 3d4ed27 | 2014-04-21 14:15:35 -0700 | [diff] [blame] | 641 | const int kNumFilterBanks = 4; |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 642 | const int kNumFilters = 16; |
| 643 | |
| 644 | TEST(ConvolveTest, FiltersWontSaturateWhenAddedPairwise) { |
| 645 | for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) { |
Dmitry Kovalev | 3d4ed27 | 2014-04-21 14:15:35 -0700 | [diff] [blame] | 646 | const InterpKernel *filters = |
| 647 | vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank)); |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 648 | for (int i = 0; i < kNumFilters; i++) { |
| 649 | const int p0 = filters[i][0] + filters[i][1]; |
| 650 | const int p1 = filters[i][2] + filters[i][3]; |
| 651 | const int p2 = filters[i][4] + filters[i][5]; |
| 652 | const int p3 = filters[i][6] + filters[i][7]; |
| 653 | EXPECT_LE(p0, 128); |
| 654 | EXPECT_LE(p1, 128); |
| 655 | EXPECT_LE(p2, 128); |
| 656 | EXPECT_LE(p3, 128); |
| 657 | EXPECT_LE(p0 + p3, 128); |
| 658 | EXPECT_LE(p0 + p3 + p1, 128); |
| 659 | EXPECT_LE(p0 + p3 + p1 + p2, 128); |
| 660 | EXPECT_EQ(p0 + p1 + p2 + p3, 128); |
| 661 | } |
| 662 | } |
| 663 | } |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 664 | |
John Koleszar | 04c2407 | 2013-02-20 16:32:02 -0800 | [diff] [blame] | 665 | const int16_t kInvalidFilter[8] = { 0 }; |
| 666 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 667 | TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) { |
| 668 | uint8_t* const in = input(); |
| 669 | uint8_t* const out = output(); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 670 | #if CONFIG_VP9_HIGHBITDEPTH |
| 671 | uint8_t ref8[kOutputStride * kMaxDimension]; |
| 672 | uint16_t ref16[kOutputStride * kMaxDimension]; |
| 673 | uint8_t* ref; |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 674 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 675 | ref = ref8; |
| 676 | } else { |
| 677 | ref = CONVERT_TO_BYTEPTR(ref16); |
| 678 | } |
| 679 | #else |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 680 | uint8_t ref[kOutputStride * kMaxDimension]; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 681 | #endif |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 682 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 683 | for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) { |
Dmitry Kovalev | 3d4ed27 | 2014-04-21 14:15:35 -0700 | [diff] [blame] | 684 | const InterpKernel *filters = |
| 685 | vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank)); |
Dmitry Kovalev | 021eaab | 2014-05-14 16:21:41 -0700 | [diff] [blame] | 686 | const InterpKernel *const eighttap_smooth = |
| 687 | vp9_get_interp_kernel(EIGHTTAP_SMOOTH); |
| 688 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 689 | for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) { |
| 690 | for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 691 | wrapper_filter_block2d_8_c(in, kInputStride, |
| 692 | filters[filter_x], filters[filter_y], |
| 693 | ref, kOutputStride, |
| 694 | Width(), Height()); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 695 | |
Dmitry Kovalev | 021eaab | 2014-05-14 16:21:41 -0700 | [diff] [blame] | 696 | if (filters == eighttap_smooth || (filter_x && filter_y)) |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 697 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 698 | UUT_->hv8_(in, kInputStride, out, kOutputStride, |
| 699 | filters[filter_x], 16, filters[filter_y], 16, |
| 700 | Width(), Height())); |
| 701 | else if (filter_y) |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 702 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 703 | UUT_->v8_(in, kInputStride, out, kOutputStride, |
John Koleszar | 04c2407 | 2013-02-20 16:32:02 -0800 | [diff] [blame] | 704 | kInvalidFilter, 16, filters[filter_y], 16, |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 705 | Width(), Height())); |
| 706 | else |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 707 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 708 | UUT_->h8_(in, kInputStride, out, kOutputStride, |
John Koleszar | 04c2407 | 2013-02-20 16:32:02 -0800 | [diff] [blame] | 709 | filters[filter_x], 16, kInvalidFilter, 16, |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 710 | Width(), Height())); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 711 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 712 | CheckGuardBlocks(); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 713 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 714 | for (int y = 0; y < Height(); ++y) |
| 715 | for (int x = 0; x < Width(); ++x) |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 716 | ASSERT_EQ(lookup(ref, y * kOutputStride + x), |
| 717 | lookup(out, y * kOutputStride + x)) |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 718 | << "mismatch at (" << x << "," << y << "), " |
| 719 | << "filters (" << filter_bank << "," |
| 720 | << filter_x << "," << filter_y << ")"; |
| 721 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 722 | } |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) { |
| 727 | uint8_t* const in = input(); |
| 728 | uint8_t* const out = output(); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 729 | #if CONFIG_VP9_HIGHBITDEPTH |
| 730 | uint8_t ref8[kOutputStride * kMaxDimension]; |
| 731 | uint16_t ref16[kOutputStride * kMaxDimension]; |
| 732 | uint8_t* ref; |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 733 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 734 | ref = ref8; |
| 735 | } else { |
| 736 | ref = CONVERT_TO_BYTEPTR(ref16); |
| 737 | } |
| 738 | #else |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 739 | uint8_t ref[kOutputStride * kMaxDimension]; |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 740 | #endif |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 741 | |
| 742 | // Populate ref and out with some random data |
| 743 | ::libvpx_test::ACMRandom prng; |
| 744 | for (int y = 0; y < Height(); ++y) { |
| 745 | for (int x = 0; x < Width(); ++x) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 746 | uint16_t r; |
| 747 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 748 | if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 749 | r = prng.Rand8Extremes(); |
| 750 | } else { |
| 751 | r = prng.Rand16() & mask_; |
| 752 | } |
| 753 | #else |
| 754 | r = prng.Rand8Extremes(); |
| 755 | #endif |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 756 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 757 | assign_val(out, y * kOutputStride + x, r); |
| 758 | assign_val(ref, y * kOutputStride + x, r); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 759 | } |
| 760 | } |
| 761 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 762 | for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) { |
Dmitry Kovalev | 3d4ed27 | 2014-04-21 14:15:35 -0700 | [diff] [blame] | 763 | const InterpKernel *filters = |
| 764 | vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank)); |
Dmitry Kovalev | 021eaab | 2014-05-14 16:21:41 -0700 | [diff] [blame] | 765 | const InterpKernel *const eighttap_smooth = |
| 766 | vp9_get_interp_kernel(EIGHTTAP_SMOOTH); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 767 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 768 | for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) { |
| 769 | for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 770 | wrapper_filter_average_block2d_8_c(in, kInputStride, |
| 771 | filters[filter_x], filters[filter_y], |
| 772 | ref, kOutputStride, |
| 773 | Width(), Height()); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 774 | |
Dmitry Kovalev | 021eaab | 2014-05-14 16:21:41 -0700 | [diff] [blame] | 775 | if (filters == eighttap_smooth || (filter_x && filter_y)) |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 776 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 777 | UUT_->hv8_avg_(in, kInputStride, out, kOutputStride, |
| 778 | filters[filter_x], 16, filters[filter_y], 16, |
| 779 | Width(), Height())); |
| 780 | else if (filter_y) |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 781 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 782 | UUT_->v8_avg_(in, kInputStride, out, kOutputStride, |
| 783 | filters[filter_x], 16, filters[filter_y], 16, |
| 784 | Width(), Height())); |
| 785 | else |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 786 | ASM_REGISTER_STATE_CHECK( |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 787 | UUT_->h8_avg_(in, kInputStride, out, kOutputStride, |
| 788 | filters[filter_x], 16, filters[filter_y], 16, |
| 789 | Width(), Height())); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 790 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 791 | CheckGuardBlocks(); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 792 | |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 793 | for (int y = 0; y < Height(); ++y) |
| 794 | for (int x = 0; x < Width(); ++x) |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 795 | ASSERT_EQ(lookup(ref, y * kOutputStride + x), |
| 796 | lookup(out, y * kOutputStride + x)) |
John Koleszar | 557a1b2 | 2013-02-20 16:13:01 -0800 | [diff] [blame] | 797 | << "mismatch at (" << x << "," << y << "), " |
| 798 | << "filters (" << filter_bank << "," |
| 799 | << filter_x << "," << filter_y << ")"; |
| 800 | } |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 801 | } |
| 802 | } |
| 803 | } |
| 804 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 805 | TEST_P(ConvolveTest, FilterExtremes) { |
| 806 | uint8_t *const in = input(); |
| 807 | uint8_t *const out = output(); |
| 808 | #if CONFIG_VP9_HIGHBITDEPTH |
| 809 | uint8_t ref8[kOutputStride * kMaxDimension]; |
| 810 | uint16_t ref16[kOutputStride * kMaxDimension]; |
| 811 | uint8_t *ref; |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 812 | if (UUT_->use_highbd_ == 0) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 813 | ref = ref8; |
| 814 | } else { |
| 815 | ref = CONVERT_TO_BYTEPTR(ref16); |
| 816 | } |
| 817 | #else |
| 818 | uint8_t ref[kOutputStride * kMaxDimension]; |
| 819 | #endif |
| 820 | |
| 821 | // Populate ref and out with some random data |
| 822 | ::libvpx_test::ACMRandom prng; |
| 823 | for (int y = 0; y < Height(); ++y) { |
| 824 | for (int x = 0; x < Width(); ++x) { |
| 825 | uint16_t r; |
| 826 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 827 | if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 828 | r = prng.Rand8Extremes(); |
| 829 | } else { |
| 830 | r = prng.Rand16() & mask_; |
| 831 | } |
| 832 | #else |
| 833 | r = prng.Rand8Extremes(); |
| 834 | #endif |
| 835 | assign_val(out, y * kOutputStride + x, r); |
| 836 | assign_val(ref, y * kOutputStride + x, r); |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | for (int axis = 0; axis < 2; axis++) { |
| 841 | int seed_val = 0; |
| 842 | while (seed_val < 256) { |
| 843 | for (int y = 0; y < 8; ++y) { |
| 844 | for (int x = 0; x < 8; ++x) { |
| 845 | #if CONFIG_VP9_HIGHBITDEPTH |
| 846 | assign_val(in, y * kOutputStride + x - SUBPEL_TAPS / 2 + 1, |
| 847 | ((seed_val >> (axis ? y : x)) & 1) * mask_); |
| 848 | #else |
| 849 | assign_val(in, y * kOutputStride + x - SUBPEL_TAPS / 2 + 1, |
| 850 | ((seed_val >> (axis ? y : x)) & 1) * 255); |
| 851 | #endif |
| 852 | if (axis) seed_val++; |
| 853 | } |
| 854 | if (axis) |
| 855 | seed_val-= 8; |
| 856 | else |
| 857 | seed_val++; |
| 858 | } |
| 859 | if (axis) seed_val += 8; |
| 860 | |
| 861 | for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) { |
| 862 | const InterpKernel *filters = |
| 863 | vp9_get_interp_kernel(static_cast<INTERP_FILTER>(filter_bank)); |
| 864 | const InterpKernel *const eighttap_smooth = |
| 865 | vp9_get_interp_kernel(EIGHTTAP_SMOOTH); |
| 866 | for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) { |
| 867 | for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) { |
| 868 | wrapper_filter_block2d_8_c(in, kInputStride, |
| 869 | filters[filter_x], filters[filter_y], |
| 870 | ref, kOutputStride, |
| 871 | Width(), Height()); |
| 872 | if (filters == eighttap_smooth || (filter_x && filter_y)) |
| 873 | ASM_REGISTER_STATE_CHECK( |
| 874 | UUT_->hv8_(in, kInputStride, out, kOutputStride, |
| 875 | filters[filter_x], 16, filters[filter_y], 16, |
| 876 | Width(), Height())); |
| 877 | else if (filter_y) |
| 878 | ASM_REGISTER_STATE_CHECK( |
| 879 | UUT_->v8_(in, kInputStride, out, kOutputStride, |
| 880 | kInvalidFilter, 16, filters[filter_y], 16, |
| 881 | Width(), Height())); |
| 882 | else |
| 883 | ASM_REGISTER_STATE_CHECK( |
| 884 | UUT_->h8_(in, kInputStride, out, kOutputStride, |
| 885 | filters[filter_x], 16, kInvalidFilter, 16, |
| 886 | Width(), Height())); |
| 887 | |
| 888 | for (int y = 0; y < Height(); ++y) |
| 889 | for (int x = 0; x < Width(); ++x) |
| 890 | ASSERT_EQ(lookup(ref, y * kOutputStride + x), |
| 891 | lookup(out, y * kOutputStride + x)) |
| 892 | << "mismatch at (" << x << "," << y << "), " |
| 893 | << "filters (" << filter_bank << "," |
| 894 | << filter_x << "," << filter_y << ")"; |
| 895 | } |
| 896 | } |
| 897 | } |
| 898 | } |
| 899 | } |
| 900 | } |
| 901 | |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 902 | DECLARE_ALIGNED(256, const int16_t, kChangeFilters[16][8]) = { |
| 903 | { 0, 0, 0, 0, 0, 0, 0, 128}, |
| 904 | { 0, 0, 0, 0, 0, 0, 128}, |
| 905 | { 0, 0, 0, 0, 0, 128}, |
| 906 | { 0, 0, 0, 0, 128}, |
| 907 | { 0, 0, 0, 128}, |
| 908 | { 0, 0, 128}, |
| 909 | { 0, 128}, |
| 910 | { 128}, |
| 911 | { 0, 0, 0, 0, 0, 0, 0, 128}, |
| 912 | { 0, 0, 0, 0, 0, 0, 128}, |
| 913 | { 0, 0, 0, 0, 0, 128}, |
| 914 | { 0, 0, 0, 0, 128}, |
| 915 | { 0, 0, 0, 128}, |
| 916 | { 0, 0, 128}, |
| 917 | { 0, 128}, |
| 918 | { 128} |
| 919 | }; |
| 920 | |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 921 | /* This test exercises the horizontal and vertical filter functions. */ |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 922 | TEST_P(ConvolveTest, ChangeFilterWorks) { |
| 923 | uint8_t* const in = input(); |
| 924 | uint8_t* const out = output(); |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 925 | |
| 926 | /* Assume that the first input sample is at the 8/16th position. */ |
| 927 | const int kInitialSubPelOffset = 8; |
| 928 | |
| 929 | /* Filters are 8-tap, so the first filter tap will be applied to the pixel |
| 930 | * at position -3 with respect to the current filtering position. Since |
| 931 | * kInitialSubPelOffset is set to 8, we first select sub-pixel filter 8, |
| 932 | * which is non-zero only in the last tap. So, applying the filter at the |
| 933 | * current input position will result in an output equal to the pixel at |
| 934 | * offset +4 (-3 + 7) with respect to the current filtering position. |
| 935 | */ |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 936 | const int kPixelSelected = 4; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 937 | |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 938 | /* Assume that each output pixel requires us to step on by 17/16th pixels in |
| 939 | * the input. |
| 940 | */ |
| 941 | const int kInputPixelStep = 17; |
| 942 | |
| 943 | /* The filters are setup in such a way that the expected output produces |
| 944 | * sets of 8 identical output samples. As the filter position moves to the |
| 945 | * next 1/16th pixel position the only active (=128) filter tap moves one |
| 946 | * position to the left, resulting in the same input pixel being replicated |
| 947 | * in to the output for 8 consecutive samples. After each set of 8 positions |
| 948 | * the filters select a different input pixel. kFilterPeriodAdjust below |
| 949 | * computes which input pixel is written to the output for a specified |
| 950 | * x or y position. |
| 951 | */ |
| 952 | |
| 953 | /* Test the horizontal filter. */ |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 954 | ASM_REGISTER_STATE_CHECK( |
| 955 | UUT_->h8_(in, kInputStride, out, kOutputStride, |
| 956 | kChangeFilters[kInitialSubPelOffset], |
| 957 | kInputPixelStep, NULL, 0, Width(), Height())); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 958 | |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 959 | for (int x = 0; x < Width(); ++x) { |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 960 | const int kFilterPeriodAdjust = (x >> 3) << 3; |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 961 | const int ref_x = |
| 962 | kPixelSelected + ((kInitialSubPelOffset |
| 963 | + kFilterPeriodAdjust * kInputPixelStep) |
| 964 | >> SUBPEL_BITS); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 965 | ASSERT_EQ(lookup(in, ref_x), lookup(out, x)) |
| 966 | << "x == " << x << "width = " << Width(); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 967 | } |
| 968 | |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 969 | /* Test the vertical filter. */ |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 970 | ASM_REGISTER_STATE_CHECK( |
| 971 | UUT_->v8_(in, kInputStride, out, kOutputStride, |
| 972 | NULL, 0, kChangeFilters[kInitialSubPelOffset], |
| 973 | kInputPixelStep, Width(), Height())); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 974 | |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 975 | for (int y = 0; y < Height(); ++y) { |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 976 | const int kFilterPeriodAdjust = (y >> 3) << 3; |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 977 | const int ref_y = |
| 978 | kPixelSelected + ((kInitialSubPelOffset |
| 979 | + kFilterPeriodAdjust * kInputPixelStep) |
| 980 | >> SUBPEL_BITS); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 981 | ASSERT_EQ(lookup(in, ref_y * kInputStride), lookup(out, y * kInputStride)) |
| 982 | << "y == " << y; |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 983 | } |
| 984 | |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 985 | /* Test the horizontal and vertical filters in combination. */ |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 986 | ASM_REGISTER_STATE_CHECK( |
| 987 | UUT_->hv8_(in, kInputStride, out, kOutputStride, |
| 988 | kChangeFilters[kInitialSubPelOffset], kInputPixelStep, |
| 989 | kChangeFilters[kInitialSubPelOffset], kInputPixelStep, |
| 990 | Width(), Height())); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 991 | |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 992 | for (int y = 0; y < Height(); ++y) { |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 993 | const int kFilterPeriodAdjustY = (y >> 3) << 3; |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 994 | const int ref_y = |
| 995 | kPixelSelected + ((kInitialSubPelOffset |
| 996 | + kFilterPeriodAdjustY * kInputPixelStep) |
| 997 | >> SUBPEL_BITS); |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 998 | for (int x = 0; x < Width(); ++x) { |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 999 | const int kFilterPeriodAdjustX = (x >> 3) << 3; |
Adrian Grange | 3f10831 | 2013-08-22 16:02:18 -0700 | [diff] [blame] | 1000 | const int ref_x = |
| 1001 | kPixelSelected + ((kInitialSubPelOffset |
| 1002 | + kFilterPeriodAdjustX * kInputPixelStep) |
| 1003 | >> SUBPEL_BITS); |
John Koleszar | 6fd7dd1 | 2013-02-20 15:59:20 -0800 | [diff] [blame] | 1004 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1005 | ASSERT_EQ(lookup(in, ref_y * kInputStride + ref_x), |
| 1006 | lookup(out, y * kOutputStride + x)) |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1007 | << "x == " << x << ", y == " << y; |
| 1008 | } |
| 1009 | } |
| 1010 | } |
| 1011 | |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 1012 | /* This test exercises that enough rows and columns are filtered with every |
| 1013 | possible initial fractional positions and scaling steps. */ |
| 1014 | TEST_P(ConvolveTest, CheckScalingFiltering) { |
| 1015 | uint8_t* const in = input(); |
| 1016 | uint8_t* const out = output(); |
Dmitry Kovalev | 021eaab | 2014-05-14 16:21:41 -0700 | [diff] [blame] | 1017 | const InterpKernel *const eighttap = vp9_get_interp_kernel(EIGHTTAP); |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 1018 | |
| 1019 | SetConstantInput(127); |
| 1020 | |
| 1021 | for (int frac = 0; frac < 16; ++frac) { |
| 1022 | for (int step = 1; step <= 32; ++step) { |
| 1023 | /* Test the horizontal and vertical filters in combination. */ |
James Zern | 29e1b1a | 2014-07-09 21:02:02 -0700 | [diff] [blame] | 1024 | ASM_REGISTER_STATE_CHECK(UUT_->hv8_(in, kInputStride, out, kOutputStride, |
| 1025 | eighttap[frac], step, |
| 1026 | eighttap[frac], step, |
| 1027 | Width(), Height())); |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 1028 | |
| 1029 | CheckGuardBlocks(); |
| 1030 | |
| 1031 | for (int y = 0; y < Height(); ++y) { |
| 1032 | for (int x = 0; x < Width(); ++x) { |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1033 | ASSERT_EQ(lookup(in, y * kInputStride + x), |
| 1034 | lookup(out, y * kOutputStride + x)) |
Tero Rintaluoma | e326cec | 2013-08-22 11:29:19 +0300 | [diff] [blame] | 1035 | << "x == " << x << ", y == " << y |
| 1036 | << ", frac == " << frac << ", step == " << step; |
| 1037 | } |
| 1038 | } |
| 1039 | } |
| 1040 | } |
| 1041 | } |
| 1042 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1043 | using std::tr1::make_tuple; |
| 1044 | |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1045 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1046 | #if HAVE_SSE2 && ARCH_X86_64 |
| 1047 | void wrap_convolve8_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1048 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1049 | const int16_t *filter_x, |
| 1050 | int filter_x_stride, |
| 1051 | const int16_t *filter_y, |
| 1052 | int filter_y_stride, |
| 1053 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1054 | vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, filter_x, |
| 1055 | filter_x_stride, filter_y, filter_y_stride, |
| 1056 | w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1057 | } |
| 1058 | |
| 1059 | void wrap_convolve8_avg_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1060 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1061 | const int16_t *filter_x, |
| 1062 | int filter_x_stride, |
| 1063 | const int16_t *filter_y, |
| 1064 | int filter_y_stride, |
| 1065 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1066 | vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride, |
| 1067 | filter_x, filter_x_stride, |
| 1068 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1069 | } |
| 1070 | |
| 1071 | void wrap_convolve8_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1072 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1073 | const int16_t *filter_x, |
| 1074 | int filter_x_stride, |
| 1075 | const int16_t *filter_y, |
| 1076 | int filter_y_stride, |
| 1077 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1078 | vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride, |
| 1079 | filter_x, filter_x_stride, |
| 1080 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1081 | } |
| 1082 | |
| 1083 | void wrap_convolve8_avg_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1084 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1085 | const int16_t *filter_x, |
| 1086 | int filter_x_stride, |
| 1087 | const int16_t *filter_y, |
| 1088 | int filter_y_stride, |
| 1089 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1090 | vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride, |
| 1091 | filter_x, filter_x_stride, |
| 1092 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1093 | } |
| 1094 | |
| 1095 | void wrap_convolve8_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1096 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1097 | const int16_t *filter_x, |
| 1098 | int filter_x_stride, |
| 1099 | const int16_t *filter_y, |
| 1100 | int filter_y_stride, |
| 1101 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1102 | vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride, |
| 1103 | filter_x, filter_x_stride, |
| 1104 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1105 | } |
| 1106 | |
| 1107 | void wrap_convolve8_avg_sse2_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1108 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1109 | const int16_t *filter_x, |
| 1110 | int filter_x_stride, |
| 1111 | const int16_t *filter_y, |
| 1112 | int filter_y_stride, |
| 1113 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1114 | vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride, |
| 1115 | filter_x, filter_x_stride, |
| 1116 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1117 | } |
| 1118 | |
| 1119 | void wrap_convolve8_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1120 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1121 | const int16_t *filter_x, |
| 1122 | int filter_x_stride, |
| 1123 | const int16_t *filter_y, |
| 1124 | int filter_y_stride, |
| 1125 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1126 | vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, |
| 1127 | filter_x, filter_x_stride, |
| 1128 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1129 | } |
| 1130 | |
| 1131 | void wrap_convolve8_avg_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1132 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1133 | const int16_t *filter_x, |
| 1134 | int filter_x_stride, |
| 1135 | const int16_t *filter_y, |
| 1136 | int filter_y_stride, |
| 1137 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1138 | vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride, |
| 1139 | filter_x, filter_x_stride, |
| 1140 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1141 | } |
| 1142 | |
| 1143 | void wrap_convolve8_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1144 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1145 | const int16_t *filter_x, |
| 1146 | int filter_x_stride, |
| 1147 | const int16_t *filter_y, |
| 1148 | int filter_y_stride, |
| 1149 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1150 | vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride, |
| 1151 | filter_x, filter_x_stride, |
| 1152 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1153 | } |
| 1154 | |
| 1155 | void wrap_convolve8_avg_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1156 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1157 | const int16_t *filter_x, |
| 1158 | int filter_x_stride, |
| 1159 | const int16_t *filter_y, |
| 1160 | int filter_y_stride, |
| 1161 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1162 | vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride, |
| 1163 | filter_x, filter_x_stride, |
| 1164 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1165 | } |
| 1166 | |
| 1167 | void wrap_convolve8_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1168 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1169 | const int16_t *filter_x, |
| 1170 | int filter_x_stride, |
| 1171 | const int16_t *filter_y, |
| 1172 | int filter_y_stride, |
| 1173 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1174 | vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride, |
| 1175 | filter_x, filter_x_stride, |
| 1176 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1177 | } |
| 1178 | |
| 1179 | void wrap_convolve8_avg_sse2_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1180 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1181 | const int16_t *filter_x, |
| 1182 | int filter_x_stride, |
| 1183 | const int16_t *filter_y, |
| 1184 | int filter_y_stride, |
| 1185 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1186 | vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride, |
| 1187 | filter_x, filter_x_stride, |
| 1188 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1189 | } |
| 1190 | |
| 1191 | void wrap_convolve8_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1192 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1193 | const int16_t *filter_x, |
| 1194 | int filter_x_stride, |
| 1195 | const int16_t *filter_y, |
| 1196 | int filter_y_stride, |
| 1197 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1198 | vp9_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, |
| 1199 | filter_x, filter_x_stride, |
| 1200 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1201 | } |
| 1202 | |
| 1203 | void wrap_convolve8_avg_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1204 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1205 | const int16_t *filter_x, |
| 1206 | int filter_x_stride, |
| 1207 | const int16_t *filter_y, |
| 1208 | int filter_y_stride, |
| 1209 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1210 | vp9_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride, |
| 1211 | filter_x, filter_x_stride, |
| 1212 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1213 | } |
| 1214 | |
| 1215 | void wrap_convolve8_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1216 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1217 | const int16_t *filter_x, |
| 1218 | int filter_x_stride, |
| 1219 | const int16_t *filter_y, |
| 1220 | int filter_y_stride, |
| 1221 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1222 | vp9_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride, |
| 1223 | filter_x, filter_x_stride, |
| 1224 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1225 | } |
| 1226 | |
| 1227 | void wrap_convolve8_avg_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1228 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1229 | const int16_t *filter_x, |
| 1230 | int filter_x_stride, |
| 1231 | const int16_t *filter_y, |
| 1232 | int filter_y_stride, |
| 1233 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1234 | vp9_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride, |
| 1235 | filter_x, filter_x_stride, |
| 1236 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1237 | } |
| 1238 | |
| 1239 | void wrap_convolve8_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1240 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1241 | const int16_t *filter_x, |
| 1242 | int filter_x_stride, |
| 1243 | const int16_t *filter_y, |
| 1244 | int filter_y_stride, |
| 1245 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1246 | vp9_highbd_convolve8_sse2(src, src_stride, dst, dst_stride, |
| 1247 | filter_x, filter_x_stride, |
| 1248 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1249 | } |
| 1250 | |
| 1251 | void wrap_convolve8_avg_sse2_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1252 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1253 | const int16_t *filter_x, |
| 1254 | int filter_x_stride, |
| 1255 | const int16_t *filter_y, |
| 1256 | int filter_y_stride, |
| 1257 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1258 | vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride, |
| 1259 | filter_x, filter_x_stride, |
| 1260 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1261 | } |
| 1262 | #endif // HAVE_SSE2 && ARCH_X86_64 |
| 1263 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1264 | void wrap_convolve_copy_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1265 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1266 | const int16_t *filter_x, |
| 1267 | int filter_x_stride, |
| 1268 | const int16_t *filter_y, |
| 1269 | int filter_y_stride, |
| 1270 | int w, int h) { |
| 1271 | vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1272 | filter_x, filter_x_stride, |
| 1273 | filter_y, filter_y_stride, w, h, 8); |
| 1274 | } |
| 1275 | |
| 1276 | void wrap_convolve_avg_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1277 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1278 | const int16_t *filter_x, |
| 1279 | int filter_x_stride, |
| 1280 | const int16_t *filter_y, |
| 1281 | int filter_y_stride, |
| 1282 | int w, int h) { |
| 1283 | vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1284 | filter_x, filter_x_stride, |
| 1285 | filter_y, filter_y_stride, w, h, 8); |
| 1286 | } |
| 1287 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1288 | void wrap_convolve8_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1289 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1290 | const int16_t *filter_x, |
| 1291 | int filter_x_stride, |
| 1292 | const int16_t *filter_y, |
| 1293 | int filter_y_stride, |
| 1294 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1295 | vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
| 1296 | filter_x, filter_x_stride, |
| 1297 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1298 | } |
| 1299 | |
| 1300 | void wrap_convolve8_avg_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1301 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1302 | const int16_t *filter_x, |
| 1303 | int filter_x_stride, |
| 1304 | const int16_t *filter_y, |
| 1305 | int filter_y_stride, |
| 1306 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1307 | vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, |
| 1308 | filter_x, filter_x_stride, |
| 1309 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1310 | } |
| 1311 | |
| 1312 | void wrap_convolve8_vert_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1313 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1314 | const int16_t *filter_x, |
| 1315 | int filter_x_stride, |
| 1316 | const int16_t *filter_y, |
| 1317 | int filter_y_stride, |
| 1318 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1319 | vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride, |
| 1320 | filter_x, filter_x_stride, |
| 1321 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1322 | } |
| 1323 | |
| 1324 | void wrap_convolve8_avg_vert_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1325 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1326 | const int16_t *filter_x, |
| 1327 | int filter_x_stride, |
| 1328 | const int16_t *filter_y, |
| 1329 | int filter_y_stride, |
| 1330 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1331 | vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, |
| 1332 | filter_x, filter_x_stride, |
| 1333 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1334 | } |
| 1335 | |
| 1336 | void wrap_convolve8_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1337 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1338 | const int16_t *filter_x, |
| 1339 | int filter_x_stride, |
| 1340 | const int16_t *filter_y, |
| 1341 | int filter_y_stride, |
| 1342 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1343 | vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride, |
| 1344 | filter_x, filter_x_stride, |
| 1345 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1346 | } |
| 1347 | |
| 1348 | void wrap_convolve8_avg_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1349 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1350 | const int16_t *filter_x, |
| 1351 | int filter_x_stride, |
| 1352 | const int16_t *filter_y, |
| 1353 | int filter_y_stride, |
| 1354 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1355 | vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
| 1356 | filter_x, filter_x_stride, |
| 1357 | filter_y, filter_y_stride, w, h, 8); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1358 | } |
| 1359 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1360 | void wrap_convolve_copy_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1361 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1362 | const int16_t *filter_x, |
| 1363 | int filter_x_stride, |
| 1364 | const int16_t *filter_y, |
| 1365 | int filter_y_stride, |
| 1366 | int w, int h) { |
| 1367 | vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1368 | filter_x, filter_x_stride, |
| 1369 | filter_y, filter_y_stride, w, h, 10); |
| 1370 | } |
| 1371 | |
| 1372 | void wrap_convolve_avg_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1373 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1374 | const int16_t *filter_x, |
| 1375 | int filter_x_stride, |
| 1376 | const int16_t *filter_y, |
| 1377 | int filter_y_stride, |
| 1378 | int w, int h) { |
| 1379 | vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1380 | filter_x, filter_x_stride, |
| 1381 | filter_y, filter_y_stride, w, h, 10); |
| 1382 | } |
| 1383 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1384 | void wrap_convolve8_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1385 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1386 | const int16_t *filter_x, |
| 1387 | int filter_x_stride, |
| 1388 | const int16_t *filter_y, |
| 1389 | int filter_y_stride, |
| 1390 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1391 | vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
| 1392 | filter_x, filter_x_stride, |
| 1393 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1394 | } |
| 1395 | |
| 1396 | void wrap_convolve8_avg_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1397 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1398 | const int16_t *filter_x, |
| 1399 | int filter_x_stride, |
| 1400 | const int16_t *filter_y, |
| 1401 | int filter_y_stride, |
| 1402 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1403 | vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, |
| 1404 | filter_x, filter_x_stride, |
| 1405 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1406 | } |
| 1407 | |
| 1408 | void wrap_convolve8_vert_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1409 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1410 | const int16_t *filter_x, |
| 1411 | int filter_x_stride, |
| 1412 | const int16_t *filter_y, |
| 1413 | int filter_y_stride, |
| 1414 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1415 | vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride, |
| 1416 | filter_x, filter_x_stride, |
| 1417 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1418 | } |
| 1419 | |
| 1420 | void wrap_convolve8_avg_vert_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1421 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1422 | const int16_t *filter_x, |
| 1423 | int filter_x_stride, |
| 1424 | const int16_t *filter_y, |
| 1425 | int filter_y_stride, |
| 1426 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1427 | vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, |
| 1428 | filter_x, filter_x_stride, |
| 1429 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1430 | } |
| 1431 | |
| 1432 | void wrap_convolve8_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1433 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1434 | const int16_t *filter_x, |
| 1435 | int filter_x_stride, |
| 1436 | const int16_t *filter_y, |
| 1437 | int filter_y_stride, |
| 1438 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1439 | vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride, |
| 1440 | filter_x, filter_x_stride, |
| 1441 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1442 | } |
| 1443 | |
| 1444 | void wrap_convolve8_avg_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1445 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1446 | const int16_t *filter_x, |
| 1447 | int filter_x_stride, |
| 1448 | const int16_t *filter_y, |
| 1449 | int filter_y_stride, |
| 1450 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1451 | vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
| 1452 | filter_x, filter_x_stride, |
| 1453 | filter_y, filter_y_stride, w, h, 10); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1454 | } |
| 1455 | |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1456 | void wrap_convolve_copy_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1457 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1458 | const int16_t *filter_x, |
| 1459 | int filter_x_stride, |
| 1460 | const int16_t *filter_y, |
| 1461 | int filter_y_stride, |
| 1462 | int w, int h) { |
| 1463 | vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1464 | filter_x, filter_x_stride, |
| 1465 | filter_y, filter_y_stride, w, h, 12); |
| 1466 | } |
| 1467 | |
| 1468 | void wrap_convolve_avg_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1469 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1470 | const int16_t *filter_x, |
| 1471 | int filter_x_stride, |
| 1472 | const int16_t *filter_y, |
| 1473 | int filter_y_stride, |
| 1474 | int w, int h) { |
| 1475 | vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1476 | filter_x, filter_x_stride, |
| 1477 | filter_y, filter_y_stride, w, h, 12); |
| 1478 | } |
| 1479 | |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1480 | void wrap_convolve8_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1481 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1482 | const int16_t *filter_x, |
| 1483 | int filter_x_stride, |
| 1484 | const int16_t *filter_y, |
| 1485 | int filter_y_stride, |
| 1486 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1487 | vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
| 1488 | filter_x, filter_x_stride, |
| 1489 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1490 | } |
| 1491 | |
| 1492 | void wrap_convolve8_avg_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1493 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1494 | const int16_t *filter_x, |
| 1495 | int filter_x_stride, |
| 1496 | const int16_t *filter_y, |
| 1497 | int filter_y_stride, |
| 1498 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1499 | vp9_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, |
| 1500 | filter_x, filter_x_stride, |
| 1501 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1502 | } |
| 1503 | |
| 1504 | void wrap_convolve8_vert_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1505 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1506 | const int16_t *filter_x, |
| 1507 | int filter_x_stride, |
| 1508 | const int16_t *filter_y, |
| 1509 | int filter_y_stride, |
| 1510 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1511 | vp9_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride, |
| 1512 | filter_x, filter_x_stride, |
| 1513 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1514 | } |
| 1515 | |
| 1516 | void wrap_convolve8_avg_vert_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1517 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1518 | const int16_t *filter_x, |
| 1519 | int filter_x_stride, |
| 1520 | const int16_t *filter_y, |
| 1521 | int filter_y_stride, |
| 1522 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1523 | vp9_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, |
| 1524 | filter_x, filter_x_stride, |
| 1525 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1526 | } |
| 1527 | |
| 1528 | void wrap_convolve8_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1529 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1530 | const int16_t *filter_x, |
| 1531 | int filter_x_stride, |
| 1532 | const int16_t *filter_y, |
| 1533 | int filter_y_stride, |
| 1534 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1535 | vp9_highbd_convolve8_c(src, src_stride, dst, dst_stride, |
| 1536 | filter_x, filter_x_stride, |
| 1537 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1538 | } |
| 1539 | |
| 1540 | void wrap_convolve8_avg_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1541 | uint8_t *dst, ptrdiff_t dst_stride, |
| 1542 | const int16_t *filter_x, |
| 1543 | int filter_x_stride, |
| 1544 | const int16_t *filter_y, |
| 1545 | int filter_y_stride, |
| 1546 | int w, int h) { |
Deb Mukherjee | 1929c9b | 2014-10-08 12:43:22 -0700 | [diff] [blame] | 1547 | vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
| 1548 | filter_x, filter_x_stride, |
| 1549 | filter_y, filter_y_stride, w, h, 12); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1550 | } |
| 1551 | |
| 1552 | const ConvolveFunctions convolve8_c( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1553 | wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1554 | wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8, |
| 1555 | wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8, |
| 1556 | wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8); |
| 1557 | INSTANTIATE_TEST_CASE_P(C_8, ConvolveTest, ::testing::Values( |
| 1558 | make_tuple(4, 4, &convolve8_c), |
| 1559 | make_tuple(8, 4, &convolve8_c), |
| 1560 | make_tuple(4, 8, &convolve8_c), |
| 1561 | make_tuple(8, 8, &convolve8_c), |
| 1562 | make_tuple(16, 8, &convolve8_c), |
| 1563 | make_tuple(8, 16, &convolve8_c), |
| 1564 | make_tuple(16, 16, &convolve8_c), |
| 1565 | make_tuple(32, 16, &convolve8_c), |
| 1566 | make_tuple(16, 32, &convolve8_c), |
| 1567 | make_tuple(32, 32, &convolve8_c), |
| 1568 | make_tuple(64, 32, &convolve8_c), |
| 1569 | make_tuple(32, 64, &convolve8_c), |
| 1570 | make_tuple(64, 64, &convolve8_c))); |
| 1571 | const ConvolveFunctions convolve10_c( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1572 | wrap_convolve_copy_c_10, wrap_convolve_avg_c_10, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1573 | wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10, |
| 1574 | wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10, |
| 1575 | wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10); |
| 1576 | INSTANTIATE_TEST_CASE_P(C_10, ConvolveTest, ::testing::Values( |
| 1577 | make_tuple(4, 4, &convolve10_c), |
| 1578 | make_tuple(8, 4, &convolve10_c), |
| 1579 | make_tuple(4, 8, &convolve10_c), |
| 1580 | make_tuple(8, 8, &convolve10_c), |
| 1581 | make_tuple(16, 8, &convolve10_c), |
| 1582 | make_tuple(8, 16, &convolve10_c), |
| 1583 | make_tuple(16, 16, &convolve10_c), |
| 1584 | make_tuple(32, 16, &convolve10_c), |
| 1585 | make_tuple(16, 32, &convolve10_c), |
| 1586 | make_tuple(32, 32, &convolve10_c), |
| 1587 | make_tuple(64, 32, &convolve10_c), |
| 1588 | make_tuple(32, 64, &convolve10_c), |
| 1589 | make_tuple(64, 64, &convolve10_c))); |
| 1590 | const ConvolveFunctions convolve12_c( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1591 | wrap_convolve_copy_c_12, wrap_convolve_avg_c_12, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1592 | wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12, |
| 1593 | wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12, |
| 1594 | wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12); |
| 1595 | INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values( |
| 1596 | make_tuple(4, 4, &convolve12_c), |
| 1597 | make_tuple(8, 4, &convolve12_c), |
| 1598 | make_tuple(4, 8, &convolve12_c), |
| 1599 | make_tuple(8, 8, &convolve12_c), |
| 1600 | make_tuple(16, 8, &convolve12_c), |
| 1601 | make_tuple(8, 16, &convolve12_c), |
| 1602 | make_tuple(16, 16, &convolve12_c), |
| 1603 | make_tuple(32, 16, &convolve12_c), |
| 1604 | make_tuple(16, 32, &convolve12_c), |
| 1605 | make_tuple(32, 32, &convolve12_c), |
| 1606 | make_tuple(64, 32, &convolve12_c), |
| 1607 | make_tuple(32, 64, &convolve12_c), |
| 1608 | make_tuple(64, 64, &convolve12_c))); |
| 1609 | |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1610 | #else |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1611 | |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1612 | const ConvolveFunctions convolve8_c( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1613 | vp9_convolve_copy_c, vp9_convolve_avg_c, |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1614 | vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c, |
| 1615 | vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1616 | vp9_convolve8_c, vp9_convolve8_avg_c, 0); |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1617 | |
| 1618 | INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values( |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1619 | make_tuple(4, 4, &convolve8_c), |
| 1620 | make_tuple(8, 4, &convolve8_c), |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 1621 | make_tuple(4, 8, &convolve8_c), |
John Koleszar | 5ca6a36 | 2013-01-25 09:47:09 -0800 | [diff] [blame] | 1622 | make_tuple(8, 8, &convolve8_c), |
John Koleszar | 6a4f708 | 2013-02-08 17:49:44 -0800 | [diff] [blame] | 1623 | make_tuple(16, 8, &convolve8_c), |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 1624 | make_tuple(8, 16, &convolve8_c), |
| 1625 | make_tuple(16, 16, &convolve8_c), |
| 1626 | make_tuple(32, 16, &convolve8_c), |
| 1627 | make_tuple(16, 32, &convolve8_c), |
| 1628 | make_tuple(32, 32, &convolve8_c), |
| 1629 | make_tuple(64, 32, &convolve8_c), |
| 1630 | make_tuple(32, 64, &convolve8_c), |
| 1631 | make_tuple(64, 64, &convolve8_c))); |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1632 | #endif |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 1633 | |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1634 | #if HAVE_SSE2 && ARCH_X86_64 |
| 1635 | #if CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1636 | const ConvolveFunctions convolve8_sse2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1637 | wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1638 | wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8, |
| 1639 | wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8, |
| 1640 | wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8); |
Deb Mukherjee | 27dce0f | 2014-11-07 10:19:46 -0800 | [diff] [blame] | 1641 | const ConvolveFunctions convolve10_sse2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1642 | wrap_convolve_copy_c_10, wrap_convolve_avg_c_10, |
Deb Mukherjee | 27dce0f | 2014-11-07 10:19:46 -0800 | [diff] [blame] | 1643 | wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10, |
| 1644 | wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10, |
| 1645 | wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10); |
| 1646 | const ConvolveFunctions convolve12_sse2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1647 | wrap_convolve_copy_c_12, wrap_convolve_avg_c_12, |
Deb Mukherjee | 27dce0f | 2014-11-07 10:19:46 -0800 | [diff] [blame] | 1648 | wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12, |
| 1649 | wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12, |
| 1650 | wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12); |
| 1651 | INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1652 | make_tuple(4, 4, &convolve8_sse2), |
| 1653 | make_tuple(8, 4, &convolve8_sse2), |
| 1654 | make_tuple(4, 8, &convolve8_sse2), |
| 1655 | make_tuple(8, 8, &convolve8_sse2), |
| 1656 | make_tuple(16, 8, &convolve8_sse2), |
| 1657 | make_tuple(8, 16, &convolve8_sse2), |
| 1658 | make_tuple(16, 16, &convolve8_sse2), |
| 1659 | make_tuple(32, 16, &convolve8_sse2), |
| 1660 | make_tuple(16, 32, &convolve8_sse2), |
| 1661 | make_tuple(32, 32, &convolve8_sse2), |
| 1662 | make_tuple(64, 32, &convolve8_sse2), |
| 1663 | make_tuple(32, 64, &convolve8_sse2), |
Deb Mukherjee | 27dce0f | 2014-11-07 10:19:46 -0800 | [diff] [blame] | 1664 | make_tuple(64, 64, &convolve8_sse2), |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1665 | make_tuple(4, 4, &convolve10_sse2), |
| 1666 | make_tuple(8, 4, &convolve10_sse2), |
| 1667 | make_tuple(4, 8, &convolve10_sse2), |
| 1668 | make_tuple(8, 8, &convolve10_sse2), |
| 1669 | make_tuple(16, 8, &convolve10_sse2), |
| 1670 | make_tuple(8, 16, &convolve10_sse2), |
| 1671 | make_tuple(16, 16, &convolve10_sse2), |
| 1672 | make_tuple(32, 16, &convolve10_sse2), |
| 1673 | make_tuple(16, 32, &convolve10_sse2), |
| 1674 | make_tuple(32, 32, &convolve10_sse2), |
| 1675 | make_tuple(64, 32, &convolve10_sse2), |
| 1676 | make_tuple(32, 64, &convolve10_sse2), |
Deb Mukherjee | 27dce0f | 2014-11-07 10:19:46 -0800 | [diff] [blame] | 1677 | make_tuple(64, 64, &convolve10_sse2), |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1678 | make_tuple(4, 4, &convolve12_sse2), |
| 1679 | make_tuple(8, 4, &convolve12_sse2), |
| 1680 | make_tuple(4, 8, &convolve12_sse2), |
| 1681 | make_tuple(8, 8, &convolve12_sse2), |
| 1682 | make_tuple(16, 8, &convolve12_sse2), |
| 1683 | make_tuple(8, 16, &convolve12_sse2), |
| 1684 | make_tuple(16, 16, &convolve12_sse2), |
| 1685 | make_tuple(32, 16, &convolve12_sse2), |
| 1686 | make_tuple(16, 32, &convolve12_sse2), |
| 1687 | make_tuple(32, 32, &convolve12_sse2), |
| 1688 | make_tuple(64, 32, &convolve12_sse2), |
| 1689 | make_tuple(32, 64, &convolve12_sse2), |
| 1690 | make_tuple(64, 64, &convolve12_sse2))); |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1691 | #else |
Yunqing Wang | 3fb728c | 2013-10-10 13:51:35 -0700 | [diff] [blame] | 1692 | const ConvolveFunctions convolve8_sse2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1693 | vp9_convolve_copy_sse2, vp9_convolve_avg_sse2, |
Yunqing Wang | 3fb728c | 2013-10-10 13:51:35 -0700 | [diff] [blame] | 1694 | vp9_convolve8_horiz_sse2, vp9_convolve8_avg_horiz_sse2, |
| 1695 | vp9_convolve8_vert_sse2, vp9_convolve8_avg_vert_sse2, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1696 | vp9_convolve8_sse2, vp9_convolve8_avg_sse2, 0); |
Yunqing Wang | 3fb728c | 2013-10-10 13:51:35 -0700 | [diff] [blame] | 1697 | |
| 1698 | INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( |
| 1699 | make_tuple(4, 4, &convolve8_sse2), |
| 1700 | make_tuple(8, 4, &convolve8_sse2), |
| 1701 | make_tuple(4, 8, &convolve8_sse2), |
| 1702 | make_tuple(8, 8, &convolve8_sse2), |
| 1703 | make_tuple(16, 8, &convolve8_sse2), |
| 1704 | make_tuple(8, 16, &convolve8_sse2), |
| 1705 | make_tuple(16, 16, &convolve8_sse2), |
| 1706 | make_tuple(32, 16, &convolve8_sse2), |
| 1707 | make_tuple(16, 32, &convolve8_sse2), |
| 1708 | make_tuple(32, 32, &convolve8_sse2), |
| 1709 | make_tuple(64, 32, &convolve8_sse2), |
| 1710 | make_tuple(32, 64, &convolve8_sse2), |
| 1711 | make_tuple(64, 64, &convolve8_sse2))); |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1712 | #endif // CONFIG_VP9_HIGHBITDEPTH |
Deb Mukherjee | 10783d4 | 2014-09-02 16:34:09 -0700 | [diff] [blame] | 1713 | #endif |
Yunqing Wang | 3fb728c | 2013-10-10 13:51:35 -0700 | [diff] [blame] | 1714 | |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 1715 | #if HAVE_SSSE3 |
| 1716 | const ConvolveFunctions convolve8_ssse3( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1717 | vp9_convolve_copy_c, vp9_convolve_avg_c, |
Jim Bankoski | c3809f3 | 2013-08-05 12:07:30 -0700 | [diff] [blame] | 1718 | vp9_convolve8_horiz_ssse3, vp9_convolve8_avg_horiz_ssse3, |
| 1719 | vp9_convolve8_vert_ssse3, vp9_convolve8_avg_vert_ssse3, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1720 | vp9_convolve8_ssse3, vp9_convolve8_avg_ssse3, 0); |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 1721 | |
| 1722 | INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values( |
| 1723 | make_tuple(4, 4, &convolve8_ssse3), |
| 1724 | make_tuple(8, 4, &convolve8_ssse3), |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 1725 | make_tuple(4, 8, &convolve8_ssse3), |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 1726 | make_tuple(8, 8, &convolve8_ssse3), |
John Koleszar | 6a4f708 | 2013-02-08 17:49:44 -0800 | [diff] [blame] | 1727 | make_tuple(16, 8, &convolve8_ssse3), |
John Koleszar | a9ebbcc | 2013-04-18 13:05:38 -0700 | [diff] [blame] | 1728 | make_tuple(8, 16, &convolve8_ssse3), |
| 1729 | make_tuple(16, 16, &convolve8_ssse3), |
| 1730 | make_tuple(32, 16, &convolve8_ssse3), |
| 1731 | make_tuple(16, 32, &convolve8_ssse3), |
| 1732 | make_tuple(32, 32, &convolve8_ssse3), |
| 1733 | make_tuple(64, 32, &convolve8_ssse3), |
| 1734 | make_tuple(32, 64, &convolve8_ssse3), |
| 1735 | make_tuple(64, 64, &convolve8_ssse3))); |
John Koleszar | 29d47ac | 2013-02-07 17:00:37 -0800 | [diff] [blame] | 1736 | #endif |
Johann | 158c80c | 2013-05-23 12:50:41 -0700 | [diff] [blame] | 1737 | |
Johann | 8645a53 | 2014-09-10 10:27:58 -0700 | [diff] [blame] | 1738 | #if HAVE_AVX2 && HAVE_SSSE3 |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1739 | const ConvolveFunctions convolve8_avx2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1740 | vp9_convolve_copy_c, vp9_convolve_avg_c, |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1741 | vp9_convolve8_horiz_avx2, vp9_convolve8_avg_horiz_ssse3, |
| 1742 | vp9_convolve8_vert_avx2, vp9_convolve8_avg_vert_ssse3, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1743 | vp9_convolve8_avx2, vp9_convolve8_avg_ssse3, 0); |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1744 | |
| 1745 | INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values( |
| 1746 | make_tuple(4, 4, &convolve8_avx2), |
| 1747 | make_tuple(8, 4, &convolve8_avx2), |
| 1748 | make_tuple(4, 8, &convolve8_avx2), |
| 1749 | make_tuple(8, 8, &convolve8_avx2), |
levytamar82 | 839911f | 2014-07-27 16:45:55 -0700 | [diff] [blame] | 1750 | make_tuple(8, 16, &convolve8_avx2), |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1751 | make_tuple(16, 8, &convolve8_avx2), |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1752 | make_tuple(16, 16, &convolve8_avx2), |
| 1753 | make_tuple(32, 16, &convolve8_avx2), |
| 1754 | make_tuple(16, 32, &convolve8_avx2), |
| 1755 | make_tuple(32, 32, &convolve8_avx2), |
| 1756 | make_tuple(64, 32, &convolve8_avx2), |
| 1757 | make_tuple(32, 64, &convolve8_avx2), |
| 1758 | make_tuple(64, 64, &convolve8_avx2))); |
Johann | 8645a53 | 2014-09-10 10:27:58 -0700 | [diff] [blame] | 1759 | #endif // HAVE_AVX2 && HAVE_SSSE3 |
Yunqing Wang | 4f0943b | 2014-05-27 10:36:56 -0700 | [diff] [blame] | 1760 | |
Scott LaVarnway | 617382a | 2014-09-10 09:49:34 -0700 | [diff] [blame^] | 1761 | #if HAVE_NEON |
Johann | ce23931 | 2014-05-07 11:01:31 -0700 | [diff] [blame] | 1762 | #if HAVE_NEON_ASM |
Johann | 158c80c | 2013-05-23 12:50:41 -0700 | [diff] [blame] | 1763 | const ConvolveFunctions convolve8_neon( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1764 | vp9_convolve_copy_neon, vp9_convolve_avg_neon, |
Johann | a15bebf | 2013-07-12 16:12:58 -0700 | [diff] [blame] | 1765 | vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon, |
| 1766 | vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1767 | vp9_convolve8_neon, vp9_convolve8_avg_neon, 0); |
Scott LaVarnway | 617382a | 2014-09-10 09:49:34 -0700 | [diff] [blame^] | 1768 | #else // HAVE_NEON |
| 1769 | const ConvolveFunctions convolve8_neon( |
| 1770 | vp9_convolve_copy_c, vp9_convolve_avg_neon, |
| 1771 | vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c, |
| 1772 | vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c, |
| 1773 | vp9_convolve8_c, vp9_convolve8_avg_c, 0); |
| 1774 | #endif // HAVE_NEON_ASM |
Johann | 158c80c | 2013-05-23 12:50:41 -0700 | [diff] [blame] | 1775 | |
| 1776 | INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values( |
| 1777 | make_tuple(4, 4, &convolve8_neon), |
| 1778 | make_tuple(8, 4, &convolve8_neon), |
| 1779 | make_tuple(4, 8, &convolve8_neon), |
| 1780 | make_tuple(8, 8, &convolve8_neon), |
| 1781 | make_tuple(16, 8, &convolve8_neon), |
| 1782 | make_tuple(8, 16, &convolve8_neon), |
| 1783 | make_tuple(16, 16, &convolve8_neon), |
| 1784 | make_tuple(32, 16, &convolve8_neon), |
| 1785 | make_tuple(16, 32, &convolve8_neon), |
| 1786 | make_tuple(32, 32, &convolve8_neon), |
| 1787 | make_tuple(64, 32, &convolve8_neon), |
| 1788 | make_tuple(32, 64, &convolve8_neon), |
| 1789 | make_tuple(64, 64, &convolve8_neon))); |
Scott LaVarnway | 617382a | 2014-09-10 09:49:34 -0700 | [diff] [blame^] | 1790 | #endif // HAVE_NEON |
Parag Salasakar | 40edab5 | 2013-09-13 15:18:32 +0530 | [diff] [blame] | 1791 | |
| 1792 | #if HAVE_DSPR2 |
| 1793 | const ConvolveFunctions convolve8_dspr2( |
Johann | 1c3594c | 2014-12-09 12:05:15 -0800 | [diff] [blame] | 1794 | vp9_convolve_copy_dspr2, vp9_convolve_avg_dspr2, |
Parag Salasakar | 40edab5 | 2013-09-13 15:18:32 +0530 | [diff] [blame] | 1795 | vp9_convolve8_horiz_dspr2, vp9_convolve8_avg_horiz_dspr2, |
| 1796 | vp9_convolve8_vert_dspr2, vp9_convolve8_avg_vert_dspr2, |
Deb Mukherjee | 0d3c3d3 | 2014-09-16 12:47:18 -0700 | [diff] [blame] | 1797 | vp9_convolve8_dspr2, vp9_convolve8_avg_dspr2, 0); |
Parag Salasakar | 40edab5 | 2013-09-13 15:18:32 +0530 | [diff] [blame] | 1798 | |
| 1799 | INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values( |
| 1800 | make_tuple(4, 4, &convolve8_dspr2), |
| 1801 | make_tuple(8, 4, &convolve8_dspr2), |
| 1802 | make_tuple(4, 8, &convolve8_dspr2), |
| 1803 | make_tuple(8, 8, &convolve8_dspr2), |
| 1804 | make_tuple(16, 8, &convolve8_dspr2), |
| 1805 | make_tuple(8, 16, &convolve8_dspr2), |
| 1806 | make_tuple(16, 16, &convolve8_dspr2), |
| 1807 | make_tuple(32, 16, &convolve8_dspr2), |
| 1808 | make_tuple(16, 32, &convolve8_dspr2), |
| 1809 | make_tuple(32, 32, &convolve8_dspr2), |
| 1810 | make_tuple(64, 32, &convolve8_dspr2), |
| 1811 | make_tuple(32, 64, &convolve8_dspr2), |
| 1812 | make_tuple(64, 64, &convolve8_dspr2))); |
| 1813 | #endif |
James Zern | 8fb48af | 2013-05-02 13:08:19 -0700 | [diff] [blame] | 1814 | } // namespace |