// 4x<h> blocks are processed two rows at a time, so require an extra row of // padding.
SUBPEL_VARIANCE_WXH_NEON(4, 4, 2)
SUBPEL_VARIANCE_WXH_NEON(4, 8, 2)
// Combine bilinear filter with vpx_comp_avg_pred for large blocks. staticvoid avg_pred_var_filter_block2d_bil_large( const uint8_t *src_ptr, uint8_t *dst_ptr, int src_stride, int pixel_step,
int dst_width, int dst_height, int filter_offset, const uint8_t *second_pred) { const uint8x8_t f0 = vdup_n_u8(8 - filter_offset); const uint8x8_t f1 = vdup_n_u8(filter_offset);
int i = dst_height; do {
int j = 0; do {
uint8x16_t s0 = vld1q_u8(src_ptr + j);
uint8x16_t s1 = vld1q_u8(src_ptr + j + pixel_step);
uint16x8_t blend_l =
vmlal_u8(vmull_u8(vget_low_u8(s0), f0), vget_low_u8(s1), f1);
uint16x8_t blend_h =
vmlal_u8(vmull_u8(vget_high_u8(s0), f0), vget_high_u8(s1), f1);
uint8x16_t blend_u8 =
vcombine_u8(vrshrn_n_u16(blend_l, 3), vrshrn_n_u16(blend_h, 3));
uint8x16_t p = vld1q_u8(second_pred);
uint8x16_t avg = vrhaddq_u8(blend_u8, p);
// Combine bilinear filter with vpx_comp_avg_pred for blocks having width 16. staticvoid avg_pred_var_filter_block2d_bil_w16( const uint8_t *src_ptr, uint8_t *dst_ptr, int src_stride, int pixel_step,
int dst_height, int filter_offset, const uint8_t *second_pred) {
avg_pred_var_filter_block2d_bil_large(src_ptr, dst_ptr, src_stride,
pixel_step, 16, dst_height,
filter_offset, second_pred);
}
// Combine bilinear filter with vpx_comp_avg_pred for blocks having width 32. staticvoid avg_pred_var_filter_block2d_bil_w32( const uint8_t *src_ptr, uint8_t *dst_ptr, int src_stride, int pixel_step,
int dst_height, int filter_offset, const uint8_t *second_pred) {
avg_pred_var_filter_block2d_bil_large(src_ptr, dst_ptr, src_stride,
pixel_step, 32, dst_height,
filter_offset, second_pred);
}
// Combine bilinear filter with vpx_comp_avg_pred for blocks having width 64. staticvoid avg_pred_var_filter_block2d_bil_w64( const uint8_t *src_ptr, uint8_t *dst_ptr, int src_stride, int pixel_step,
int dst_height, int filter_offset, const uint8_t *second_pred) {
avg_pred_var_filter_block2d_bil_large(src_ptr, dst_ptr, src_stride,
pixel_step, 64, dst_height,
filter_offset, second_pred);
}
// Combine averaging subpel filter with vpx_comp_avg_pred. staticvoid avg_pred_var_filter_block2d_avg(const uint8_t *src_ptr,
uint8_t *dst_ptr, int src_stride,
int pixel_step, int dst_width,
int dst_height, const uint8_t *second_pred) {
int i = dst_height;
// We only specialize on the filter values for large block sizes (>= 16x16.)
assert(dst_width >= 16 && dst_width % 16 == 0);
do {
int j = 0; do {
uint8x16_t s0 = vld1q_u8(src_ptr + j);
uint8x16_t s1 = vld1q_u8(src_ptr + j + pixel_step);
uint8x16_t avg = vrhaddq_u8(s0, s1);
uint8x16_t p = vld1q_u8(second_pred);
avg = vrhaddq_u8(avg, p);
// Implementation of vpx_comp_avg_pred for blocks having width >= 16. staticvoid avg_pred(const uint8_t *src_ptr, uint8_t *dst_ptr, int src_stride,
int dst_width, int dst_height, const uint8_t *second_pred) {
int i = dst_height;
// We only specialize on the filter values for large block sizes (>= 16x16.)
assert(dst_width >= 16 && dst_width % 16 == 0);
do {
int j = 0; do {
uint8x16_t s = vld1q_u8(src_ptr + j);
uint8x16_t p = vld1q_u8(second_pred);
// 4x<h> blocks are processed two rows at a time, so require an extra row of // padding.
SUBPEL_AVG_VARIANCE_WXH_NEON(4, 4, 2)
SUBPEL_AVG_VARIANCE_WXH_NEON(4, 8, 2)
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.