Line | Branch | Exec | Source |
---|---|---|---|
1 | // SPDX-FileCopyrightText: 2024 - 2025 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
2 | // | ||
3 | // SPDX-License-Identifier: Apache-2.0 | ||
4 | |||
5 | #include "kleidicv/dispatch.h" | ||
6 | #include "kleidicv/filters/blur_and_downsample.h" | ||
7 | #include "kleidicv/kleidicv.h" | ||
8 | |||
9 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_MULTIVERSION_C_API( |
10 | kleidicv_blur_and_downsample_stripe_u8, | ||
11 | &kleidicv::neon::kleidicv_blur_and_downsample_stripe_u8, | ||
12 | &kleidicv::sve2::kleidicv_blur_and_downsample_stripe_u8, | ||
13 | &kleidicv::sme::kleidicv_blur_and_downsample_stripe_u8, nullptr); | ||
14 | |||
15 | extern "C" { | ||
16 | |||
17 | 195 | kleidicv_error_t kleidicv_blur_and_downsample_u8( | |
18 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
19 | uint8_t *dst, size_t dst_stride, size_t channels, | ||
20 | kleidicv_border_type_t border_type, kleidicv_filter_context_t *context) { | ||
21 |
4/4✓ Branch 0 taken 66 times.
✓ Branch 1 taken 129 times.
✓ Branch 2 taken 66 times.
✓ Branch 3 taken 129 times.
|
390 | if (!kleidicv::blur_and_downsample_is_implemented(src_width, src_height, |
22 | 195 | channels)) { | |
23 | 66 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
24 | } | ||
25 | |||
26 | 129 | auto fixed_border_type = kleidicv::get_fixed_border_type(border_type); | |
27 |
2/2✓ Branch 0 taken 120 times.
✓ Branch 1 taken 9 times.
|
129 | if (!fixed_border_type) { |
28 | 9 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
29 | } | ||
30 | 240 | return kleidicv_blur_and_downsample_stripe_u8( | |
31 | 120 | src, src_stride, src_width, src_height, dst, dst_stride, 0, src_height, | |
32 | 120 | channels, *fixed_border_type, context); | |
33 | 195 | } | |
34 | |||
35 | } // extern "C" | ||
36 |