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