// Dot product constant: // The shim of 128 << FILTER_BITS is needed because we are subtracting 128 // from every source value. The additional right shift by one is needed // because we halve the filter values. const int32x4_t acc = vdupq_n_s32((128 << FILTER_BITS) >> 1);
dst += 8 * dst_stride;
src += 8 * src_stride;
h -= 8;
} while (h > 0);
}
static inline void scale_plane_2_to_1_8tap(const uint8_t *src, const int src_stride, uint8_t *dst, const int dst_stride, const int w, const int h, const int16_t *const filter_ptr,
uint8_t *const im_block) {
assert(w > 0 && h > 0);
const int im_h = 2 * h + SUBPEL_TAPS - 3; const int im_stride = (w + 7) & ~7; // All filter values are even, halve them to fit in int8_t when applying // horizontal filter and stay in 16-bit elements when applying vertical // filter. const int16x8_t filters = vshrq_n_s16(vld1q_s16(filter_ptr), 1);
// We can specialise the vertical filtering for 6-tap filters given that the // EIGHTTAP_SMOOTH and EIGHTTAP_REGULAR filters are 0-padded.
scale_2_to_1_vert_6tap(im_block + im_stride, im_stride, w, h, dst, dst_stride,
filters);
}
// Dot product constant: // The shim of 128 << FILTER_BITS is needed because we are subtracting 128 // from every source value. The additional right shift by one is needed // because we halved the filter values and will use a pairwise add. const int32x4_t acc = vdupq_n_s32((128 << FILTER_BITS) >> 2);
dst += 8 * dst_stride;
src += 8 * src_stride;
h -= 8;
} while (h > 0);
}
static inline void scale_plane_4_to_1_8tap(const uint8_t *src, const int src_stride, uint8_t *dst, const int dst_stride, const int w, const int h, const int16_t *const filter_ptr,
uint8_t *const im_block) {
assert(w > 0 && h > 0); const int im_h = 4 * h + SUBPEL_TAPS - 2; const int im_stride = (w + 1) & ~1; // All filter values are even, halve them to fit in int8_t when applying // horizontal filter and stay in 16-bit elements when applying vertical // filter. const int16x8_t filters = vshrq_n_s16(vld1q_s16(filter_ptr), 1);
// We can specialise the vertical filtering for 6-tap filters given that the // EIGHTTAP_SMOOTH and EIGHTTAP_REGULAR filters are 0-padded.
scale_4_to_1_vert_6tap(im_block + im_stride, im_stride, w, h, dst, dst_stride,
filters);
}
// We use AOMMIN(num_planes, MAX_MB_PLANE) instead of num_planes to quiet // the static analysis warnings.
int malloc_failed = 0;
for (int i = 0; i < AOMMIN(num_planes, MAX_MB_PLANE); ++i) { const int is_uv = i > 0; const int src_w = src->crop_widths[is_uv]; const int src_h = src->crop_heights[is_uv]; const int dst_w = dst->crop_widths[is_uv]; const int dst_h = dst->crop_heights[is_uv]; const int dst_y_w = (dst->crop_widths[0] + 1) & ~1; const int dst_y_h = (dst->crop_heights[0] + 1) & ~1;
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.