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 | 59 | 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 2 times.
✓ Branch 1 taken 57 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 57 times.
|
59 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
16 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 55 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 55 times.
|
57 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
17 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 53 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 53 times.
|
55 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
18 |
6/6✓ Branch 0 taken 2 times.
✓ Branch 1 taken 51 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 49 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 49 times.
|
53 | CHECK_IMAGE_SIZE(width, height); |
19 | 49 | return RGBxorBGRxToYUV420<false, true, true>::rgb2yuv420_operation_sc( | |
20 | 49 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
21 | 49 | is_nv21, begin, end); | |
22 | 59 | } | |
23 | |||
24 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
25 | 59 | 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 2 times.
✓ Branch 1 taken 57 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 57 times.
|
59 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
30 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 55 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 55 times.
|
57 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
31 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 53 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 53 times.
|
55 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
32 |
6/6✓ Branch 0 taken 2 times.
✓ Branch 1 taken 51 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 49 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 49 times.
|
53 | CHECK_IMAGE_SIZE(width, height); |
33 | 49 | return RGBxorBGRxToYUV420<true, true, true>::rgb2yuv420_operation_sc( | |
34 | 49 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
35 | 49 | is_nv21, begin, end); | |
36 | 59 | } | |
37 | |||
38 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
39 | 59 | 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 2 times.
✓ Branch 1 taken 57 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 57 times.
|
59 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
44 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 55 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 55 times.
|
57 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
45 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 53 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 53 times.
|
55 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
46 |
6/6✓ Branch 0 taken 2 times.
✓ Branch 1 taken 51 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 49 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 49 times.
|
53 | CHECK_IMAGE_SIZE(width, height); |
47 | 49 | return RGBxorBGRxToYUV420<false, false, true>::rgb2yuv420_operation_sc( | |
48 | 49 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
49 | 49 | is_nv21, begin, end); | |
50 | 59 | } | |
51 | |||
52 | KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
53 | 59 | 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 2 times.
✓ Branch 1 taken 57 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 57 times.
|
59 | CHECK_POINTER_AND_STRIDE(src, src_stride, height); |
58 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 55 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 55 times.
|
57 | CHECK_POINTER_AND_STRIDE(y_dst, y_stride, height); |
59 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 53 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 53 times.
|
55 | CHECK_POINTER_AND_STRIDE(uv_dst, uv_stride, (height + 1) / 2); |
60 |
6/6✓ Branch 0 taken 2 times.
✓ Branch 1 taken 51 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 49 times.
✓ Branch 4 taken 4 times.
✓ Branch 5 taken 49 times.
|
53 | CHECK_IMAGE_SIZE(width, height); |
61 | 49 | return RGBxorBGRxToYUV420<true, false, true>::rgb2yuv420_operation_sc( | |
62 | 49 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
63 | 49 | is_nv21, begin, end); | |
64 | 59 | } | |
65 | |||
66 | } // namespace kleidicv::sme | ||
67 |