summaryrefslogtreecommitdiff
path: root/vpx_dsp
diff options
context:
space:
mode:
authorLinfeng Zhang <linfengz@google.com>2017-09-19 16:39:17 -0700
committerLinfeng Zhang <linfengz@google.com>2017-09-19 16:39:17 -0700
commit7c0529728a24cf9f812a3229eb3881998b28eb0d (patch)
tree9976ad1ff3cafe4474be761a7c57e80e7c1fa838 /vpx_dsp
parentf357335c38c82dc6e4eb27a587dd13d42b0d45a2 (diff)
downloadlibvpx-7c0529728a24cf9f812a3229eb3881998b28eb0d.tar
libvpx-7c0529728a24cf9f812a3229eb3881998b28eb0d.tar.gz
libvpx-7c0529728a24cf9f812a3229eb3881998b28eb0d.tar.bz2
libvpx-7c0529728a24cf9f812a3229eb3881998b28eb0d.zip
cosmetics: NEON scaling code
Change-Id: Ib91054622c1f09c4ca523bc6837d7d8ab9f03618
Diffstat (limited to 'vpx_dsp')
-rw-r--r--vpx_dsp/arm/vpx_convolve8_neon.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/vpx_dsp/arm/vpx_convolve8_neon.h b/vpx_dsp/arm/vpx_convolve8_neon.h
index bd20a263c..2ac865816 100644
--- a/vpx_dsp/arm/vpx_convolve8_neon.h
+++ b/vpx_dsp/arm/vpx_convolve8_neon.h
@@ -90,3 +90,22 @@ static INLINE uint8x8_t convolve8_8(const int16x8_t s0, const int16x8_t s1,
sum = vqaddq_s16(sum, vmulq_s16(s4, filter4));
return vqrshrun_n_s16(sum, 7);
}
+
+static INLINE uint8x8_t scale_filter_8(const uint8x8_t *const s,
+ const int16x8_t filters) {
+ const int16x8_t filter3 = vdupq_lane_s16(vget_low_s16(filters), 3);
+ const int16x8_t filter4 = vdupq_lane_s16(vget_high_s16(filters), 0);
+ int16x8_t ss[8];
+
+ ss[0] = vreinterpretq_s16_u16(vmovl_u8(s[0]));
+ ss[1] = vreinterpretq_s16_u16(vmovl_u8(s[1]));
+ ss[2] = vreinterpretq_s16_u16(vmovl_u8(s[2]));
+ ss[3] = vreinterpretq_s16_u16(vmovl_u8(s[3]));
+ ss[4] = vreinterpretq_s16_u16(vmovl_u8(s[4]));
+ ss[5] = vreinterpretq_s16_u16(vmovl_u8(s[5]));
+ ss[6] = vreinterpretq_s16_u16(vmovl_u8(s[6]));
+ ss[7] = vreinterpretq_s16_u16(vmovl_u8(s[7]));
+
+ return convolve8_8(ss[0], ss[1], ss[2], ss[3], ss[4], ss[5], ss[6], ss[7],
+ filters, filter3, filter4);
+}