File: 0004-Add-some-more-fault-tolerance-for-arm64.patch

package info (click to toggle)
libopenshot 0.2.2+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,620 kB
  • sloc: cpp: 15,779; ansic: 422; sh: 232; python: 28; makefile: 19; ruby: 5
file content (72 lines) | stat: -rw-r--r-- 3,173 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Sat, 18 Nov 2017 14:49:53 +0100
Subject: Add some more fault tolerance for arm64

---
 tests/FFmpegReader_Tests.cpp |  4 ++--
 tests/Timeline_Tests.cpp     | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp
index 7f7c960..07fc41e 100644
--- a/tests/FFmpegReader_Tests.cpp
+++ b/tests/FFmpegReader_Tests.cpp
@@ -109,8 +109,8 @@ TEST(FFmpegReader_Check_Video_File)
 
 	// Check image properties on scanline 10, pixel 112
 	CHECK_EQUAL(0, (int)pixels[pixel_index]);
-	CHECK_EQUAL(96, (int)pixels[pixel_index + 1]);
-	CHECK_EQUAL(188, (int)pixels[pixel_index + 2]);
+	CHECK_CLOSE(96, (int)pixels[pixel_index + 1], 1);
+	CHECK_CLOSE(188, (int)pixels[pixel_index + 2], 1);
 	CHECK_EQUAL(255, (int)pixels[pixel_index + 3]);
 
 	// Close reader
diff --git a/tests/Timeline_Tests.cpp b/tests/Timeline_Tests.cpp
index 76195e8..4d861a6 100644
--- a/tests/Timeline_Tests.cpp
+++ b/tests/Timeline_Tests.cpp
@@ -130,14 +130,14 @@ TEST(Timeline_Check_Two_Track_Video)
 	// Check image properties
 	CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1);
 	CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]);
-	CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]);
+	CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1);
 	CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]);
 
 	// Get frame
 	f = t.GetFrame(3);
 
 	// Check image properties
-	CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]);
+	CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1);
 	CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2);
 	CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]);
 	CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]);
@@ -146,7 +146,7 @@ TEST(Timeline_Check_Two_Track_Video)
 	f = t.GetFrame(24);
 
 	// Check image properties
-	CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index]);
+	CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index], 1);
 	CHECK_CLOSE(106, (int)f->GetPixels(pixel_row)[pixel_index + 1], 1);
 	CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]);
 	CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]);
@@ -155,7 +155,7 @@ TEST(Timeline_Check_Two_Track_Video)
 	f = t.GetFrame(5);
 
 	// Check image properties
-	CHECK_EQUAL(23, (int)f->GetPixels(pixel_row)[pixel_index]);
+	CHECK_CLOSE(23, (int)f->GetPixels(pixel_row)[pixel_index], 1);
 	CHECK_CLOSE(190, (int)f->GetPixels(pixel_row)[pixel_index + 1], 2);
 	CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 2]);
 	CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]);
@@ -175,7 +175,7 @@ TEST(Timeline_Check_Two_Track_Video)
 	// Check image properties
 	CHECK_CLOSE(176, (int)f->GetPixels(pixel_row)[pixel_index], 1);
 	CHECK_EQUAL(0, (int)f->GetPixels(pixel_row)[pixel_index + 1]);
-	CHECK_EQUAL(186, (int)f->GetPixels(pixel_row)[pixel_index + 2]);
+	CHECK_CLOSE(186, (int)f->GetPixels(pixel_row)[pixel_index + 2], 1);
 	CHECK_EQUAL(255, (int)f->GetPixels(pixel_row)[pixel_index + 3]);
 
 	// Close reader