| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2025 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
| 2 | // | ||
| 3 | // SPDX-License-Identifier: Apache-2.0 | ||
| 4 | |||
| 5 | #include "kleidicv/conversions/rgb_to_yuv_420.h" | ||
| 6 | #include "rgb_to_yuv420_sc.h" | ||
| 7 | |||
| 8 | namespace kleidicv::sme { | ||
| 9 | |||
| 10 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
| 11 | 118 | rgb_to_yuv420_sp_stripe_u8(const uint8_t *src, size_t src_stride, | |
| 12 | uint8_t *y_dst, size_t y_stride, uint8_t *uv_dst, | ||
| 13 | size_t uv_stride, size_t width, size_t height, | ||
| 14 | bool is_nv21, size_t begin, size_t end) { | ||
| 15 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 114 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 114 times.
|
118 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
| 16 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 110 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 110 times.
|
114 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
| 17 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 106 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 106 times.
|
110 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
| 18 |
6/6✓ Branch 0 taken 4 times.
✓ Branch 1 taken 102 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 98 times.
✓ Branch 4 taken 8 times.
✓ Branch 5 taken 98 times.
|
106 | CHECK_IMAGE_SIZE(width, height); |
| 19 | 98 | return RGBxorBGRxToYUV420<false, true, true>::rgb2yuv420_operation_sc( | |
| 20 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
| 21 | 98 | is_nv21, begin, end); | |
| 22 | 118 | } | |
| 23 | |||
| 24 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
| 25 | 118 | rgba_to_yuv420_sp_stripe_u8(const uint8_t *src, size_t src_stride, | |
| 26 | uint8_t *y_dst, size_t y_stride, uint8_t *uv_dst, | ||
| 27 | size_t uv_stride, size_t width, size_t height, | ||
| 28 | bool is_nv21, size_t begin, size_t end) { | ||
| 29 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 114 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 114 times.
|
118 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
| 30 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 110 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 110 times.
|
114 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
| 31 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 106 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 106 times.
|
110 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
| 32 |
6/6✓ Branch 0 taken 4 times.
✓ Branch 1 taken 102 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 98 times.
✓ Branch 4 taken 8 times.
✓ Branch 5 taken 98 times.
|
106 | CHECK_IMAGE_SIZE(width, height); |
| 33 | 98 | return RGBxorBGRxToYUV420<true, true, true>::rgb2yuv420_operation_sc( | |
| 34 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
| 35 | 98 | is_nv21, begin, end); | |
| 36 | 118 | } | |
| 37 | |||
| 38 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
| 39 | 118 | bgr_to_yuv420_sp_stripe_u8(const uint8_t *src, size_t src_stride, | |
| 40 | uint8_t *y_dst, size_t y_stride, uint8_t *uv_dst, | ||
| 41 | size_t uv_stride, size_t width, size_t height, | ||
| 42 | bool is_nv21, size_t begin, size_t end) { | ||
| 43 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 114 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 114 times.
|
118 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
| 44 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 110 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 110 times.
|
114 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
| 45 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 106 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 106 times.
|
110 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
| 46 |
6/6✓ Branch 0 taken 4 times.
✓ Branch 1 taken 102 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 98 times.
✓ Branch 4 taken 8 times.
✓ Branch 5 taken 98 times.
|
106 | CHECK_IMAGE_SIZE(width, height); |
| 47 | 98 | return RGBxorBGRxToYUV420<false, false, true>::rgb2yuv420_operation_sc( | |
| 48 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
| 49 | 98 | is_nv21, begin, end); | |
| 50 | 118 | } | |
| 51 | |||
| 52 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
| 53 | 118 | bgra_to_yuv420_sp_stripe_u8(const uint8_t *src, size_t src_stride, | |
| 54 | uint8_t *y_dst, size_t y_stride, uint8_t *uv_dst, | ||
| 55 | size_t uv_stride, size_t width, size_t height, | ||
| 56 | bool is_nv21, size_t begin, size_t end) { | ||
| 57 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 114 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 114 times.
|
118 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
| 58 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 110 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 110 times.
|
114 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
| 59 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 106 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 106 times.
|
110 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
| 60 |
6/6✓ Branch 0 taken 4 times.
✓ Branch 1 taken 102 times.
✓ Branch 2 taken 4 times.
✓ Branch 3 taken 98 times.
✓ Branch 4 taken 8 times.
✓ Branch 5 taken 98 times.
|
106 | CHECK_IMAGE_SIZE(width, height); |
| 61 | 98 | return RGBxorBGRxToYUV420<true, false, true>::rgb2yuv420_operation_sc( | |
| 62 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
| 63 | 98 | is_nv21, begin, end); | |
| 64 | 118 | } | |
| 65 | |||
| 66 | } // namespace kleidicv::sme | ||
| 67 |