KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/filters/blur_and_downsample_api.cpp
Date: 2025-11-25 17:23:32
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 2 2 100.0%
Branches: 10 10 100.0%

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 2 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
10 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 260 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 88 times.
✓ Branch 1 taken 172 times.
✓ Branch 2 taken 88 times.
✓ Branch 3 taken 172 times.
520 if (!kleidicv::blur_and_downsample_is_implemented(src_width, src_height,
22 260 channels)) {
23 88 return KLEIDICV_ERROR_NOT_IMPLEMENTED;
24 }
25
26 172 auto fixed_border_type = kleidicv::get_fixed_border_type(border_type);
27
2/2
✓ Branch 0 taken 160 times.
✓ Branch 1 taken 12 times.
172 if (!fixed_border_type) {
28 12 return KLEIDICV_ERROR_NOT_IMPLEMENTED;
29 }
30 320 return kleidicv_blur_and_downsample_stripe_u8(
31 160 src, src_stride, src_width, src_height, dst, dst_stride, 0, src_height,
32 160 channels, *fixed_border_type, context);
33 260 }
34
35 } // extern "C"
36