| 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 | #include "kleidicv/resize/resize_linear.h" | ||
| 6 | #include "resize_linear_generic_sc.h" | ||
| 7 | #include "resize_linear_sc.h" | ||
| 8 | |||
| 9 | namespace kleidicv::sve2 { | ||
| 10 | |||
| 11 | 156 | KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t kleidicv_resize_2x2_stripe_u8( | |
| 12 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 13 | size_t y_begin, size_t y_end, uint8_t *dst, size_t dst_stride) { | ||
| 14 | 312 | return kleidicv_resize_2x2_u8_sc(src, src_stride, src_width, src_height, | |
| 15 | 156 | y_begin, y_end, dst, dst_stride); | |
| 16 | } | ||
| 17 | |||
| 18 | 116 | KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t kleidicv_resize_4x4_stripe_u8( | |
| 19 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 20 | size_t y_begin, size_t y_end, uint8_t *dst, size_t dst_stride) { | ||
| 21 | 232 | return kleidicv_resize_4x4_u8_sc(src, src_stride, src_width, src_height, | |
| 22 | 116 | y_begin, y_end, dst, dst_stride); | |
| 23 | } | ||
| 24 | |||
| 25 | template <ptrdiff_t kRatio, ptrdiff_t kChannels> | ||
| 26 | 153 | kleidicv_error_t kleidicv_resize_generic_stripe_u8( | |
| 27 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 28 | size_t y_begin, size_t y_end, uint8_t *dst, size_t dst_stride, | ||
| 29 | size_t dst_width, size_t dst_height) { | ||
| 30 | 153 | return kleidicv_resize_generic_stripe_u8_sc<kRatio, kChannels>( | |
| 31 | 153 | src, src_stride, src_width, src_height, y_begin, y_end, dst, dst_stride, | |
| 32 | 153 | dst_width, dst_height); | |
| 33 | } | ||
| 34 | |||
| 35 | #define KLEIDICV_INSTANTIATE_TEMPLATE(ratio, channels) \ | ||
| 36 | template kleidicv_error_t \ | ||
| 37 | kleidicv_resize_generic_stripe_u8<ratio, channels>( \ | ||
| 38 | const uint8_t *src, size_t src_stride, size_t src_width, \ | ||
| 39 | size_t src_height, size_t y_begin, size_t y_end, uint8_t *dst, \ | ||
| 40 | size_t dst_stride, size_t dst_width, size_t dst_height) | ||
| 41 | |||
| 42 | KLEIDICV_INSTANTIATE_TEMPLATE(2L, 1L); | ||
| 43 | KLEIDICV_INSTANTIATE_TEMPLATE(2L, 2L); | ||
| 44 | KLEIDICV_INSTANTIATE_TEMPLATE(2L, 3L); | ||
| 45 | KLEIDICV_INSTANTIATE_TEMPLATE(3L, 1L); | ||
| 46 | KLEIDICV_INSTANTIATE_TEMPLATE(3L, 2L); | ||
| 47 | KLEIDICV_INSTANTIATE_TEMPLATE(3L, 3L); | ||
| 48 | |||
| 49 | 392 | KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t kleidicv_resize_linear_stripe_f32( | |
| 50 | const float *src, size_t src_stride, size_t src_width, size_t src_height, | ||
| 51 | size_t y_begin, size_t y_end, float *dst, size_t dst_stride, | ||
| 52 | size_t dst_width, size_t dst_height) { | ||
| 53 | 392 | return kleidicv_resize_linear_stripe_f32_sc( | |
| 54 | 392 | src, src_stride, src_width, src_height, y_begin, y_end, dst, dst_stride, | |
| 55 | 392 | dst_width, dst_height); | |
| 56 | } | ||
| 57 | |||
| 58 | } // namespace kleidicv::sve2 | ||
| 59 |