KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/filters/blur_and_downsample.h
Date: 2026-03-05 15:57:40
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 1 1 100.0%
Branches: 6 6 100.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2024 - 2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #ifndef KLEIDICV_FILTERS_BLUR_AND_DOWNSAMPLE_H
6 #define KLEIDICV_FILTERS_BLUR_AND_DOWNSAMPLE_H
7
8 #include "kleidicv/config.h"
9 #include "kleidicv/kleidicv.h"
10 #include "kleidicv/types.h"
11 #include "kleidicv/workspace/border_types.h"
12
13 extern "C" {
14 // For internal use only. See instead kleidicv_blur_and_downsample_u8.
15 // Blurs and downsamples a horizontal stripe across an image. The stripe is
16 // defined by the range (y_begin, y_end].
17 KLEIDICV_API_DECLARATION(kleidicv_blur_and_downsample_stripe_u8,
18 const uint8_t *src, size_t src_stride,
19 size_t src_width, size_t src_height, uint8_t *dst,
20 size_t dst_stride, size_t y_begin, size_t y_end,
21 size_t channels,
22 kleidicv::FixedBorderType fixed_border_type);
23 }
24
25 namespace kleidicv {
26
27 960 inline bool blur_and_downsample_is_implemented(size_t src_width,
28 size_t src_height,
29 size_t channels) {
30
6/6
✓ Branch 0 taken 372 times.
✓ Branch 1 taken 588 times.
✓ Branch 2 taken 368 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 364 times.
1324 return (src_width >= 4 && src_height >= 4) && (channels >= 1) &&
31 364 (channels <= KLEIDICV_MAXIMUM_CHANNEL_COUNT);
32 }
33
34 namespace neon {
35
36 kleidicv_error_t kleidicv_blur_and_downsample_stripe_u8(
37 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
38 uint8_t *dst, size_t dst_stride, size_t y_begin, size_t y_end,
39 size_t channels, FixedBorderType fixed_border_type);
40
41 } // namespace neon
42
43 namespace sve2 {
44
45 kleidicv_error_t kleidicv_blur_and_downsample_stripe_u8(
46 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
47 uint8_t *dst, size_t dst_stride, size_t y_begin, size_t y_end,
48 size_t channels, FixedBorderType fixed_border_type);
49
50 } // namespace sve2
51
52 namespace sme {
53
54 kleidicv_error_t kleidicv_blur_and_downsample_stripe_u8(
55 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
56 uint8_t *dst, size_t dst_stride, size_t y_begin, size_t y_end,
57 size_t channels, FixedBorderType fixed_border_type);
58
59 } // namespace sme
60
61 } // namespace kleidicv
62
63 #endif // KLEIDICV_FILTERS_BLUR_AND_DOWNSAMPLE_H
64