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::sve2 { | ||
9 | |||
10 | KLEIDICV_TARGET_FN_ATTRS | ||
11 | 118 | kleidicv_error_t rgb_to_yuv420_sp_stripe_u8(const uint8_t *src, | |
12 | size_t src_stride, uint8_t *y_dst, | ||
13 | size_t y_stride, uint8_t *uv_dst, | ||
14 | size_t uv_stride, size_t width, | ||
15 | size_t height, bool is_nv21, | ||
16 | size_t begin, size_t end) { | ||
17 |
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); |
18 |
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); |
19 |
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); |
20 |
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); |
21 | 98 | return RGBxorBGRxToYUV420<false, true, true>::rgb2yuv420_operation_sc( | |
22 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
23 | 98 | is_nv21, begin, end); | |
24 | 118 | } | |
25 | |||
26 | KLEIDICV_TARGET_FN_ATTRS | ||
27 | 118 | kleidicv_error_t rgba_to_yuv420_sp_stripe_u8(const uint8_t *src, | |
28 | size_t src_stride, uint8_t *y_dst, | ||
29 | size_t y_stride, uint8_t *uv_dst, | ||
30 | size_t uv_stride, size_t width, | ||
31 | size_t height, bool is_nv21, | ||
32 | size_t begin, size_t end) { | ||
33 |
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); |
34 |
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); |
35 |
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); |
36 |
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); |
37 | 98 | return RGBxorBGRxToYUV420<true, true, true>::rgb2yuv420_operation_sc( | |
38 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
39 | 98 | is_nv21, begin, end); | |
40 | 118 | } | |
41 | |||
42 | KLEIDICV_TARGET_FN_ATTRS | ||
43 | 118 | kleidicv_error_t bgr_to_yuv420_sp_stripe_u8(const uint8_t *src, | |
44 | size_t src_stride, uint8_t *y_dst, | ||
45 | size_t y_stride, uint8_t *uv_dst, | ||
46 | size_t uv_stride, size_t width, | ||
47 | size_t height, bool is_nv21, | ||
48 | size_t begin, size_t end) { | ||
49 |
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); |
50 |
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); |
51 |
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); |
52 |
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); |
53 | 98 | return RGBxorBGRxToYUV420<false, false, true>::rgb2yuv420_operation_sc( | |
54 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
55 | 98 | is_nv21, begin, end); | |
56 | 118 | } | |
57 | |||
58 | KLEIDICV_TARGET_FN_ATTRS | ||
59 | 118 | kleidicv_error_t bgra_to_yuv420_sp_stripe_u8(const uint8_t *src, | |
60 | size_t src_stride, uint8_t *y_dst, | ||
61 | size_t y_stride, uint8_t *uv_dst, | ||
62 | size_t uv_stride, size_t width, | ||
63 | size_t height, bool is_nv21, | ||
64 | size_t begin, size_t end) { | ||
65 |
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); |
66 |
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); |
67 |
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); |
68 |
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); |
69 | 98 | return RGBxorBGRxToYUV420<true, false, true>::rgb2yuv420_operation_sc( | |
70 | 98 | src, src_stride, y_dst, y_stride, uv_dst, uv_stride, width, height, | |
71 | 98 | is_nv21, begin, end); | |
72 | 118 | } | |
73 | |||
74 | } // namespace kleidicv::sve2 | ||
75 |