/* * 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.
*/
staticinlinevoid highbd_convolve8_horiz_2tap_neon( const uint16_t *src_ptr, ptrdiff_t src_stride, uint16_t *dst_ptr,
ptrdiff_t dst_stride, const int16_t *x_filter_ptr, int w, int h, int bd) { // Bilinear filter values are all positive and multiples of 8. Divide by 8 to // reduce intermediate precision requirements and allow the use of non // widening multiply. const uint16x8_t f0 = vdupq_n_u16((uint16_t)x_filter_ptr[3] / 8); const uint16x8_t f1 = vdupq_n_u16((uint16_t)x_filter_ptr[4] / 8);
const uint16x8_t max = vdupq_n_u16((1 << bd) - 1);
// We divided filter taps by 8 so subtract 3 from right shift.
sum01 = vrshrq_n_u16(sum01, FILTER_BITS - 3);
sum23 = vrshrq_n_u16(sum23, FILTER_BITS - 3);
// We divided filter taps by 8 so subtract 3 from right shift.
sum01 = vrshrq_n_u16(sum01, FILTER_BITS - 3);
sum23 = vrshrq_n_u16(sum23, FILTER_BITS - 3);
s += 4 * src_stride;
d += 4 * dst_stride;
height -= 4;
} while (height > 0);
src_ptr += 8;
dst_ptr += 8;
w -= 8;
} while (w > 0);
}
}
staticinlinevoid highbd_convolve8_vert_2tap_neon( const uint16_t *src_ptr, ptrdiff_t src_stride, uint16_t *dst_ptr,
ptrdiff_t dst_stride, const int16_t *x_filter_ptr, int w, int h, int bd) { // Bilinear filter values are all positive and multiples of 8. Divide by 8 to // reduce intermediate precision requirements and allow the use of non // widening multiply. const uint16x8_t f0 = vdupq_n_u16((uint16_t)x_filter_ptr[3] / 8); const uint16x8_t f1 = vdupq_n_u16((uint16_t)x_filter_ptr[4] / 8);
const uint16x8_t max = vdupq_n_u16((1 << bd) - 1);
// We divided filter taps by 8 so subtract 3 from right shift.
sum01 = vrshrq_n_u16(sum01, FILTER_BITS - 3);
sum23 = vrshrq_n_u16(sum23, FILTER_BITS - 3);
// We divided filter taps by 8 so subtract 3 from right shift.
sum01 = vrshrq_n_u16(sum01, FILTER_BITS - 3);
sum23 = vrshrq_n_u16(sum23, FILTER_BITS - 3);
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.