static INLINE uint32_t highbd_sad16xh_neon(const uint8_t *src_ptr,
int src_stride, const uint8_t *ref_ptr,
int ref_stride, int h) { const uint16_t *src16_ptr = CONVERT_TO_SHORTPTR(src_ptr); const uint16_t *ref16_ptr = CONVERT_TO_SHORTPTR(ref_ptr);
uint32x4_t sum_u32 = vdupq_n_u32(0);
// 'h_overflow' is the number of 16-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 16 16-wide rows using two accumulators. const int h_overflow = 16; // If block height 'h' is smaller than this limit, use 'h' instead. const int h_limit = h < h_overflow ? h : h_overflow;
assert(h % h_limit == 0);
do {
uint16x8_t sum_u16[2] = { vdupq_n_u16(0), vdupq_n_u16(0) };
int i = h_limit; do {
uint16x8_t s0, s1, r0, r1;
static INLINE uint32_t highbd_sad32xh_neon(const uint8_t *src_ptr,
int src_stride, const uint8_t *ref_ptr,
int ref_stride, int h) { // 'h_overflow' is the number of 32-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 16 32-wide rows using four accumulators. const int h_overflow = 16; return highbd_sadwxh_neon(src_ptr, src_stride, ref_ptr, ref_stride, 32, h,
h_overflow);
}
static INLINE uint32_t highbd_sad64xh_neon(const uint8_t *src_ptr,
int src_stride, const uint8_t *ref_ptr,
int ref_stride, int h) { // 'h_overflow' is the number of 64-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 8 64-wide rows using four accumulators. const int h_overflow = 8; return highbd_sadwxh_neon(src_ptr, src_stride, ref_ptr, ref_stride, 64, h,
h_overflow);
}
#define HBD_SAD_WXH_NEON(w, h) \ unsigned int vpx_highbd_sad##w##x##h##_neon( \ const uint8_t *src, int src_stride, const uint8_t *ref, \
int ref_stride) { \ return highbd_sad##w##xh_neon(src, src_stride, ref, ref_stride, (h)); \
}
// 'h_overflow' is the number of 16-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 16 16-wide rows using two accumulators. const int h_overflow = 16; // If block height 'h' is smaller than this limit, use 'h' instead. const int h_limit = h < h_overflow ? h : h_overflow;
assert(h % h_limit == 0);
do {
uint16x8_t sum_u16[2] = { vdupq_n_u16(0), vdupq_n_u16(0) };
int i = h_limit; do {
uint16x8_t s0, s1, r0, r1, p0, p1;
uint16x8_t avg0, avg1;
static INLINE uint32_t highbd_sad32xh_avg_neon(const uint8_t *src_ptr,
int src_stride, const uint8_t *ref_ptr,
int ref_stride, int h, const uint8_t *second_pred) { // 'h_overflow' is the number of 32-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 16 32-wide rows using four accumulators. const int h_overflow = 16; return highbd_sadwxh_avg_neon(src_ptr, src_stride, ref_ptr, ref_stride, 32, h,
second_pred, h_overflow);
}
static INLINE uint32_t highbd_sad64xh_avg_neon(const uint8_t *src_ptr,
int src_stride, const uint8_t *ref_ptr,
int ref_stride, int h, const uint8_t *second_pred) { // 'h_overflow' is the number of 64-wide rows we can process before 16-bit // accumulators overflow. After hitting this limit accumulate into 32-bit // elements. 65535 / 4095 ~= 16, so 8 64-wide rows using four accumulators. const int h_overflow = 8; return highbd_sadwxh_avg_neon(src_ptr, src_stride, ref_ptr, ref_stride, 64, h,
second_pred, h_overflow);
}
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.