/* * 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.
*/
// Use tbl for doing a double-width zero extension from 8->32 bits since we can // do this in one instruction rather than two (indices out of range (255 here) // are set to zero by tbl).
DECLARE_ALIGNED(16, staticconst uint8_t, obmc_variance_permute_idx[]) = {
0, 255, 255, 255, 1, 255, 255, 255, 2, 255, 255, 255, 3, 255, 255, 255,
4, 255, 255, 255, 5, 255, 255, 255, 6, 255, 255, 255, 7, 255, 255, 255,
8, 255, 255, 255, 9, 255, 255, 255, 10, 255, 255, 255, 11, 255, 255, 255,
12, 255, 255, 255, 13, 255, 255, 255, 14, 255, 255, 255, 15, 255, 255, 255
};
staticinlineunsignedint obmc_sad_large_neon(const uint8_t *ref, int ref_stride, const int32_t *wsrc, const int32_t *mask, int width, int height) {
uint32x4_t sum[2] = { vdupq_n_u32(0), vdupq_n_u32(0) };
// Use tbl for doing a double-width zero extension from 8->32 bits since we // can do this in one instruction rather than two.
uint8x16_t pre_idx0 = vld1q_u8(&obmc_variance_permute_idx[0]);
uint8x16_t pre_idx1 = vld1q_u8(&obmc_variance_permute_idx[16]);
uint8x16_t pre_idx2 = vld1q_u8(&obmc_variance_permute_idx[32]);
uint8x16_t pre_idx3 = vld1q_u8(&obmc_variance_permute_idx[48]);
int h = height; do { int w = width; const uint8_t *ref_ptr = ref; do {
uint8x16_t r = vld1q_u8(ref_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.