| 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_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 | 900 | inline bool scharr_interleaved_is_implemented(size_t src_width, | |
| 25 | size_t src_height, | ||
| 26 | size_t src_channels) { | ||
| 27 |
6/6✓ Branch 0 taken 896 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 892 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 888 times.
|
1788 | return src_width > 2 && src_height > 2 && src_channels >= 1 && |
| 28 | 888 | src_channels <= KLEIDICV_MAXIMUM_CHANNEL_COUNT; | |
| 29 | } | ||
| 30 | |||
| 31 | namespace neon { | ||
| 32 | |||
| 33 | kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8( | ||
| 34 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 35 | size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin, | ||
| 36 | size_t y_end); | ||
| 37 | |||
| 38 | } // namespace neon | ||
| 39 | |||
| 40 | namespace sve2 { | ||
| 41 | |||
| 42 | kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8( | ||
| 43 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 44 | size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin, | ||
| 45 | size_t y_end); | ||
| 46 | } // namespace sve2 | ||
| 47 | |||
| 48 | namespace sme { | ||
| 49 | |||
| 50 | kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8( | ||
| 51 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 52 | size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin, | ||
| 53 | size_t y_end); | ||
| 54 | } // namespace sme | ||
| 55 | |||
| 56 | namespace sme2 { | ||
| 57 | |||
| 58 | kleidicv_error_t kleidicv_scharr_interleaved_stripe_s16_u8( | ||
| 59 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 60 | size_t src_channels, int16_t *dst, size_t dst_stride, size_t y_begin, | ||
| 61 | size_t y_end); | ||
| 62 | } // namespace sme2 | ||
| 63 | |||
| 64 | } // namespace kleidicv | ||
| 65 | |||
| 66 | #endif // KLEIDICV_FILTERS_SCHARR_H | ||
| 67 |