peter pushed to libyuv (epel7). "Next svn snapshot - ver. 312 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 14:41:20 UTC 2015


>From d92abdbc3262fdbbfc4b87c497dd8f91e05a250d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Mon, 30 Jul 2012 18:24:47 +0400
Subject: Next svn snapshot - ver. 312

Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

diff --git a/libyuv-0001-Initial-autotools-support.patch b/libyuv-0001-Initial-autotools-support.patch
index 5fcea26..b6644cc 100644
--- a/libyuv-0001-Initial-autotools-support.patch
+++ b/libyuv-0001-Initial-autotools-support.patch
@@ -1,17 +1,17 @@
-From 4bf448674d7de8cfa7255a59ae1508cdee54153d Mon Sep 17 00:00:00 2001
+From b12d78ac0a2cb844c4903f873265036e0028c101 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Fri, 16 Dec 2011 22:08:41 +0400
 Subject: [PATCH 1/3] Initial autotools support
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- Makefile.am           |    3 +
- autogen.sh            |    7 +++
- configure.ac          |  149 +++++++++++++++++++++++++++++++++++++++++++++++++
- source/Makefile.am    |   63 +++++++++++++++++++++
- source/libyuv.pc.in   |    9 +++
- unit_test/Makefile.am |   27 +++++++++
- 6 files changed, 258 insertions(+)
+ Makefile.am           |   3 +
+ autogen.sh            |   7 +++
+ configure.ac          | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ source/Makefile.am    |  65 ++++++++++++++++++++++
+ source/libyuv.pc.in   |   9 +++
+ unit_test/Makefile.am |  27 +++++++++
+ 6 files changed, 260 insertions(+)
  create mode 100644 Makefile.am
  create mode 100755 autogen.sh
  create mode 100644 configure.ac
@@ -43,7 +43,7 @@ index 0000000..bfd37d1
 +autoconf
 diff --git a/configure.ac b/configure.ac
 new file mode 100644
-index 0000000..37bfae3
+index 0000000..5717422
 --- /dev/null
 +++ b/configure.ac
 @@ -0,0 +1,149 @@
@@ -133,6 +133,7 @@ index 0000000..37bfae3
 +		;;
 +esac
 +
++has_neon="no"
 +case "$target_cpu" in
 +	arm*)
 +		AC_ARG_ENABLE(neon,
@@ -158,7 +159,6 @@ index 0000000..37bfae3
 +			     )
 +		;;
 +	*)
-+		has_neon="no"
 +		;;
 +esac
 +
@@ -198,10 +198,10 @@ index 0000000..37bfae3
 +])
 diff --git a/source/Makefile.am b/source/Makefile.am
 new file mode 100644
-index 0000000..6a4572f
+index 0000000..c88c224
 --- /dev/null
 +++ b/source/Makefile.am
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,65 @@
 +lib_LTLIBRARIES = libyuv.la
 +
 +pkgconfigdir = $(libdir)/pkgconfig
@@ -231,6 +231,7 @@ index 0000000..6a4572f
 +libyuvnobase_include_HEADERS = ../include/libyuv/basic_types.h \
 +			       ../include/libyuv/compare.h \
 +			       ../include/libyuv/convert.h \
++			       ../include/libyuv/convert_argb.h \
 +			       ../include/libyuv/convert_from.h \
 +			       ../include/libyuv/cpu_id.h \
 +			       ../include/libyuv/format_conversion.h \
@@ -245,6 +246,7 @@ index 0000000..6a4572f
 +
 +libyuv_la_SOURCES = compare.cc \
 +		    convert.cc \
++		    convert_argb.cc \
 +		    convert_from.cc \
 +		    cpu_id.cc \
 +		    format_conversion.cc \
@@ -314,5 +316,5 @@ index 0000000..c0a56c0
 +
 +EXTRA_DIST = testdata/arm_v7.txt testdata/tegra3.txt
 -- 
-1.7.10.4
+1.7.11.2
 
diff --git a/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch b/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
index 55e61ef..8eb41f0 100644
--- a/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
+++ b/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
@@ -1,11 +1,11 @@
-From 107790af2a67466ebe270ad5207a211a52aa7510 Mon Sep 17 00:00:00 2001
+From d017eb0dc4d8c0ee54568a940f48c6c216504971 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Sun, 4 Mar 2012 11:07:55 +0400
 Subject: [PATCH 2/3] Fix paths in ArmCpuCaps test
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- unit_test/cpu_test.cc |    8 ++++----
+ unit_test/cpu_test.cc | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/unit_test/cpu_test.cc b/unit_test/cpu_test.cc
@@ -32,5 +32,5 @@ index 27dfbfd..bf327a2 100644
  #if defined(__linux__) && defined(__ARM_NEON__)
    EXPECT_NE(0, ArmCpuCaps("/proc/cpuinfo"));
 -- 
-1.7.10.4
+1.7.11.2
 
diff --git a/libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch b/libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch
index be85f3a..8fc4996 100644
--- a/libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch
+++ b/libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch
@@ -1,23 +1,23 @@
-From d36bc4313745a7411d83ce1e18ea17719093b903 Mon Sep 17 00:00:00 2001
+From 8ae27aad0aed24abc708d58b8c81c7555c5d6e2a Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
-Date: Tue, 26 Jun 2012 12:50:29 +0400
+Date: Wed, 11 Jul 2012 13:57:09 +0400
 Subject: [PATCH 3/3] Drop several tests due to GCC-related issues
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- unit_test/planar_test.cc |  306 ----------------------------------------------
- 1 file changed, 306 deletions(-)
+ unit_test/planar_test.cc | 314 -----------------------------------------------
+ 1 file changed, 314 deletions(-)
 
 diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc
-index 76c6ced..23ee4e4 100644
+index 84cfd48..449c170 100644
 --- a/unit_test/planar_test.cc
 +++ b/unit_test/planar_test.cc
-@@ -25,312 +25,6 @@
+@@ -26,320 +26,6 @@
  
  namespace libyuv {
  
 -#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B)          \
--TEST_F(libyuvTest, ##FMT_PLANAR##To##FMT_B##_OptVsC) {                         \
+-TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##_OptVsC) {                           \
 -  const int kWidth = 1280;                                                     \
 -  const int kHeight = 720;                                                     \
 -  align_buffer_16(src_y, kWidth * kHeight);                                    \
@@ -35,31 +35,32 @@ index 76c6ced..23ee4e4 100644
 -      src_v[(i * kWidth / SUBSAMP_X) + j] = (random() & 0xff);                 \
 -    }                                                                          \
 -  MaskCpuFlags(kCpuInitialized);                                               \
--  ##FMT_PLANAR##To##FMT_B(src_y, kWidth,                                       \
--                          src_u, kWidth / SUBSAMP_X,                           \
--                          src_v, kWidth / SUBSAMP_X,                           \
--                          dst_argb_c, kWidth * BPP_B,                          \
--                          kWidth, kHeight);                                    \
+-  FMT_PLANAR##To##FMT_B(src_y, kWidth,                                         \
+-                        src_u, kWidth / SUBSAMP_X,                             \
+-                        src_v, kWidth / SUBSAMP_X,                             \
+-                        dst_argb_c, kWidth * BPP_B,                            \
+-                        kWidth, kHeight);                                      \
 -  MaskCpuFlags(-1);                                                            \
 -  const int runs = 1000;                                                       \
 -  for (int i = 0; i < runs; ++i) {                                             \
--    ##FMT_PLANAR##To##FMT_B(src_y, kWidth,                                     \
--                            src_u, kWidth / SUBSAMP_X,                         \
--                            src_v, kWidth / SUBSAMP_X,                         \
--                            dst_argb_opt, kWidth * BPP_B,                      \
--                            kWidth, kHeight);                                  \
+-    FMT_PLANAR##To##FMT_B(src_y, kWidth,                                       \
+-                          src_u, kWidth / SUBSAMP_X,                           \
+-                          src_v, kWidth / SUBSAMP_X,                           \
+-                          dst_argb_opt, kWidth * BPP_B,                        \
+-                          kWidth, kHeight);                                    \
 -  }                                                                            \
--  int err = 0;                                                                 \
+-  int max_diff = 0;                                                            \
 -  for (int i = 0; i < kHeight; ++i) {                                          \
 -    for (int j = 0; j < kWidth * BPP_B; ++j) {                                 \
--      int diff = static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) -        \
--                 static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]);       \
--      if (abs(diff) > 2) {                                                     \
--        ++err;                                                                 \
+-      int abs_diff =                                                           \
+-          abs(static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) -           \
+-              static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]));         \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
 -      }                                                                        \
 -    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 2);                                                      \
 -  free_aligned_buffer_16(src_y)                                                \
 -  free_aligned_buffer_16(src_u)                                                \
 -  free_aligned_buffer_16(src_v)                                                \
@@ -81,7 +82,7 @@ index 76c6ced..23ee4e4 100644
 -
 -
 -#define TESTBIPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B)        \
--TEST_F(libyuvTest, ##FMT_PLANAR##To##FMT_B##_OptVsC) {                         \
+-TEST_F(libyuvTest, FMT_PLANAR##To##FMT_B##_OptVsC) {                           \
 -  const int kWidth = 1280;                                                     \
 -  const int kHeight = 720;                                                     \
 -  align_buffer_16(src_y, kWidth * kHeight);                                    \
@@ -97,29 +98,30 @@ index 76c6ced..23ee4e4 100644
 -      src_uv[(i * kWidth / SUBSAMP_X) * 2 + j] = (random() & 0xff);            \
 -    }                                                                          \
 -  MaskCpuFlags(kCpuInitialized);                                               \
--  ##FMT_PLANAR##To##FMT_B(src_y, kWidth,                                       \
--                          src_uv, kWidth / SUBSAMP_X * 2,                      \
--                          dst_argb_c, kWidth * BPP_B,                          \
--                          kWidth, kHeight);                                    \
+-  FMT_PLANAR##To##FMT_B(src_y, kWidth,                                         \
+-                        src_uv, kWidth / SUBSAMP_X * 2,                        \
+-                        dst_argb_c, kWidth * BPP_B,                            \
+-                        kWidth, kHeight);                                      \
 -  MaskCpuFlags(-1);                                                            \
 -  const int runs = 1000;                                                       \
 -  for (int i = 0; i < runs; ++i) {                                             \
--    ##FMT_PLANAR##To##FMT_B(src_y, kWidth,                                     \
--                            src_uv, kWidth / SUBSAMP_X * 2,                    \
--                            dst_argb_opt, kWidth * BPP_B,                      \
--                            kWidth, kHeight);                                  \
+-    FMT_PLANAR##To##FMT_B(src_y, kWidth,                                       \
+-                          src_uv, kWidth / SUBSAMP_X * 2,                      \
+-                          dst_argb_opt, kWidth * BPP_B,                        \
+-                          kWidth, kHeight);                                    \
 -  }                                                                            \
--  int err = 0;                                                                 \
+-  int max_diff = 0;                                                            \
 -  for (int i = 0; i < kHeight; ++i) {                                          \
 -    for (int j = 0; j < kWidth * BPP_B; ++j) {                                 \
--      int diff = static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) -        \
--                 static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]);       \
--      if (abs(diff) > 2) {                                                     \
--        ++err;                                                                 \
+-      int abs_diff =                                                           \
+-        abs(static_cast<int>(dst_argb_c[i * kWidth * BPP_B + j]) -             \
+-            static_cast<int>(dst_argb_opt[i * kWidth * BPP_B + j]));           \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
 -      }                                                                        \
 -    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 3);                                                      \
 -  free_aligned_buffer_16(src_y)                                                \
 -  free_aligned_buffer_16(src_uv)                                               \
 -  free_aligned_buffer_16(dst_argb_c)                                           \
@@ -132,7 +134,7 @@ index 76c6ced..23ee4e4 100644
 -TESTBIPLANARTOB(NV21, 2, 2, RGB565, 2)
 -
 -#define TESTATOPLANAR(FMT_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y)          \
--TEST_F(libyuvTest, ##FMT_A##To##FMT_PLANAR##_OptVsC) {                         \
+-TEST_F(libyuvTest, FMT_A##To##FMT_PLANAR##_OptVsC) {                           \
 -  const int kWidth = 1280;                                                     \
 -  const int kHeight = 720;                                                     \
 -  align_buffer_16(src_argb, (kWidth * BPP_A) * kHeight);                       \
@@ -147,51 +149,54 @@ index 76c6ced..23ee4e4 100644
 -    for (int j = 0; j < kWidth * BPP_A; ++j)                                   \
 -      src_argb[(i * kWidth * BPP_A) + j] = (random() & 0xff);                  \
 -  MaskCpuFlags(kCpuInitialized);                                               \
--  ##FMT_A##To##FMT_PLANAR(src_argb, kWidth * BPP_A,                            \
--                          dst_y_c, kWidth,                                     \
--                          dst_u_c, kWidth / SUBSAMP_X,                         \
--                          dst_v_c, kWidth / SUBSAMP_X,                         \
--                          kWidth, kHeight);                                    \
+-  FMT_A##To##FMT_PLANAR(src_argb, kWidth * BPP_A,                              \
+-                        dst_y_c, kWidth,                                       \
+-                        dst_u_c, kWidth / SUBSAMP_X,                           \
+-                        dst_v_c, kWidth / SUBSAMP_X,                           \
+-                        kWidth, kHeight);                                      \
 -  MaskCpuFlags(-1);                                                            \
 -  const int runs = 1000;                                                       \
 -  for (int i = 0; i < runs; ++i) {                                             \
--    ##FMT_A##To##FMT_PLANAR(src_argb, kWidth * BPP_A,                          \
--                            dst_y_opt, kWidth,                                 \
--                            dst_u_opt, kWidth / SUBSAMP_X,                     \
--                            dst_v_opt, kWidth / SUBSAMP_X,                     \
--                            kWidth, kHeight);                                  \
+-    FMT_A##To##FMT_PLANAR(src_argb, kWidth * BPP_A,                            \
+-                          dst_y_opt, kWidth,                                   \
+-                          dst_u_opt, kWidth / SUBSAMP_X,                       \
+-                          dst_v_opt, kWidth / SUBSAMP_X,                       \
+-                          kWidth, kHeight);                                    \
 -  }                                                                            \
--  int err = 0;                                                                 \
+-  int max_diff = 0;                                                            \
 -  for (int i = 0; i < kHeight; ++i) {                                          \
 -    for (int j = 0; j < kWidth; ++j) {                                         \
--      int diff = static_cast<int>(dst_y_c[i * kWidth + j]) -                   \
--                 static_cast<int>(dst_y_opt[i * kWidth + j]);                  \
--      if (abs(diff) > 2) {                                                     \
--        ++err;                                                                 \
+-      int abs_diff =                                                           \
+-          abs(static_cast<int>(dst_y_c[i * kWidth + j]) -                      \
+-              static_cast<int>(dst_y_opt[i * kWidth + j]));                    \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
 -      }                                                                        \
 -    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 2);                                                      \
 -  for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) {                              \
 -    for (int j = 0; j < kWidth / SUBSAMP_X; ++j) {                             \
--      int diff = static_cast<int>(dst_u_c[i * kWidth / SUBSAMP_X + j]) -       \
--                 static_cast<int>(dst_u_opt[i * kWidth / SUBSAMP_X + j]);      \
--      if (abs(diff) > 2) {                                                     \
--        ++err;                                                                 \
+-      int abs_diff =                                                           \
+-          abs(static_cast<int>(dst_u_c[i * kWidth / SUBSAMP_X + j]) -          \
+-              static_cast<int>(dst_u_opt[i * kWidth / SUBSAMP_X + j]));        \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
 -      }                                                                        \
 -    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 2);                                                      \
 -  for (int i = 0; i < kHeight / SUBSAMP_Y; ++i) {                              \
 -    for (int j = 0; j < kWidth / SUBSAMP_X; ++j) {                             \
--      int diff = static_cast<int>(dst_v_c[i * kWidth / SUBSAMP_X + j]) -       \
--                 static_cast<int>(dst_v_opt[i * kWidth / SUBSAMP_X + j]);      \
--      if (abs(diff) > 2) {                                                     \
--        ++err;                                                                 \
+-      int abs_diff =                                                           \
+-          abs(static_cast<int>(dst_v_c[i * kWidth / SUBSAMP_X + j]) -          \
+-              static_cast<int>(dst_v_opt[i * kWidth / SUBSAMP_X + j]));        \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
 -      }                                                                        \
 -    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 2);                                                      \
 -  free_aligned_buffer_16(dst_y_c)                                              \
 -  free_aligned_buffer_16(dst_u_c)                                              \
 -  free_aligned_buffer_16(dst_v_c)                                              \
@@ -215,7 +220,7 @@ index 76c6ced..23ee4e4 100644
 -// TODO(fbarchard): Implement and test 411 and 444
 -
 -#define TESTATOB(FMT_A, BPP_A, STRIDE_A, FMT_B, BPP_B)                         \
--TEST_F(libyuvTest, ##FMT_A##To##FMT_B##_OptVsC) {                              \
+-TEST_F(libyuvTest, FMT_A##To##FMT_B##_OptVsC) {                                \
 -  const int kWidth = 1280;                                                     \
 -  const int kHeight = 720;                                                     \
 -  align_buffer_16(src_argb, (kWidth * BPP_A) * kHeight);                       \
@@ -226,24 +231,26 @@ index 76c6ced..23ee4e4 100644
 -    src_argb[i] = (random() & 0xff);                                           \
 -  }                                                                            \
 -  MaskCpuFlags(kCpuInitialized);                                               \
--  ##FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                              \
--                     dst_argb_c, kWidth * BPP_B,                               \
--                     kWidth, kHeight);                                         \
+-  FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                                \
+-                   dst_argb_c, kWidth * BPP_B,                                 \
+-                   kWidth, kHeight);                                           \
 -  MaskCpuFlags(-1);                                                            \
 -  const int runs = 1000;                                                       \
 -  for (int i = 0; i < runs; ++i) {                                             \
--    ##FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                            \
--                       dst_argb_opt, kWidth * BPP_B,                           \
--                       kWidth, kHeight);                                       \
+-    FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                              \
+-                     dst_argb_opt, kWidth * BPP_B,                             \
+-                     kWidth, kHeight);                                         \
 -  }                                                                            \
--  int err = 0;                                                                 \
+-  int max_diff = 0;                                                            \
 -  for (int i = 0; i < kHeight * kWidth * BPP_B; ++i) {                         \
--    int diff = static_cast<int>(dst_argb_c[i]) -                               \
--               static_cast<int>(dst_argb_opt[i]);                              \
--    if (abs(diff) > 2)                                                         \
--      err++;                                                                   \
+-    int abs_diff =                                                             \
+-        abs(static_cast<int>(dst_argb_c[i]) -                                  \
+-            static_cast<int>(dst_argb_opt[i]));                                \
+-    if (abs_diff > max_diff) {                                                 \
+-      max_diff = abs_diff;                                                     \
+-    }                                                                          \
 -  }                                                                            \
--  EXPECT_EQ(err, 0);                                                           \
+-  EXPECT_LE(max_diff, 2);                                                      \
 -  free_aligned_buffer_16(src_argb)                                             \
 -  free_aligned_buffer_16(dst_argb_c)                                           \
 -  free_aligned_buffer_16(dst_argb_opt)                                         \
@@ -271,10 +278,10 @@ index 76c6ced..23ee4e4 100644
 -TESTATOB(M420, 3 / 2, 1, ARGB, 4)
 -
 -#define TESTATOBRANDOM(FMT_A, BPP_A, STRIDE_A, FMT_B, BPP_B)                   \
--TEST_F(libyuvTest, ##FMT_A##To##FMT_B##_Random) {                              \
+-TEST_F(libyuvTest, FMT_A##To##FMT_B##_Random) {                                \
 -  srandom(time(NULL));                                                         \
 -  for (int times = 0; times < 1000; ++times) {                                 \
--    const int kWidth = (random() & 63) + 1;                                   \
+-    const int kWidth = (random() & 63) + 1;                                    \
 -    const int kHeight = (random() & 31) + 1;                                   \
 -    align_buffer_page_end(src_argb, (kWidth * BPP_A) * kHeight);               \
 -    align_buffer_page_end(dst_argb_c, (kWidth * BPP_B) * kHeight);             \
@@ -283,21 +290,23 @@ index 76c6ced..23ee4e4 100644
 -      src_argb[i] = (random() & 0xff);                                         \
 -    }                                                                          \
 -    MaskCpuFlags(kCpuInitialized);                                             \
--    ##FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                            \
--                       dst_argb_c, kWidth * BPP_B,                             \
--                       kWidth, kHeight);                                       \
+-    FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                              \
+-                     dst_argb_c, kWidth * BPP_B,                               \
+-                     kWidth, kHeight);                                         \
 -    MaskCpuFlags(-1);                                                          \
--    ##FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                            \
--                       dst_argb_opt, kWidth * BPP_B,                           \
--                       kWidth, kHeight);                                       \
--    int err = 0;                                                               \
+-    FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                              \
+-                     dst_argb_opt, kWidth * BPP_B,                             \
+-                     kWidth, kHeight);                                         \
+-    int max_diff = 0;                                                          \
 -    for (int i = 0; i < kHeight * kWidth * BPP_B; ++i) {                       \
--      int diff = static_cast<int>(dst_argb_c[i]) -                             \
--                 static_cast<int>(dst_argb_opt[i]);                            \
--      if (abs(diff) > 2)                                                       \
--        err++;                                                                 \
+-      int abs_diff =                                                           \
+-          abs(static_cast<int>(dst_argb_c[i]) -                                \
+-              static_cast<int>(dst_argb_opt[i]));                              \
+-      if (abs_diff > max_diff) {                                               \
+-        max_diff = abs_diff;                                                   \
+-      }                                                                        \
 -    }                                                                          \
--    EXPECT_EQ(err, 0);                                                         \
+-    EXPECT_LE(max_diff, 2);                                                    \
 -    free_aligned_buffer_page_end(src_argb)                                     \
 -    free_aligned_buffer_page_end(dst_argb_c)                                   \
 -    free_aligned_buffer_page_end(dst_argb_opt)                                 \
@@ -321,10 +330,9 @@ index 76c6ced..23ee4e4 100644
 -TESTATOBRANDOM(ARGB1555, 2, 2, ARGB, 4)
 -TESTATOBRANDOM(ARGB4444, 2, 2, ARGB, 4)
 -
--
  TEST_F(libyuvTest, TestAttenuate) {
    SIMD_ALIGNED(uint8 orig_pixels[256][4]);
    SIMD_ALIGNED(uint8 atten_pixels[256][4]);
 -- 
-1.7.10.4
+1.7.11.2
 
diff --git a/libyuv.spec b/libyuv.spec
index 6c20f91..0f66157 100644
--- a/libyuv.spec
+++ b/libyuv.spec
@@ -1,11 +1,11 @@
 Name:		libyuv
 Summary:	YUV conversion and scaling functionality library
 Version:	0
-Release:	0.11.20120627svn296%{?dist}
+Release:	0.12.20120727svn312%{?dist}
 License:	BSD
 Group:		Development/Libraries
 Url:		http://code.google.com/p/libyuv/
-## svn -r 296 export http://libyuv.googlecode.com/svn/trunk libyuv-0
+## svn -r 312 export http://libyuv.googlecode.com/svn/trunk libyuv-0
 ## tar -cjvf libyuv-0.tar.bz2 libyuv-0
 Source0:	%{name}-%{version}.tar.bz2
 # Fedora-specific. Upstream isn't interested in this.
@@ -87,6 +87,9 @@ make check
 
 
 %changelog
+* Mon Jul 30 2012 Peter Lemenkov <lemenkov at gmail.com> - 0-0.12.20120727svn312
+- Next svn snapshot - ver. 312
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-0.11.20120627svn296
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index dc9d4d3..a31e097 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-abc83f579df18a42466fbd84baf7de9f  libyuv-0.tar.bz2
+cdff5867f3f474fdc293ab5db6fce379  libyuv-0.tar.bz2
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/libyuv.git/commit/?h=epel7&id=d92abdbc3262fdbbfc4b87c497dd8f91e05a250d


More information about the scm-commits mailing list