KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/conversions/rgb_to_yuv420p_api.cpp
Date: 2025-11-25 17:23:32
Exec Total Coverage
Lines: 16 16 100.0%
Functions: 8 8 100.0%
Branches: 24 24 100.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #include "kleidicv/conversions/rgb_to_yuv_420.h"
6 #include "kleidicv/dispatch.h"
7 #include "kleidicv/kleidicv.h"
8
9 #define KLEIDICV_DEFINE_C_API(name, partialname) \
10 KLEIDICV_MULTIVERSION_C_API( \
11 name, &kleidicv::neon::partialname, &kleidicv::sve2::partialname, \
12 &kleidicv::sme::partialname, \
13 KLEIDICV_SME2_IMPL_IF(&kleidicv::sme2::partialname))
14
15
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_rgb_to_yuv420_p_stripe_u8,
16 rgb_to_yuv420_p_stripe_u8);
17
18
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_rgba_to_yuv420_p_stripe_u8,
19 rgba_to_yuv420_p_stripe_u8);
20
21
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_bgr_to_yuv420_p_stripe_u8,
22 bgr_to_yuv420_p_stripe_u8);
23
24
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_bgra_to_yuv420_p_stripe_u8,
25 bgra_to_yuv420_p_stripe_u8);
26
27 extern "C" {
28
29 190 kleidicv_error_t kleidicv_rgb_to_yuv420_p_u8(const uint8_t *src,
30 size_t src_stride, uint8_t *dst,
31 size_t dst_stride, size_t width,
32 size_t height, bool is_yv12) {
33 380 return kleidicv_rgb_to_yuv420_p_stripe_u8(src, src_stride, dst, dst_stride,
34 190 width, height, is_yv12, 0, height);
35 }
36
37 190 kleidicv_error_t kleidicv_rgba_to_yuv420_p_u8(const uint8_t *src,
38 size_t src_stride, uint8_t *dst,
39 size_t dst_stride, size_t width,
40 size_t height, bool is_yv12) {
41 380 return kleidicv_rgba_to_yuv420_p_stripe_u8(src, src_stride, dst, dst_stride,
42 190 width, height, is_yv12, 0, height);
43 }
44
45 190 kleidicv_error_t kleidicv_bgr_to_yuv420_p_u8(const uint8_t *src,
46 size_t src_stride, uint8_t *dst,
47 size_t dst_stride, size_t width,
48 size_t height, bool is_yv12) {
49 380 return kleidicv_bgr_to_yuv420_p_stripe_u8(src, src_stride, dst, dst_stride,
50 190 width, height, is_yv12, 0, height);
51 }
52
53 190 kleidicv_error_t kleidicv_bgra_to_yuv420_p_u8(const uint8_t *src,
54 size_t src_stride, uint8_t *dst,
55 size_t dst_stride, size_t width,
56 size_t height, bool is_yv12) {
57 380 return kleidicv_bgra_to_yuv420_p_stripe_u8(src, src_stride, dst, dst_stride,
58 190 width, height, is_yv12, 0, height);
59 }
60
61 } // extern "C"
62