Coverage Report

Created: 2025-07-18 06:57

/src/libavif/ext/libyuv/source/rotate_any.cc
Line
Count
Source (jump to first uncovered line)
1
/*
2
 *  Copyright 2015 The LibYuv Project Authors. All rights reserved.
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
 *  that can be found in the LICENSE file in the root of the source
6
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS. All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
9
 */
10
11
#include "libyuv/rotate.h"
12
#include "libyuv/rotate_row.h"
13
14
#include "libyuv/basic_types.h"
15
16
#ifdef __cplusplus
17
namespace libyuv {
18
extern "C" {
19
#endif
20
21
#define TANY(NAMEANY, TPOS_SIMD, TPOS_C, MASK)                        \
22
  void NAMEANY(const uint8_t* src, int src_stride, uint8_t* dst,      \
23
0
               int dst_stride, int width) {                           \
24
0
    int r = width & MASK;                                             \
25
0
    int n = width - r;                                                \
26
0
    if (n > 0) {                                                      \
27
0
      TPOS_SIMD(src, src_stride, dst, dst_stride, n);                 \
28
0
    }                                                                 \
29
0
    TPOS_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \
30
0
  }
Unexecuted instantiation: TransposeWx8_Any_SSSE3
Unexecuted instantiation: TransposeWx8_Fast_Any_SSSE3
31
32
#ifdef HAS_TRANSPOSEWX8_NEON
33
TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, TransposeWx8_C, 7)
34
#endif
35
#ifdef HAS_TRANSPOSEWX16_NEON
36
TANY(TransposeWx16_Any_NEON, TransposeWx16_NEON, TransposeWx16_C, 15)
37
#endif
38
#ifdef HAS_TRANSPOSEWX8_SSSE3
39
TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, TransposeWx8_C, 7)
40
#endif
41
#ifdef HAS_TRANSPOSEWX8_FAST_SSSE3
42
TANY(TransposeWx8_Fast_Any_SSSE3, TransposeWx8_Fast_SSSE3, TransposeWx8_C, 15)
43
#endif
44
#ifdef HAS_TRANSPOSEWX16_MSA
45
TANY(TransposeWx16_Any_MSA, TransposeWx16_MSA, TransposeWx16_C, 15)
46
#endif
47
#ifdef HAS_TRANSPOSEWX16_LSX
48
TANY(TransposeWx16_Any_LSX, TransposeWx16_LSX, TransposeWx16_C, 15)
49
#endif
50
#undef TANY
51
52
#define TUVANY(NAMEANY, TPOS_SIMD, MASK)                                       \
53
  void NAMEANY(const uint8_t* src, int src_stride, uint8_t* dst_a,             \
54
               int dst_stride_a, uint8_t* dst_b, int dst_stride_b,             \
55
0
               int width) {                                                    \
56
0
    int r = width & MASK;                                                      \
57
0
    int n = width - r;                                                         \
58
0
    if (n > 0) {                                                               \
59
0
      TPOS_SIMD(src, src_stride, dst_a, dst_stride_a, dst_b, dst_stride_b, n); \
60
0
    }                                                                          \
61
0
    TransposeUVWx8_C(src + n * 2, src_stride, dst_a + n * dst_stride_a,        \
62
0
                     dst_stride_a, dst_b + n * dst_stride_b, dst_stride_b, r); \
63
0
  }
64
65
#ifdef HAS_TRANSPOSEUVWX8_NEON
66
TUVANY(TransposeUVWx8_Any_NEON, TransposeUVWx8_NEON, 7)
67
#endif
68
#ifdef HAS_TRANSPOSEUVWX8_SSE2
69
TUVANY(TransposeUVWx8_Any_SSE2, TransposeUVWx8_SSE2, 7)
70
#endif
71
#ifdef HAS_TRANSPOSEUVWX16_MSA
72
TUVANY(TransposeUVWx16_Any_MSA, TransposeUVWx16_MSA, 7)
73
#endif
74
#ifdef HAS_TRANSPOSEUVWX16_LSX
75
TUVANY(TransposeUVWx16_Any_LSX, TransposeUVWx16_LSX, 7)
76
#endif
77
#undef TUVANY
78
79
#ifdef __cplusplus
80
}  // extern "C"
81
}  // namespace libyuv
82
#endif