From aaacd9f86887f9f02084ecd0f3ee85ee5bedad66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arttu=20Yl=C3=A4-Outinen?= Date: Fri, 6 Nov 2015 15:05:38 +0200 Subject: [PATCH 1/3] Add a travis test for checking external symbols. Adds a test which lists symbols in the static library and fails if any global symbol does not have the kvz_ prefix. --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 006f0ef1..d327129b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,13 @@ matrix: env: KVZ_DISABLE_AVX2="" - compiler: gcc-4.8 env: KVZ_DISABLE_AVX2="" - + + # Check for external symbols without kvz_ prefix. + - script: + - cd src + - make libkvazaar.a + - (! nm -go --defined-only libkvazaar.a | grep -v ' kvz_') + # These valgrind tests are slow, so they are performed with the minimum # number of small frames and fast settings. From 31f733964f0112918482895cc8b7e7c08539b8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arttu=20Yl=C3=A4-Outinen?= Date: Mon, 9 Nov 2015 12:13:20 +0200 Subject: [PATCH 2/3] Enable AVX2 in external symbols check on travis. Some symbols do not get compiled into the library when AVX2 is disabled. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d327129b..811bb091 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,9 @@ matrix: env: KVZ_DISABLE_AVX2="" # Check for external symbols without kvz_ prefix. - - script: + - compiler: gcc-4.8 + env: KVZ_DISABLE_AVX2="" + script: - cd src - make libkvazaar.a - (! nm -go --defined-only libkvazaar.a | grep -v ' kvz_') From 940ada4c0df62b9d4ebeb2a22ca108f55afab57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arttu=20Yl=C3=A4-Outinen?= Date: Mon, 9 Nov 2015 12:42:49 +0200 Subject: [PATCH 3/3] Mark AVX2 intra filter functions as static. Marks functions filter_4x4_avx2, filter_16x16_avx2 and filter_NxN_avx2 static as they are not used outside strategies/avx2/intra-avx2. --- src/strategies/avx2/intra-avx2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/strategies/avx2/intra-avx2.c b/src/strategies/avx2/intra-avx2.c index bfbfa519..dc872996 100644 --- a/src/strategies/avx2/intra-avx2.c +++ b/src/strategies/avx2/intra-avx2.c @@ -60,7 +60,7 @@ static INLINE __m128i filter_4x1_avx2(const kvz_pixel *ref_main, int16_t delta_p * \param sample_disp Sample displacement per row * \param vertical_mode Mode direction, true if vertical */ -void filter_4x4_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode){ +static void filter_4x4_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode){ __m128i row0 = filter_4x1_avx2(ref_main, 1 * sample_disp, 0); __m128i row1 = filter_4x1_avx2(ref_main, 2 * sample_disp, 0); @@ -199,7 +199,7 @@ static INLINE __m256i filter_16x1_avx2(const kvz_pixel *ref_main, int16_t delta_ * \param sample_disp Sample displacement per row * \param vertical_mode Mode direction, true if vertical */ -void filter_16x16_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode){ +static void filter_16x16_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode){ for (int y = 0; y < 16; y += 8) { __m256i row0 = filter_16x1_avx2(ref_main, (y + 1) * sample_disp, 0); __m256i row1 = filter_16x1_avx2(ref_main, (y + 2) * sample_disp, 0); @@ -291,7 +291,7 @@ void filter_16x16_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_dis * \param vertical_mode Mode direction, true if vertical * \param width Block width */ -void filter_NxN_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode, int width){ +static void filter_NxN_avx2(kvz_pixel *dst, const kvz_pixel *ref_main, int sample_disp, bool vertical_mode, int width){ for (int y = 0; y < width; y += 8) { for (int x = 0; x < width; x += 16) { __m256i row0 = filter_16x1_avx2(ref_main, (y + 1) * sample_disp, x);