Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: source/libvpx/test/variance_test.cc

Issue 478033002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/test/tools_common.sh ('k') | source/libvpx/test/video_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/variance_test.cc
===================================================================
--- source/libvpx/test/variance_test.cc (revision 290053)
+++ source/libvpx/test/variance_test.cc (working copy)
@@ -90,14 +90,14 @@
rnd(ACMRandom::DeterministicSeed());
block_size_ = width_ * height_;
- src_ = new uint8_t[block_size_];
+ src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
ref_ = new uint8_t[block_size_];
ASSERT_TRUE(src_ != NULL);
ASSERT_TRUE(ref_ != NULL);
}
virtual void TearDown() {
- delete[] src_;
+ vpx_free(src_);
delete[] ref_;
libvpx_test::ClearSystemState();
}
@@ -707,24 +707,7 @@
#endif
#if HAVE_AVX2
-// TODO(jzern): these prototypes can be removed after the avx2 versions are
-// reenabled in vp9_rtcd_defs.pl.
-extern "C" {
-unsigned int vp9_sub_pixel_variance32x32_avx2(
- const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset,
- const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
-unsigned int vp9_sub_pixel_variance64x64_avx2(
- const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset,
- const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
-unsigned int vp9_sub_pixel_avg_variance32x32_avx2(
- const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset,
- const uint8_t *ref_ptr, int ref_stride, unsigned int *sse,
- const uint8_t *second_pred);
-unsigned int vp9_sub_pixel_avg_variance64x64_avx2(
- const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset,
- const uint8_t *ref_ptr, int ref_stride, unsigned int *sse,
- const uint8_t *second_pred);
-}
+
const vp9_variance_fn_t variance16x16_avx2 = vp9_variance16x16_avx2;
const vp9_variance_fn_t variance32x16_avx2 = vp9_variance32x16_avx2;
const vp9_variance_fn_t variance32x32_avx2 = vp9_variance32x32_avx2;
@@ -743,7 +726,7 @@
const vp9_subpixvariance_fn_t subpel_variance64x64_avx2 =
vp9_sub_pixel_variance64x64_avx2;
INSTANTIATE_TEST_CASE_P(
- DISABLED_AVX2, VP9SubpelVarianceTest,
+ AVX2, VP9SubpelVarianceTest,
::testing::Values(make_tuple(5, 5, subpel_variance32x32_avx2),
make_tuple(6, 6, subpel_variance64x64_avx2)));
@@ -752,10 +735,32 @@
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_avx2 =
vp9_sub_pixel_avg_variance64x64_avx2;
INSTANTIATE_TEST_CASE_P(
- DISABLED_AVX2, VP9SubpelAvgVarianceTest,
+ AVX2, VP9SubpelAvgVarianceTest,
::testing::Values(make_tuple(5, 5, subpel_avg_variance32x32_avx2),
make_tuple(6, 6, subpel_avg_variance64x64_avx2)));
#endif // HAVE_AVX2
+#if HAVE_NEON
+const vp9_variance_fn_t variance8x8_neon = vp9_variance8x8_neon;
+const vp9_variance_fn_t variance16x16_neon = vp9_variance16x16_neon;
+const vp9_variance_fn_t variance32x32_neon = vp9_variance32x32_neon;
+INSTANTIATE_TEST_CASE_P(
+ NEON, VP9VarianceTest,
+ ::testing::Values(make_tuple(3, 3, variance8x8_neon),
+ make_tuple(4, 4, variance16x16_neon),
+ make_tuple(5, 5, variance32x32_neon)));
+
+const vp9_subpixvariance_fn_t subpel_variance8x8_neon =
+ vp9_sub_pixel_variance8x8_neon;
+const vp9_subpixvariance_fn_t subpel_variance16x16_neon =
+ vp9_sub_pixel_variance16x16_neon;
+const vp9_subpixvariance_fn_t subpel_variance32x32_neon =
+ vp9_sub_pixel_variance32x32_neon;
+INSTANTIATE_TEST_CASE_P(
+ NEON, VP9SubpelVarianceTest,
+ ::testing::Values(make_tuple(3, 3, subpel_variance8x8_neon),
+ make_tuple(4, 4, subpel_variance16x16_neon),
+ make_tuple(5, 5, subpel_variance32x32_neon)));
+#endif // HAVE_NEON
#endif // CONFIG_VP9_ENCODER
} // namespace vp9
« no previous file with comments | « source/libvpx/test/tools_common.sh ('k') | source/libvpx/test/video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698