| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
| 2 | // | ||
| 3 | // SPDX-License-Identifier: Apache-2.0 | ||
| 4 | |||
| 5 | #include "kleidicv/ctypes.h" | ||
| 6 | #include "kleidicv/dispatch.h" | ||
| 7 | #include "kleidicv/kleidicv.h" | ||
| 8 | #include "kleidicv/transform/warp_perspective.h" | ||
| 9 | |||
| 10 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 2 times.
|
10 | KLEIDICV_MULTIVERSION_C_API(kleidicv_warp_perspective_stripe_u8, |
| 11 | &kleidicv::neon::warp_perspective_stripe<uint8_t>, | ||
| 12 | &kleidicv::sve2::warp_perspective_stripe<uint8_t>, | ||
| 13 | nullptr, nullptr); | ||
| 14 | |||
| 15 | extern "C" { | ||
| 16 | |||
| 17 | 324 | kleidicv_error_t kleidicv_warp_perspective_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 dst_width, size_t dst_height, | ||
| 20 | const float transformation[9], size_t channels, | ||
| 21 | kleidicv_interpolation_type_t interpolation, | ||
| 22 | kleidicv_border_type_t border_type, const uint8_t *border_value) { | ||
| 23 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 304 times.
|
324 | if (!kleidicv::warp_perspective_is_implemented<uint8_t>( |
| 24 | 324 | dst_width, channels, interpolation, border_type)) { | |
| 25 | 20 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
| 26 | } | ||
| 27 | |||
| 28 | 608 | return kleidicv_warp_perspective_stripe_u8( | |
| 29 | 304 | src, src_stride, src_width, src_height, dst, dst_stride, dst_width, | |
| 30 | 304 | dst_height, 0, dst_height, transformation, 1, interpolation, border_type, | |
| 31 | 304 | border_value); | |
| 32 | 324 | } | |
| 33 | |||
| 34 | } // extern "C" | ||
| 35 |