[libyuv] Next svn snapshot - ver. 296

Peter Lemenkov peter at fedoraproject.org
Thu Jul 5 10:04:00 UTC 2012


commit 3e252286b3df5f1cc185ba6e71efaac00ce72644
Author: Peter Lemenkov <lemenkov at gmail.com>
Date:   Thu Jul 5 14:03:44 2012 +0400

    Next svn snapshot - ver. 296
    
    Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

 libyuv-0-resolve-scale-header-conflict.patch       |   96 ------
 libyuv-0001-Initial-autotools-support.patch        |   28 +-
 libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch     |   36 ++-
 ...p-several-tests-due-to-GCC-related-issues.patch |  330 ++++++++++++++++++++
 libyuv.spec                                        |   14 +-
 sources                                            |    2 +-
 6 files changed, 378 insertions(+), 128 deletions(-)
---
diff --git a/libyuv-0001-Initial-autotools-support.patch b/libyuv-0001-Initial-autotools-support.patch
index a4b5da9..5fcea26 100644
--- a/libyuv-0001-Initial-autotools-support.patch
+++ b/libyuv-0001-Initial-autotools-support.patch
@@ -1,17 +1,17 @@
-From 5b9c4753871c2507ea3985f450866472b3e52765 Mon Sep 17 00:00:00 2001
+From 4bf448674d7de8cfa7255a59ae1508cdee54153d 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/2] Initial autotools support
+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    |   61 ++++++++++++++++++++
+ source/Makefile.am    |   63 +++++++++++++++++++++
  source/libyuv.pc.in   |    9 +++
- unit_test/Makefile.am |   25 +++++++++
- 6 files changed, 254 insertions(+)
+ unit_test/Makefile.am |   27 +++++++++
+ 6 files changed, 258 insertions(+)
  create mode 100644 Makefile.am
  create mode 100755 autogen.sh
  create mode 100644 configure.ac
@@ -198,10 +198,10 @@ index 0000000..37bfae3
 +])
 diff --git a/source/Makefile.am b/source/Makefile.am
 new file mode 100644
-index 0000000..1c9d672
+index 0000000..6a4572f
 --- /dev/null
 +++ b/source/Makefile.am
-@@ -0,0 +1,61 @@
+@@ -0,0 +1,63 @@
 +lib_LTLIBRARIES = libyuv.la
 +
 +pkgconfigdir = $(libdir)/pkgconfig
@@ -236,6 +236,7 @@ index 0000000..1c9d672
 +			       ../include/libyuv/format_conversion.h \
 +			       ../include/libyuv/planar_functions.h \
 +			       ../include/libyuv/rotate.h \
++			       ../include/libyuv/rotate_argb.h \
 +			       ../include/libyuv/scale.h \
 +			       ../include/libyuv/scale_argb.h \
 +			       ../include/libyuv/version.h \
@@ -249,6 +250,7 @@ index 0000000..1c9d672
 +		    format_conversion.cc \
 +		    planar_functions.cc \
 +		    rotate.cc \
++		    rotate_argb.cc \
 +		    rotate_priv.h \
 +		    row.h \
 +		    row_common.cc \
@@ -280,10 +282,10 @@ index 0000000..d921dd5
 +Libs: -lyuv
 diff --git a/unit_test/Makefile.am b/unit_test/Makefile.am
 new file mode 100644
-index 0000000..5d06608
+index 0000000..c0a56c0
 --- /dev/null
 +++ b/unit_test/Makefile.am
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,27 @@
 +if WITH_TEST
 +
 +TESTS = unit_test
@@ -294,10 +296,12 @@ index 0000000..5d06608
 +		    cpu_test.cc \
 +		    planar_test.cc \
 +		    rotate_test.cc \
-+		    scale_test.cc \
++		    rotate_argb_test.cc \
 +		    scale_argb_test.cc \
++		    scale_test.cc \
 +		    unit_test.cc \
-+		    unit_test.h
++		    unit_test.h \
++		    version_test.cc
 +
 +unit_test_CXXFLAGS = $(AM_CXXFLAGS) @GTEST_CXXFLAGS@ -I$(top_srcdir)/include -I$(top_srcdir)
 +unit_test_LDADD = @GTEST_LIBS@ $(top_builddir)/source/libyuv.la
@@ -310,5 +314,5 @@ index 0000000..5d06608
 +
 +EXTRA_DIST = testdata/arm_v7.txt testdata/tegra3.txt
 -- 
-1.7.10.2
+1.7.10.4
 
diff --git a/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch b/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
index 8690a3d..55e61ef 100644
--- a/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
+++ b/libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
@@ -1,28 +1,36 @@
-From cb0c95318cd65e0792549c4124722031a7b9fa5e Mon Sep 17 00:00:00 2001
+From 107790af2a67466ebe270ad5207a211a52aa7510 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/2] Fix paths in ArmCpuCaps test
+Subject: [PATCH 2/3] Fix paths in ArmCpuCaps test
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
- unit_test/cpu_test.cc |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ 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
-index a1d75dc..4abb2af 100644
+index 27dfbfd..bf327a2 100644
 --- a/unit_test/cpu_test.cc
 +++ b/unit_test/cpu_test.cc
-@@ -82,8 +82,8 @@ TEST_F(libyuvTest, TestCpuId) {
+@@ -85,14 +85,14 @@ TEST_F(libyuvTest, TestCpuId) {
  extern "C" int ArmCpuCaps(const char* cpuinfoname);
  
  TEST_F(libyuvTest, TestLinuxNeon) {
--  EXPECT_EQ(0, ArmCpuCaps("unit_test/testdata/arm_v7.txt"));
--  EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("unit_test/testdata/tegra3.txt"));
-+  EXPECT_EQ(0, ArmCpuCaps("testdata/arm_v7.txt"));
-+  EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("testdata/tegra3.txt"));
- }
- 
- }  // namespace libyuv
+-  int testdata = ArmCpuCaps("unit_test/testdata/arm_v7.txt");
++  int testdata = ArmCpuCaps("testdata/arm_v7.txt");
+   if (testdata) {
+     EXPECT_EQ(kCpuInitialized,
+-              ArmCpuCaps("unit_test/testdata/arm_v7.txt"));
++              ArmCpuCaps("testdata/arm_v7.txt"));
+     EXPECT_EQ((kCpuInitialized | kCpuHasNEON),
+-              ArmCpuCaps("unit_test/testdata/tegra3.txt"));
++              ArmCpuCaps("testdata/tegra3.txt"));
+   } else {
+-    printf("WARNING: unable to load \"unit_test/testdata/arm_v7.txt\"\n");
++    printf("WARNING: unable to load \"testdata/arm_v7.txt\"\n");
+   }
+ #if defined(__linux__) && defined(__ARM_NEON__)
+   EXPECT_NE(0, ArmCpuCaps("/proc/cpuinfo"));
 -- 
-1.7.10.2
+1.7.10.4
 
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
new file mode 100644
index 0000000..be85f3a
--- /dev/null
+++ b/libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch
@@ -0,0 +1,330 @@
+From d36bc4313745a7411d83ce1e18ea17719093b903 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Tue, 26 Jun 2012 12:50:29 +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(-)
+
+diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc
+index 76c6ced..23ee4e4 100644
+--- a/unit_test/planar_test.cc
++++ b/unit_test/planar_test.cc
+@@ -25,312 +25,6 @@
+ 
+ namespace libyuv {
+ 
+-#define TESTPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B)          \
+-TEST_F(libyuvTest, ##FMT_PLANAR##To##FMT_B##_OptVsC) {                         \
+-  const int kWidth = 1280;                                                     \
+-  const int kHeight = 720;                                                     \
+-  align_buffer_16(src_y, kWidth * kHeight);                                    \
+-  align_buffer_16(src_u, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);            \
+-  align_buffer_16(src_v, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);            \
+-  align_buffer_16(dst_argb_c, (kWidth * BPP_B) * kHeight);                     \
+-  align_buffer_16(dst_argb_opt, (kWidth * BPP_B) * kHeight);                   \
+-  srandom(time(NULL));                                                         \
+-  for (int i = 0; i < kHeight; ++i)                                            \
+-    for (int j = 0; j < kWidth; ++j)                                           \
+-      src_y[(i * kWidth) + j] = (random() & 0xff);                             \
+-  for (int i = 0; i < kHeight / SUBSAMP_X; ++i)                                \
+-    for (int j = 0; j < kWidth / SUBSAMP_Y; ++j) {                             \
+-      src_u[(i * kWidth / SUBSAMP_X) + j] = (random() & 0xff);                 \
+-      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);                                    \
+-  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);                                  \
+-  }                                                                            \
+-  int err = 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;                                                                 \
+-      }                                                                        \
+-    }                                                                          \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  free_aligned_buffer_16(src_y)                                                \
+-  free_aligned_buffer_16(src_u)                                                \
+-  free_aligned_buffer_16(src_v)                                                \
+-  free_aligned_buffer_16(dst_argb_c)                                           \
+-  free_aligned_buffer_16(dst_argb_opt)                                         \
+-}
+-
+-TESTPLANARTOB(I420, 2, 2, ARGB, 4)
+-TESTPLANARTOB(I420, 2, 2, BGRA, 4)
+-TESTPLANARTOB(I420, 2, 2, ABGR, 4)
+-TESTPLANARTOB(I420, 2, 2, RAW, 3)
+-TESTPLANARTOB(I420, 2, 2, RGB24, 3)
+-TESTPLANARTOB(I420, 2, 2, RGB565, 2)
+-TESTPLANARTOB(I420, 2, 2, ARGB1555, 2)
+-TESTPLANARTOB(I420, 2, 2, ARGB4444, 2)
+-TESTPLANARTOB(I411, 4, 1, ARGB, 4)
+-TESTPLANARTOB(I422, 2, 1, ARGB, 4)
+-TESTPLANARTOB(I444, 1, 1, ARGB, 4)
+-
+-
+-#define TESTBIPLANARTOB(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B)        \
+-TEST_F(libyuvTest, ##FMT_PLANAR##To##FMT_B##_OptVsC) {                         \
+-  const int kWidth = 1280;                                                     \
+-  const int kHeight = 720;                                                     \
+-  align_buffer_16(src_y, kWidth * kHeight);                                    \
+-  align_buffer_16(src_uv, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y * 2);       \
+-  align_buffer_16(dst_argb_c, (kWidth * BPP_B) * kHeight);                     \
+-  align_buffer_16(dst_argb_opt, (kWidth * BPP_B) * kHeight);                   \
+-  srandom(time(NULL));                                                         \
+-  for (int i = 0; i < kHeight; ++i)                                            \
+-    for (int j = 0; j < kWidth; ++j)                                           \
+-      src_y[(i * kWidth) + j] = (random() & 0xff);                             \
+-  for (int i = 0; i < kHeight / SUBSAMP_X; ++i)                                \
+-    for (int j = 0; j < kWidth / SUBSAMP_Y * 2; ++j) {                         \
+-      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);                                    \
+-  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);                                  \
+-  }                                                                            \
+-  int err = 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;                                                                 \
+-      }                                                                        \
+-    }                                                                          \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  free_aligned_buffer_16(src_y)                                                \
+-  free_aligned_buffer_16(src_uv)                                               \
+-  free_aligned_buffer_16(dst_argb_c)                                           \
+-  free_aligned_buffer_16(dst_argb_opt)                                         \
+-}
+-
+-TESTBIPLANARTOB(NV12, 2, 2, ARGB, 4)
+-TESTBIPLANARTOB(NV21, 2, 2, ARGB, 4)
+-TESTBIPLANARTOB(NV12, 2, 2, RGB565, 2)
+-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) {                         \
+-  const int kWidth = 1280;                                                     \
+-  const int kHeight = 720;                                                     \
+-  align_buffer_16(src_argb, (kWidth * BPP_A) * kHeight);                       \
+-  align_buffer_16(dst_y_c, kWidth * kHeight);                                  \
+-  align_buffer_16(dst_u_c, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);          \
+-  align_buffer_16(dst_v_c, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);          \
+-  align_buffer_16(dst_y_opt, kWidth * kHeight);                                \
+-  align_buffer_16(dst_u_opt, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);        \
+-  align_buffer_16(dst_v_opt, kWidth / SUBSAMP_X * kHeight / SUBSAMP_Y);        \
+-  srandom(time(NULL));                                                         \
+-  for (int i = 0; i < kHeight; ++i)                                            \
+-    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);                                    \
+-  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);                                  \
+-  }                                                                            \
+-  int err = 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;                                                                 \
+-      }                                                                        \
+-    }                                                                          \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  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;                                                                 \
+-      }                                                                        \
+-    }                                                                          \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  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;                                                                 \
+-      }                                                                        \
+-    }                                                                          \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  free_aligned_buffer_16(dst_y_c)                                              \
+-  free_aligned_buffer_16(dst_u_c)                                              \
+-  free_aligned_buffer_16(dst_v_c)                                              \
+-  free_aligned_buffer_16(dst_y_opt)                                            \
+-  free_aligned_buffer_16(dst_u_opt)                                            \
+-  free_aligned_buffer_16(dst_v_opt)                                            \
+-  free_aligned_buffer_16(src_argb)                                             \
+-}
+-
+-TESTATOPLANAR(ARGB, 4, I420, 2, 2)
+-TESTATOPLANAR(BGRA, 4, I420, 2, 2)
+-TESTATOPLANAR(ABGR, 4, I420, 2, 2)
+-TESTATOPLANAR(RAW, 3, I420, 2, 2)
+-TESTATOPLANAR(RGB24, 3, I420, 2, 2)
+-TESTATOPLANAR(RGB565, 2, I420, 2, 2)
+-TESTATOPLANAR(ARGB1555, 2, I420, 2, 2)
+-TESTATOPLANAR(ARGB4444, 2, I420, 2, 2)
+-// TESTATOPLANAR(ARGB, 4, I411, 4, 1)
+-TESTATOPLANAR(ARGB, 4, I422, 2, 1)
+-// TESTATOPLANAR(ARGB, 4, I444, 1, 1)
+-// 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) {                              \
+-  const int kWidth = 1280;                                                     \
+-  const int kHeight = 720;                                                     \
+-  align_buffer_16(src_argb, (kWidth * BPP_A) * kHeight);                       \
+-  align_buffer_16(dst_argb_c, (kWidth * BPP_B) * kHeight);                     \
+-  align_buffer_16(dst_argb_opt, (kWidth * BPP_B) * kHeight);                   \
+-  srandom(time(NULL));                                                         \
+-  for (int i = 0; i < kHeight * kWidth * BPP_A; ++i) {                         \
+-    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);                                         \
+-  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);                                       \
+-  }                                                                            \
+-  int err = 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++;                                                                   \
+-  }                                                                            \
+-  EXPECT_EQ(err, 0);                                                           \
+-  free_aligned_buffer_16(src_argb)                                             \
+-  free_aligned_buffer_16(dst_argb_c)                                           \
+-  free_aligned_buffer_16(dst_argb_opt)                                         \
+-}
+-
+-TESTATOB(ARGB, 4, 4, ARGB, 4)
+-TESTATOB(ARGB, 4, 4, BGRA, 4)
+-TESTATOB(ARGB, 4, 4, ABGR, 4)
+-TESTATOB(ARGB, 4, 4, RAW, 3)
+-TESTATOB(ARGB, 4, 4, RGB24, 3)
+-TESTATOB(ARGB, 4, 4, RGB565, 2)
+-TESTATOB(ARGB, 4, 4, ARGB1555, 2)
+-TESTATOB(ARGB, 4, 4, ARGB4444, 2)
+-
+-TESTATOB(BGRA, 4, 4, ARGB, 4)
+-TESTATOB(ABGR, 4, 4, ARGB, 4)
+-TESTATOB(RAW, 3, 3, ARGB, 4)
+-TESTATOB(RGB24, 3, 3, ARGB, 4)
+-TESTATOB(RGB565, 2, 2, ARGB, 4)
+-TESTATOB(ARGB1555, 2, 2, ARGB, 4)
+-TESTATOB(ARGB4444, 2, 2, ARGB, 4)
+-
+-TESTATOB(YUY2, 2, 2, ARGB, 4)
+-TESTATOB(UYVY, 2, 2, ARGB, 4)
+-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) {                              \
+-  srandom(time(NULL));                                                         \
+-  for (int times = 0; times < 1000; ++times) {                                 \
+-    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);             \
+-    align_buffer_page_end(dst_argb_opt, (kWidth * BPP_B) * kHeight);           \
+-    for (int i = 0; i < kHeight * kWidth * BPP_A; ++i) {                       \
+-      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);                                       \
+-    MaskCpuFlags(-1);                                                          \
+-    ##FMT_A##To##FMT_B(src_argb, kWidth * STRIDE_A,                            \
+-                       dst_argb_opt, kWidth * BPP_B,                           \
+-                       kWidth, kHeight);                                       \
+-    int err = 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++;                                                                 \
+-    }                                                                          \
+-    EXPECT_EQ(err, 0);                                                         \
+-    free_aligned_buffer_page_end(src_argb)                                     \
+-    free_aligned_buffer_page_end(dst_argb_c)                                   \
+-    free_aligned_buffer_page_end(dst_argb_opt)                                 \
+-  }                                                                            \
+-}
+-
+-TESTATOBRANDOM(ARGB, 4, 4, ARGB, 4)
+-TESTATOBRANDOM(ARGB, 4, 4, BGRA, 4)
+-TESTATOBRANDOM(ARGB, 4, 4, ABGR, 4)
+-TESTATOBRANDOM(ARGB, 4, 4, RAW, 3)
+-TESTATOBRANDOM(ARGB, 4, 4, RGB24, 3)
+-TESTATOBRANDOM(ARGB, 4, 4, RGB565, 2)
+-TESTATOBRANDOM(ARGB, 4, 4, ARGB1555, 2)
+-TESTATOBRANDOM(ARGB, 4, 4, ARGB4444, 2)
+-
+-TESTATOBRANDOM(BGRA, 4, 4, ARGB, 4)
+-TESTATOBRANDOM(ABGR, 4, 4, ARGB, 4)
+-TESTATOBRANDOM(RAW, 3, 3, ARGB, 4)
+-TESTATOBRANDOM(RGB24, 3, 3, ARGB, 4)
+-TESTATOBRANDOM(RGB565, 2, 2, ARGB, 4)
+-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
+
diff --git a/libyuv.spec b/libyuv.spec
index b1e2dfa..d4342c7 100644
--- a/libyuv.spec
+++ b/libyuv.spec
@@ -1,19 +1,19 @@
 Name:		libyuv
 Summary:	YUV conversion and scaling functionality library
 Version:	0
-Release:	0.9.20120518svn268%{?dist}
+Release:	0.10.20120627svn296%{?dist}
 License:	BSD
 Group:		Development/Libraries
 Url:		http://code.google.com/p/libyuv/
-## svn -r 268 export http://libyuv.googlecode.com/svn/trunk libyuv-0
+## svn -r 296 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.
 Patch1:		libyuv-0001-Initial-autotools-support.patch
 # Fedora-specific.
 Patch2:		libyuv-0002-Fix-paths-in-ArmCpuCaps-test.patch
-# Resolve header conflict with duplicate definition in two header files
-Patch3:		libyuv-0-resolve-scale-header-conflict.patch
+# GCC-specific (will be proposed for inclusion)
+Patch3:		libyuv-0003-Drop-several-tests-due-to-GCC-related-issues.patch
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	libtool
@@ -45,7 +45,7 @@ Additional header files for development with %{name}.
 %setup -q
 %patch1 -p1 -b .autotools
 %patch2 -p1 -b .fix_paths
-%patch3 -p1 -b .common
+%patch3 -p1 -b .workaround_for_gcc
 
 
 %build
@@ -87,6 +87,10 @@ make check
 
 
 %changelog
+* Thu Jul 05 2012 Peter Lemenkov <lemenkov at gmail.com> - 0-0.10.20120627svn296
+- Next svn snapshot - ver. 296
+- Dropped patch3 (header conflict) - fixed upstream
+
 * Thu Jun 14 2012 Tom Callaway <spot at fedoraproject.org> - 0-0.9.20120518svn268
 - resolve header conflict with duplicate definition in scale*.h
 
diff --git a/sources b/sources
index 48909a3..dc9d4d3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-20784e10cbd3404dd985d06b1c7c8be5  libyuv-0.tar.bz2
+abc83f579df18a42466fbd84baf7de9f  libyuv-0.tar.bz2


More information about the scm-commits mailing list