OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 for (r = 0; r < 8; ++r) { | 272 for (r = 0; r < 8; ++r) { |
273 const uint8x8_t v_sig = vld1_u8(sig); | 273 const uint8x8_t v_sig = vld1_u8(sig); |
274 const uint16x4_t _76_54_32_10 = vpaddl_u8(v_sig); | 274 const uint16x4_t _76_54_32_10 = vpaddl_u8(v_sig); |
275 v_sum_block = vqadd_u16(v_sum_block, _76_54_32_10); | 275 v_sum_block = vqadd_u16(v_sum_block, _76_54_32_10); |
276 sig += sig_stride; | 276 sig += sig_stride; |
277 } | 277 } |
278 sig -= sig_stride * 8; | 278 sig -= sig_stride * 8; |
279 { | 279 { |
280 const uint32x2_t _7654_3210 = vpaddl_u16(v_sum_block); | 280 const uint32x2_t _7654_3210 = vpaddl_u16(v_sum_block); |
281 const uint64x1_t _76543210 = vpaddl_u32(_7654_3210); | 281 const uint64x1_t _76543210 = vpaddl_u32(_7654_3210); |
282 const unsigned int sum_block = | 282 const int sum_block = |
283 vget_lane_u32(vreinterpret_u32_u64(_76543210), 0); | 283 vget_lane_s32(vreinterpret_s32_u64(_76543210), 0); |
284 if (abs(sum_block - (128 * 8 * 8)) < SUM_DIFF_FROM_AVG_THRESH_UV) { | 284 if (abs(sum_block - (128 * 8 * 8)) < SUM_DIFF_FROM_AVG_THRESH_UV) { |
285 return COPY_BLOCK; | 285 return COPY_BLOCK; |
286 } | 286 } |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 /* Go over lines. */ | 290 /* Go over lines. */ |
291 for (r = 0; r < 4; ++r) { | 291 for (r = 0; r < 4; ++r) { |
292 /* Load inputs. */ | 292 /* Load inputs. */ |
293 const uint8x8_t v_sig_lo = vld1_u8(sig); | 293 const uint8x8_t v_sig_lo = vld1_u8(sig); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 } | 469 } |
470 | 470 |
471 /* Tell above level that block was filtered. */ | 471 /* Tell above level that block was filtered. */ |
472 running_avg -= running_avg_stride * 8; | 472 running_avg -= running_avg_stride * 8; |
473 sig -= sig_stride * 8; | 473 sig -= sig_stride * 8; |
474 | 474 |
475 vp8_copy_mem8x8(running_avg, running_avg_stride, sig, sig_stride); | 475 vp8_copy_mem8x8(running_avg, running_avg_stride, sig, sig_stride); |
476 | 476 |
477 return FILTER_BLOCK; | 477 return FILTER_BLOCK; |
478 } | 478 } |
OLD | NEW |