summaryrefslogtreecommitdiff
path: root/vp8/encoder/arm
diff options
context:
space:
mode:
authorTero Rintaluoma <teror@google.com>2011-02-23 13:27:27 +0200
committerTero Rintaluoma <teror@google.com>2011-02-23 13:27:27 +0200
commit8ae92aef662e94bfbdb01d940a61f1b55c67ff42 (patch)
tree6f58946312eafee13fa888786ecdb2217edbceca /vp8/encoder/arm
parent945dad277d3c09708956d60bf7844d47e0eeed1f (diff)
downloadlibvpx-8ae92aef662e94bfbdb01d940a61f1b55c67ff42.tar
libvpx-8ae92aef662e94bfbdb01d940a61f1b55c67ff42.tar.gz
libvpx-8ae92aef662e94bfbdb01d940a61f1b55c67ff42.tar.bz2
libvpx-8ae92aef662e94bfbdb01d940a61f1b55c67ff42.zip
ARMv6 optimized half pixel variance calculations
Adds following ARMv6 optimized functions to the encoder: - vp8_variance_halfpixvar16x16_h_armv6 - vp8_variance_halfpixvar16x16_v_armv6 - vp8_variance_halfpixvar16x16_hv_armv6 Change-Id: I1e9c2af7acd2a51b72b3845beecd990db4bebd29
Diffstat (limited to 'vp8/encoder/arm')
-rw-r--r--vp8/encoder/arm/arm_csystemdependent.c3
-rw-r--r--vp8/encoder/arm/variance_arm.c36
-rw-r--r--vp8/encoder/arm/variance_arm.h13
3 files changed, 51 insertions, 1 deletions
diff --git a/vp8/encoder/arm/arm_csystemdependent.c b/vp8/encoder/arm/arm_csystemdependent.c
index 5852afddb..73007d414 100644
--- a/vp8/encoder/arm/arm_csystemdependent.c
+++ b/vp8/encoder/arm/arm_csystemdependent.c
@@ -46,6 +46,9 @@ void vp8_arch_arm_encoder_init(VP8_COMP *cpi)
cpi->rtcd.variance.subpixvar8x16 = vp8_sub_pixel_variance8x16_c;
cpi->rtcd.variance.subpixvar16x8 = vp8_sub_pixel_variance16x8_c;*/
cpi->rtcd.variance.subpixvar16x16 = vp8_sub_pixel_variance16x16_armv6;
+ cpi->rtcd.variance.halfpixvar16x16_h = vp8_variance_halfpixvar16x16_h_armv6;
+ cpi->rtcd.variance.halfpixvar16x16_v = vp8_variance_halfpixvar16x16_v_armv6;
+ cpi->rtcd.variance.halfpixvar16x16_hv = vp8_variance_halfpixvar16x16_hv_armv6;
/*cpi->rtcd.variance.mse16x16 = vp8_mse16x16_c;
cpi->rtcd.variance.getmbss = vp8_get_mb_ss_c;*/
diff --git a/vp8/encoder/arm/variance_arm.c b/vp8/encoder/arm/variance_arm.c
index 1cf9fd8f0..64d76bcf8 100644
--- a/vp8/encoder/arm/variance_arm.c
+++ b/vp8/encoder/arm/variance_arm.c
@@ -43,7 +43,41 @@ unsigned int vp8_sub_pixel_variance16x16_armv6
dst_pixels_per_line, sse);
}
-#endif
+unsigned int vp8_variance_halfpixvar16x16_h_armv6(
+ const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse)
+{
+ return vp8_sub_pixel_variance16x16_armv6(src_ptr, source_stride, 4, 0,
+ ref_ptr, recon_stride, sse);
+}
+
+unsigned int vp8_variance_halfpixvar16x16_v_armv6(
+ const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse)
+{
+ return vp8_sub_pixel_variance16x16_armv6(src_ptr, source_stride, 0, 4,
+ ref_ptr, recon_stride, sse);
+}
+
+unsigned int vp8_variance_halfpixvar16x16_hv_armv6(
+ const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse)
+{
+ return vp8_sub_pixel_variance16x16_armv6(src_ptr, source_stride, 4, 4,
+ ref_ptr, recon_stride, sse);
+}
+
+#endif /* HAVE_ARMV6 */
+
#if HAVE_ARMV7
diff --git a/vp8/encoder/arm/variance_arm.h b/vp8/encoder/arm/variance_arm.h
index c807e29c0..7ac0ac08e 100644
--- a/vp8/encoder/arm/variance_arm.h
+++ b/vp8/encoder/arm/variance_arm.h
@@ -17,6 +17,9 @@
extern prototype_sad(vp8_sad16x16_armv6);
extern prototype_variance(vp8_variance16x16_armv6);
extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_armv6);
+extern prototype_variance(vp8_variance_halfpixvar16x16_h_armv6);
+extern prototype_variance(vp8_variance_halfpixvar16x16_v_armv6);
+extern prototype_variance(vp8_variance_halfpixvar16x16_hv_armv6);
#if !CONFIG_RUNTIME_CPU_DETECT
@@ -29,10 +32,20 @@ extern prototype_subpixvariance(vp8_sub_pixel_variance16x16_armv6);
#undef vp8_variance_var16x16
#define vp8_variance_var16x16 vp8_variance16x16_armv6
+#undef vp8_variance_halfpixvar16x16_h
+#define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_armv6
+
+#undef vp8_variance_halfpixvar16x16_v
+#define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_armv6
+
+#undef vp8_variance_halfpixvar16x16_hv
+#define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_armv6
+
#endif /* !CONFIG_RUNTIME_CPU_DETECT */
#endif /* HAVE_ARMV6 */
+
#if HAVE_ARMV7
extern prototype_sad(vp8_sad4x4_neon);
extern prototype_sad(vp8_sad8x8_neon);