/* * Copyright (c) 2023, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
staticinlinevoid get_blk_sse_sum_4xh_neon(const int16_t *data, int stride, int bh, int *x_sum,
int64_t *x2_sum) { int i = bh;
int32x4_t sum = vdupq_n_s32(0);
int32x4_t sse = vdupq_n_s32(0);
do {
int16x8_t d = vcombine_s16(vld1_s16(data), vld1_s16(data + stride));
staticinlinevoid get_blk_sse_sum_8xh_neon(const int16_t *data, int stride, int bh, int *x_sum,
int64_t *x2_sum) { int i = bh;
int32x4_t sum = vdupq_n_s32(0);
int32x4_t sse = vdupq_n_s32(0);
// Input is 12-bit wide, so we can add up to 127 squared elements in a signed // 32-bits element. Since we're accumulating into an int32x4_t and the maximum // value for bh is 32, we don't have to worry about sse overflowing.
staticinlinevoid get_blk_sse_sum_large_neon(const int16_t *data, int stride, int bw, int bh, int *x_sum,
int64_t *x2_sum) {
int32x4_t sum = vdupq_n_s32(0);
int64x2_t sse = vdupq_n_s64(0);
// Input is 12-bit wide, so we can add up to 127 squared elements in a signed // 32-bits element. Since we're accumulating into an int32x4_t vector that // means we can process up to (127*4)/bw rows before we need to widen to // 64 bits.
int i_limit = (127 * 4) / bw; int i_tmp = bh > i_limit ? i_limit : bh;
int i = 0; do {
int32x4_t sse_s32 = vdupq_n_s32(0); do { int j = bw; const int16_t *data_ptr = data; do {
int16x8_t d = vld1q_s16(data_ptr);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.