Skip to content

Commit e6f6b64

Browse files
committed
Fix Stabilize_Video test for platforms that doesn't use fast color space conversion
The Stabilize_Video test fails on platforms that doesn't support accelerated colorspace conversion from yuv420p to rgba. https://github.com/FFmpeg/FFmpeg/blob/e8e486332571347dd55822c842ba67276ac308e2/libswscale/yuv2rgb.c#L678-L696 This PR fixes it by rounding the result that caused the test failure. On x86_64, y = -0.001074643496478603 On riscv64, y = -0.0009904620157904118
1 parent e91bd82 commit e6f6b64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/CVStabilizer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <sstream>
1515
#include <memory>
16+
#include <cmath>
1617

1718
#include "openshot_catch.h"
1819

@@ -56,7 +57,7 @@ TEST_CASE( "Stabilize_Video", "[libopenshot][opencv][stabilizer]" )
5657
int dy = tp.dy*1000;
5758
int da = tp.da*1000;
5859
int x = ct.x*1000;
59-
int y = ct.y*1000;
60+
int y = std::round(ct.y*1000);
6061
int a = ct.a*1000;
6162

6263
CHECK(dx == (int) (58));

0 commit comments

Comments
 (0)