/* * Copyright (c) 2024, 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.
*/
staticinline uint16_t highbd_find_average_sve(const uint16_t *src, int src_stride, int width, int height) {
uint64x2_t avg_u64 = vdupq_n_u64(0);
uint16x8_t ones = vdupq_n_u16(1);
// Use a predicate to compute the last columns.
svbool_t pattern = svwhilelt_b16_u32(0, width % 8 == 0 ? 8 : width % 8);
int h = height; do { int j = width; const uint16_t *src_ptr = src; while (j > 8) {
uint16x8_t s = vld1q_u16(src_ptr);
avg_u64 = aom_udotq_u16(avg_u64, s, ones);
if (wiener_win == WIENER_WIN) {
compute_stats_win7_sve(dgd_avg, d_stride, src_avg, s_stride, width, height,
M, H);
} else {
assert(wiener_win == WIENER_WIN_CHROMA);
compute_stats_win5_sve(dgd_avg, d_stride, src_avg, s_stride, width, height,
M, H);
}
// H is a symmetric matrix, so we only need to fill out the upper triangle. // We can copy it down to the lower triangle outside the (i, j) loops. if (bit_depth == AOM_BITS_8) {
diagonal_copy_stats_neon(wiener_win2, H);
} elseif (bit_depth == AOM_BITS_10) { // bit_depth == EB_TEN_BIT const int32_t k4 = wiener_win2 & ~3;
int32_t k = 0; do {
int64x2_t dst = div4_neon(vld1q_s64(M + k));
vst1q_s64(M + k, dst);
dst = div4_neon(vld1q_s64(M + k + 2));
vst1q_s64(M + k + 2, dst);
H[k * wiener_win2 + k] /= 4;
k += 4;
} while (k < k4);
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.