diff --git a/.devcontainer/coverage.sh b/.devcontainer/coverage.sh index def7d4ab3d69f461917ef94a631947a92ce3ee17..99addc712e366c52c12b7f13f5bbc102700c23a7 100755 --- a/.devcontainer/coverage.sh +++ b/.devcontainer/coverage.sh @@ -15,11 +15,11 @@ EXTRA_CMAKE_ARGS="-DKLEIDICV_LIMIT_SME2_TO_SELECTED_ALGORITHMS=OFF -DKLEIDICV_LI # Clean any coverage results from previous runs find build/kleidicv-coverage/ -type f -name *.gcda -delete -LONG_VECTOR_TESTS="GRAY2.*:RGB*" +LONG_VECTOR_TESTS="GRAY2.*:RGB*:Yuv*:Rgb*" qemu-aarch64 build/kleidicv-coverage/test/framework/kleidicv-framework-test qemu-aarch64 -cpu cortex-a35 build/kleidicv-coverage/test/api/kleidicv-api-test -qemu-aarch64 -cpu max,sve128=on,sme=off build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=16 +qemu-aarch64 -cpu max,sve128=on,sme=off build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=16 qemu-aarch64 -cpu max,sve2048=on,sve-default-vector-length=256,sme=off \ build/kleidicv-coverage/test/api/kleidicv-api-test --gtest_filter="${LONG_VECTOR_TESTS}" --vector-length=256 qemu-aarch64 -cpu max,sve128=on,sme512=on build/kleidicv-coverage/test/api/kleidicv-api-test --vector-length=64 diff --git a/scripts/ci.sh b/scripts/ci.sh index b80bc5f6eb94c579bf76a7cc0e07b7c9a28823ac..5fb369bb4a9d8125acc2549e1559bf7826ab0763 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -53,7 +53,7 @@ CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ cmake -S . -B build/gcc -G Ni ninja -C build/gcc # Run tests -LONG_VECTOR_TESTS="GRAY2.*:RGB*" +LONG_VECTOR_TESTS="GRAY2.*:RGB*:Yuv*:Rgb*" TESTRESULT=0 qemu-aarch64 build/test/framework/kleidicv-framework-test --gtest_output=xml:build/test-results/ || TESTRESULT=1 qemu-aarch64 -cpu cortex-a35 build/test/api/kleidicv-api-test --gtest_output=xml:build/test-results/clang-neon/ || TESTRESULT=1 diff --git a/test/api/test_rgb_to_yuv.cpp b/test/api/test_rgb_to_yuv.cpp index d770a9bd8bd86cd81c588ad32ddd945f183f59ed..a76fa5aa5c320c0334fadbcefea930637843c34f 100644 --- a/test/api/test_rgb_to_yuv.cpp +++ b/test/api/test_rgb_to_yuv.cpp @@ -10,9 +10,9 @@ #include "kleidicv/utils.h" #include "test_config.h" -class RGB2YUVTest final { +class RgbToYuvTest final { public: - RGB2YUVTest(size_t channels, bool switch_blue) + RgbToYuvTest(size_t channels, bool switch_blue) : src_channels_(channels), switch_blue_(switch_blue) {} template @@ -111,42 +111,42 @@ class RGB2YUVTest final { bool switch_blue_; }; -TEST(RGBToYUV, RGB_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(3, false); +TEST(RgbToYuv, RgbYuvScalar) { + RgbToYuvTest rgb2yuv_test(3, false); rgb2yuv_test.execute_scalar_test(kleidicv_rgb_to_yuv_u8); } -TEST(RGBToYUV, RGB_YUV_vector) { - RGB2YUVTest rgb2yuv_test(3, false); +TEST(RgbToYuv, RgbYuvVector) { + RgbToYuvTest rgb2yuv_test(3, false); rgb2yuv_test.execute_vector_test(kleidicv_rgb_to_yuv_u8); } -TEST(RGBToYUV, RGBA_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(4, false); +TEST(RgbToYuv, RgbaYuvScalar) { + RgbToYuvTest rgb2yuv_test(4, false); rgb2yuv_test.execute_scalar_test(kleidicv_rgba_to_yuv_u8); } -TEST(RGBToYUV, RGBA_YUV_vector) { - RGB2YUVTest rgb2yuv_test(4, false); +TEST(RgbToYuv, RgbaYuvVector) { + RgbToYuvTest rgb2yuv_test(4, false); rgb2yuv_test.execute_vector_test(kleidicv_rgba_to_yuv_u8); } -TEST(RGBToYUV, BGR_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(3, true); +TEST(RgbToYuv, BgrYuvScalar) { + RgbToYuvTest rgb2yuv_test(3, true); rgb2yuv_test.execute_scalar_test(kleidicv_bgr_to_yuv_u8); } -TEST(RGBToYUV, BGR_YUV_vector) { - RGB2YUVTest rgb2yuv_test(3, true); +TEST(RgbToYuv, BgrYuvVector) { + RgbToYuvTest rgb2yuv_test(3, true); rgb2yuv_test.execute_vector_test(kleidicv_bgr_to_yuv_u8); } -TEST(RGBToYUV, BGRA_YUV_scalar) { - RGB2YUVTest rgb2yuv_test(4, true); +TEST(RgbToYuv, BgraYuvScalar) { + RgbToYuvTest rgb2yuv_test(4, true); rgb2yuv_test.execute_scalar_test(kleidicv_bgra_to_yuv_u8); } -TEST(RGBToYUV, BGRA_YUV_vector) { - RGB2YUVTest rgb2yuv_test(4, true); +TEST(RgbToYuv, BgraYuvVector) { + RgbToYuvTest rgb2yuv_test(4, true); rgb2yuv_test.execute_vector_test(kleidicv_bgra_to_yuv_u8); } diff --git a/test/api/test_thread_yuv_to_rgb.cpp b/test/api/test_thread_yuv_sp_to_rgb.cpp similarity index 93% rename from test/api/test_thread_yuv_to_rgb.cpp rename to test/api/test_thread_yuv_sp_to_rgb.cpp index b8fb8bccbc30c9b0135c3d71bd7c016176f332e5..1f3731df25f28cb4083341215c7f397fe513181a 100644 --- a/test/api/test_thread_yuv_to_rgb.cpp +++ b/test/api/test_thread_yuv_sp_to_rgb.cpp @@ -16,9 +16,9 @@ // Tuple of width, height, thread count. typedef std::tuple P; -class YUVtoRGB : public testing::TestWithParam

{}; +class Thread : public testing::TestWithParam

{}; -TEST_P(YUVtoRGB, YUVtoRGB) { +TEST_P(Thread, _) { unsigned width = 0, height = 0, thread_count = 0; std::tie(width, height, thread_count) = GetParam(); test::Array2D src_y(width, height), @@ -44,7 +44,7 @@ TEST_P(YUVtoRGB, YUVtoRGB) { EXPECT_EQ_ARRAY2D(dst_multi, dst_single); } -INSTANTIATE_TEST_SUITE_P(YUVtoRGB, YUVtoRGB, +INSTANTIATE_TEST_SUITE_P(YuvSp, Thread, testing::Values(P{1, 1, 1}, P{1, 2, 1}, P{1, 2, 2}, P{2, 1, 2}, P{2, 2, 1}, P{1, 3, 2}, P{2, 3, 1}, P{6, 4, 1}, P{4, 5, 2}, diff --git a/test/api/test_yuv_sp_to_rgb.cpp b/test/api/test_yuv_sp_to_rgb.cpp index 729a0db6e96c13e9b5804d7d0b2a5d74ba5b00a9..e79c01cdadeee6d0366995179cb210c1e97cfed4 100644 --- a/test/api/test_yuv_sp_to_rgb.cpp +++ b/test/api/test_yuv_sp_to_rgb.cpp @@ -141,82 +141,82 @@ class YuvSpTest final { bool switch_blue_; }; -TEST(YUVSP, RGB_NV12_scalar) { +TEST(YuvSp, RgbNv12Scalar) { YuvSpTest yuv_test(3, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgb_u8, false); } -TEST(YUVSP, RGB_NV12_vector) { +TEST(YuvSp, RgbNv12Vector) { YuvSpTest yuv_test(3, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgb_u8, false); } -TEST(YUVSP, RGB_NV21_scalar) { +TEST(YuvSp, RgbNv21Scalar) { YuvSpTest yuv_test(3, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgb_u8, true); } -TEST(YUVSP, RGB_NV21_vector) { +TEST(YuvSp, RgbNv21Vector) { YuvSpTest yuv_test(3, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgb_u8, true); } -TEST(YUVSP, BGR_NV12_scalar) { +TEST(YuvSp, BgrNv12Scalar) { YuvSpTest yuv_test(3, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgr_u8, false); } -TEST(YUVSP, BGR_NV12_vector) { +TEST(YuvSp, BgrNv12Vector) { YuvSpTest yuv_test(3, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgr_u8, false); } -TEST(YUVSP, BGR_NV21_scalar) { +TEST(YuvSp, BgrNv21Scalar) { YuvSpTest yuv_test(3, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgr_u8, true); } -TEST(YUVSP, BGR_NV21_vector) { +TEST(YuvSp, BgrNv21Vector) { YuvSpTest yuv_test(3, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgr_u8, true); } -TEST(YUVSP, RGBA_NV12_scalar) { +TEST(YuvSp, RgbaNv12Scalar) { YuvSpTest yuv_test(4, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgba_u8, false); } -TEST(YUVSP, RGBA_NV12_vector) { +TEST(YuvSp, RgbaNv12Vector) { YuvSpTest yuv_test(4, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgba_u8, false); } -TEST(YUVSP, RGBA_NV21_scalar) { +TEST(YuvSp, RgbaNv21Scalar) { YuvSpTest yuv_test(4, false); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_rgba_u8, true); } -TEST(YUVSP, RGBA_NV21_vector) { +TEST(YuvSp, RgbaNv21Vector) { YuvSpTest yuv_test(4, false); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_rgba_u8, true); } -TEST(YUVSP, BGRA_NV12_scalar) { +TEST(YuvSp, BgraNv12Scalar) { YuvSpTest yuv_test(4, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgra_u8, false); } -TEST(YUVSP, BGRA_NV12_vector) { +TEST(YuvSp, BgraNv12Vector) { YuvSpTest yuv_test(4, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgra_u8, false); } -TEST(YUVSP, BGRA_NV21_scalar) { +TEST(YuvSp, BgraNv21Scalar) { YuvSpTest yuv_test(4, true); yuv_test.execute_scalar_test(kleidicv_yuv_sp_to_bgra_u8, true); } -TEST(YUVSP, BGRA_NV21_vector) { +TEST(YuvSp, BgraNv21Vector) { YuvSpTest yuv_test(4, true); yuv_test.execute_vector_test(kleidicv_yuv_sp_to_bgra_u8, true); } diff --git a/test/api/test_yuv_to_rgb.cpp b/test/api/test_yuv_to_rgb.cpp index 4aaf5f248c5171e3f76380c85e1bb21919bf620c..e3766287234d689cf1520cd1c8bc0b1c10a68a95 100644 --- a/test/api/test_yuv_to_rgb.cpp +++ b/test/api/test_yuv_to_rgb.cpp @@ -10,9 +10,9 @@ #include "kleidicv/utils.h" #include "test_config.h" -class YUV2RGBTest final { +class YuvToRgbTest final { public: - explicit YUV2RGBTest(bool switch_blue) : switch_blue_(switch_blue) {} + explicit YuvToRgbTest(bool switch_blue) : switch_blue_(switch_blue) {} template void execute_scalar_test(F impl) { @@ -106,22 +106,22 @@ class YUV2RGBTest final { } }; -TEST(YUV2RGB, YUV_RGB_scalar) { - YUV2RGBTest yuv2rgb_test(false); +TEST(YuvToRgb, YuvRgbScalar) { + YuvToRgbTest yuv2rgb_test(false); yuv2rgb_test.execute_scalar_test(kleidicv_yuv_to_rgb_u8); } -TEST(YUV2RGB, YUV_RGB_vector) { - YUV2RGBTest yuv2rgb_test(false); +TEST(YuvToRgb, YuvRgbVector) { + YuvToRgbTest yuv2rgb_test(false); yuv2rgb_test.execute_vector_test(kleidicv_yuv_to_rgb_u8); } -TEST(YUV2RGB, YUV_BGR_scalar) { - YUV2RGBTest yuv2rgb_test(true); +TEST(YuvToRgb, YuvBgrScalar) { + YuvToRgbTest yuv2rgb_test(true); yuv2rgb_test.execute_scalar_test(kleidicv_yuv_to_bgr_u8); } -TEST(YUV2RGB, YUV_BGR_vector) { - YUV2RGBTest yuv2rgb_test(true); +TEST(YuvToRgb, YuvBgrVector) { + YuvToRgbTest yuv2rgb_test(true); yuv2rgb_test.execute_vector_test(kleidicv_yuv_to_bgr_u8); }