KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/filters/scharr.h
Date: 2025-09-25 14:13:34
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 1 1 100.0%
Branches: 4 4 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 #ifndef KLEIDICV_FILTERS_SCHARR_H
6 #define KLEIDICV_FILTERS_SCHARR_H
7
8 #include "kleidicv/config.h"
9 #include "kleidicv/kleidicv.h"
10
11 extern "C" {
12 // For internal use only. See instead kleidicv_scharr_interleaved_s16_u8.
13 // Filter a horizontal stripe across an image. The stripe is defined by the
14 // range (y_begin, y_end].
15 KLEIDICV_API_DECLARATION(kleidicv_scharr_interleaved_stripe_s16_u8,
16 const uint8_t *src, size_t src_stride,
17 size_t src_width, size_t src_height,
18 size_t src_channels, int16_t *dst, size_t dst_stride,
19 size_t y_begin, size_t y_end);
20 }
21
22 namespace kleidicv {
23
24 198 inline bool scharr_interleaved_is_implemented(size_t src_width,
25 size_t src_height,
26 size_t src_channels) {
27
4/4
✓ Branch 0 taken 189 times.
✓ Branch 1 taken 9 times.
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 186 times.
198 return src_width > 2 && src_height > 2 && src_channels == 1;
28 }
29
30 namespace neon {
31
32 kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8(
33 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
34 size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin,
35 size_t y_end);
36
37 } // namespace neon
38
39 namespace sve2 {
40
41 kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8(
42 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
43 size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin,
44 size_t y_end);
45 } // namespace sve2
46
47 namespace sme {
48
49 kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8(
50 const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height,
51 size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin,
52 size_t y_end);
53 } // namespace sme
54
55 } // namespace kleidicv
56
57 #endif // KLEIDICV_FILTERS_SCHARR_H
58