Coverage Report

Created: 2024-09-06 07:53

/src/libvpx/vpx_dsp/x86/mem_sse2.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 *  Copyright (c) 2017 The WebM 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
#ifndef VPX_VPX_DSP_X86_MEM_SSE2_H_
12
#define VPX_VPX_DSP_X86_MEM_SSE2_H_
13
14
#include <emmintrin.h>  // SSE2
15
#include <string.h>
16
17
#include "./vpx_config.h"
18
19
25.9M
static INLINE void storeu_int32(void *dst, int32_t v) {
20
25.9M
  memcpy(dst, &v, sizeof(v));
21
25.9M
}
Unexecuted instantiation: variance_sse2.c:storeu_int32
Unexecuted instantiation: bilinear_filter_sse2.c:storeu_int32
Unexecuted instantiation: vp9_frame_scale_ssse3.c:storeu_int32
Unexecuted instantiation: sse_sse4.c:storeu_int32
Unexecuted instantiation: sse_avx2.c:storeu_int32
Unexecuted instantiation: post_proc_sse2.c:storeu_int32
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:storeu_int32
loopfilter_sse2.c:storeu_int32
Line
Count
Source
19
25.9M
static INLINE void storeu_int32(void *dst, int32_t v) {
20
25.9M
  memcpy(dst, &v, sizeof(v));
21
25.9M
}
Unexecuted instantiation: sum_squares_sse2.c:storeu_int32
Unexecuted instantiation: avg_pred_sse2.c:storeu_int32
22
23
2.50G
static INLINE int32_t loadu_int32(const void *src) {
24
2.50G
  int32_t v;
25
2.50G
  memcpy(&v, src, sizeof(v));
26
2.50G
  return v;
27
2.50G
}
variance_sse2.c:loadu_int32
Line
Count
Source
23
2.50G
static INLINE int32_t loadu_int32(const void *src) {
24
2.50G
  int32_t v;
25
2.50G
  memcpy(&v, src, sizeof(v));
26
2.50G
  return v;
27
2.50G
}
Unexecuted instantiation: bilinear_filter_sse2.c:loadu_int32
Unexecuted instantiation: vp9_frame_scale_ssse3.c:loadu_int32
Unexecuted instantiation: sse_sse4.c:loadu_int32
Unexecuted instantiation: sse_avx2.c:loadu_int32
Unexecuted instantiation: post_proc_sse2.c:loadu_int32
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:loadu_int32
Unexecuted instantiation: loopfilter_sse2.c:loadu_int32
Unexecuted instantiation: sum_squares_sse2.c:loadu_int32
Unexecuted instantiation: avg_pred_sse2.c:loadu_int32
28
29
0
static INLINE __m128i load_unaligned_u32(const void *a) {
30
0
  int val;
31
0
  memcpy(&val, a, sizeof(val));
32
0
  return _mm_cvtsi32_si128(val);
33
0
}
Unexecuted instantiation: variance_sse2.c:load_unaligned_u32
Unexecuted instantiation: bilinear_filter_sse2.c:load_unaligned_u32
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_unaligned_u32
Unexecuted instantiation: sse_sse4.c:load_unaligned_u32
Unexecuted instantiation: sse_avx2.c:load_unaligned_u32
Unexecuted instantiation: post_proc_sse2.c:load_unaligned_u32
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_unaligned_u32
Unexecuted instantiation: loopfilter_sse2.c:load_unaligned_u32
Unexecuted instantiation: sum_squares_sse2.c:load_unaligned_u32
Unexecuted instantiation: avg_pred_sse2.c:load_unaligned_u32
34
35
0
static INLINE void store_unaligned_u32(void *const a, const __m128i v) {
36
0
  const int val = _mm_cvtsi128_si32(v);
37
0
  memcpy(a, &val, sizeof(val));
38
0
}
Unexecuted instantiation: variance_sse2.c:store_unaligned_u32
Unexecuted instantiation: bilinear_filter_sse2.c:store_unaligned_u32
Unexecuted instantiation: vp9_frame_scale_ssse3.c:store_unaligned_u32
Unexecuted instantiation: sse_sse4.c:store_unaligned_u32
Unexecuted instantiation: sse_avx2.c:store_unaligned_u32
Unexecuted instantiation: post_proc_sse2.c:store_unaligned_u32
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:store_unaligned_u32
Unexecuted instantiation: loopfilter_sse2.c:store_unaligned_u32
Unexecuted instantiation: sum_squares_sse2.c:store_unaligned_u32
Unexecuted instantiation: avg_pred_sse2.c:store_unaligned_u32
39
40
76.6M
#define mm_storelu(dst, v) memcpy((dst), (const char *)&(v), 8)
41
76.6M
#define mm_storehu(dst, v) memcpy((dst), (const char *)&(v) + 8, 8)
42
43
76.7M
static INLINE __m128i loadh_epi64(const __m128i s, const void *const src) {
44
76.7M
  return _mm_castps_si128(
45
76.7M
      _mm_loadh_pi(_mm_castsi128_ps(s), (const __m64 *)src));
46
76.7M
}
Unexecuted instantiation: variance_sse2.c:loadh_epi64
Unexecuted instantiation: bilinear_filter_sse2.c:loadh_epi64
Unexecuted instantiation: vp9_frame_scale_ssse3.c:loadh_epi64
Unexecuted instantiation: sse_sse4.c:loadh_epi64
Unexecuted instantiation: sse_avx2.c:loadh_epi64
Unexecuted instantiation: post_proc_sse2.c:loadh_epi64
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:loadh_epi64
Unexecuted instantiation: loopfilter_sse2.c:loadh_epi64
sum_squares_sse2.c:loadh_epi64
Line
Count
Source
43
76.7M
static INLINE __m128i loadh_epi64(const __m128i s, const void *const src) {
44
76.7M
  return _mm_castps_si128(
45
76.7M
      _mm_loadh_pi(_mm_castsi128_ps(s), (const __m64 *)src));
46
76.7M
}
Unexecuted instantiation: avg_pred_sse2.c:loadh_epi64
47
48
static INLINE void load_8bit_4x4(const uint8_t *const s, const ptrdiff_t stride,
49
0
                                 __m128i *const d) {
50
0
  d[0] = _mm_cvtsi32_si128(*(const int *)(s + 0 * stride));
51
0
  d[1] = _mm_cvtsi32_si128(*(const int *)(s + 1 * stride));
52
0
  d[2] = _mm_cvtsi32_si128(*(const int *)(s + 2 * stride));
53
0
  d[3] = _mm_cvtsi32_si128(*(const int *)(s + 3 * stride));
54
0
}
Unexecuted instantiation: variance_sse2.c:load_8bit_4x4
Unexecuted instantiation: bilinear_filter_sse2.c:load_8bit_4x4
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_8bit_4x4
Unexecuted instantiation: sse_sse4.c:load_8bit_4x4
Unexecuted instantiation: sse_avx2.c:load_8bit_4x4
Unexecuted instantiation: post_proc_sse2.c:load_8bit_4x4
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_8bit_4x4
Unexecuted instantiation: loopfilter_sse2.c:load_8bit_4x4
Unexecuted instantiation: sum_squares_sse2.c:load_8bit_4x4
Unexecuted instantiation: avg_pred_sse2.c:load_8bit_4x4
55
56
static INLINE void load_8bit_4x8(const uint8_t *const s, const ptrdiff_t stride,
57
0
                                 __m128i *const d) {
58
0
  load_8bit_4x4(s + 0 * stride, stride, &d[0]);
59
0
  load_8bit_4x4(s + 4 * stride, stride, &d[4]);
60
0
}
Unexecuted instantiation: variance_sse2.c:load_8bit_4x8
Unexecuted instantiation: bilinear_filter_sse2.c:load_8bit_4x8
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_8bit_4x8
Unexecuted instantiation: sse_sse4.c:load_8bit_4x8
Unexecuted instantiation: sse_avx2.c:load_8bit_4x8
Unexecuted instantiation: post_proc_sse2.c:load_8bit_4x8
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_8bit_4x8
Unexecuted instantiation: loopfilter_sse2.c:load_8bit_4x8
Unexecuted instantiation: sum_squares_sse2.c:load_8bit_4x8
Unexecuted instantiation: avg_pred_sse2.c:load_8bit_4x8
61
62
static INLINE void load_8bit_8x4(const uint8_t *const s, const ptrdiff_t stride,
63
0
                                 __m128i *const d) {
64
0
  d[0] = _mm_loadl_epi64((const __m128i *)(s + 0 * stride));
65
0
  d[1] = _mm_loadl_epi64((const __m128i *)(s + 1 * stride));
66
0
  d[2] = _mm_loadl_epi64((const __m128i *)(s + 2 * stride));
67
0
  d[3] = _mm_loadl_epi64((const __m128i *)(s + 3 * stride));
68
0
}
Unexecuted instantiation: variance_sse2.c:load_8bit_8x4
Unexecuted instantiation: bilinear_filter_sse2.c:load_8bit_8x4
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_8bit_8x4
Unexecuted instantiation: sse_sse4.c:load_8bit_8x4
Unexecuted instantiation: sse_avx2.c:load_8bit_8x4
Unexecuted instantiation: post_proc_sse2.c:load_8bit_8x4
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_8bit_8x4
Unexecuted instantiation: loopfilter_sse2.c:load_8bit_8x4
Unexecuted instantiation: sum_squares_sse2.c:load_8bit_8x4
Unexecuted instantiation: avg_pred_sse2.c:load_8bit_8x4
69
70
static INLINE void load_8bit_8x8(const uint8_t *const s, const ptrdiff_t stride,
71
0
                                 __m128i *const d) {
72
0
  load_8bit_8x4(s + 0 * stride, stride, &d[0]);
73
0
  load_8bit_8x4(s + 4 * stride, stride, &d[4]);
74
0
}
Unexecuted instantiation: variance_sse2.c:load_8bit_8x8
Unexecuted instantiation: bilinear_filter_sse2.c:load_8bit_8x8
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_8bit_8x8
Unexecuted instantiation: sse_sse4.c:load_8bit_8x8
Unexecuted instantiation: sse_avx2.c:load_8bit_8x8
Unexecuted instantiation: post_proc_sse2.c:load_8bit_8x8
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_8bit_8x8
Unexecuted instantiation: loopfilter_sse2.c:load_8bit_8x8
Unexecuted instantiation: sum_squares_sse2.c:load_8bit_8x8
Unexecuted instantiation: avg_pred_sse2.c:load_8bit_8x8
75
76
static INLINE void load_8bit_16x8(const uint8_t *const s,
77
0
                                  const ptrdiff_t stride, __m128i *const d) {
78
0
  d[0] = _mm_load_si128((const __m128i *)(s + 0 * stride));
79
0
  d[1] = _mm_load_si128((const __m128i *)(s + 1 * stride));
80
0
  d[2] = _mm_load_si128((const __m128i *)(s + 2 * stride));
81
0
  d[3] = _mm_load_si128((const __m128i *)(s + 3 * stride));
82
0
  d[4] = _mm_load_si128((const __m128i *)(s + 4 * stride));
83
0
  d[5] = _mm_load_si128((const __m128i *)(s + 5 * stride));
84
0
  d[6] = _mm_load_si128((const __m128i *)(s + 6 * stride));
85
0
  d[7] = _mm_load_si128((const __m128i *)(s + 7 * stride));
86
0
}
Unexecuted instantiation: variance_sse2.c:load_8bit_16x8
Unexecuted instantiation: bilinear_filter_sse2.c:load_8bit_16x8
Unexecuted instantiation: vp9_frame_scale_ssse3.c:load_8bit_16x8
Unexecuted instantiation: sse_sse4.c:load_8bit_16x8
Unexecuted instantiation: sse_avx2.c:load_8bit_16x8
Unexecuted instantiation: post_proc_sse2.c:load_8bit_16x8
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:load_8bit_16x8
Unexecuted instantiation: loopfilter_sse2.c:load_8bit_16x8
Unexecuted instantiation: sum_squares_sse2.c:load_8bit_16x8
Unexecuted instantiation: avg_pred_sse2.c:load_8bit_16x8
87
88
static INLINE void loadu_8bit_16x4(const uint8_t *const s,
89
0
                                   const ptrdiff_t stride, __m128i *const d) {
90
0
  d[0] = _mm_loadu_si128((const __m128i *)(s + 0 * stride));
91
0
  d[1] = _mm_loadu_si128((const __m128i *)(s + 1 * stride));
92
0
  d[2] = _mm_loadu_si128((const __m128i *)(s + 2 * stride));
93
0
  d[3] = _mm_loadu_si128((const __m128i *)(s + 3 * stride));
94
0
}
Unexecuted instantiation: variance_sse2.c:loadu_8bit_16x4
Unexecuted instantiation: bilinear_filter_sse2.c:loadu_8bit_16x4
Unexecuted instantiation: vp9_frame_scale_ssse3.c:loadu_8bit_16x4
Unexecuted instantiation: sse_sse4.c:loadu_8bit_16x4
Unexecuted instantiation: sse_avx2.c:loadu_8bit_16x4
Unexecuted instantiation: post_proc_sse2.c:loadu_8bit_16x4
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:loadu_8bit_16x4
Unexecuted instantiation: loopfilter_sse2.c:loadu_8bit_16x4
Unexecuted instantiation: sum_squares_sse2.c:loadu_8bit_16x4
Unexecuted instantiation: avg_pred_sse2.c:loadu_8bit_16x4
95
96
static INLINE void loadu_8bit_16x8(const uint8_t *const s,
97
0
                                   const ptrdiff_t stride, __m128i *const d) {
98
0
  loadu_8bit_16x4(s + 0 * stride, stride, &d[0]);
99
0
  loadu_8bit_16x4(s + 4 * stride, stride, &d[4]);
100
0
}
Unexecuted instantiation: variance_sse2.c:loadu_8bit_16x8
Unexecuted instantiation: bilinear_filter_sse2.c:loadu_8bit_16x8
Unexecuted instantiation: vp9_frame_scale_ssse3.c:loadu_8bit_16x8
Unexecuted instantiation: sse_sse4.c:loadu_8bit_16x8
Unexecuted instantiation: sse_avx2.c:loadu_8bit_16x8
Unexecuted instantiation: post_proc_sse2.c:loadu_8bit_16x8
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:loadu_8bit_16x8
Unexecuted instantiation: loopfilter_sse2.c:loadu_8bit_16x8
Unexecuted instantiation: sum_squares_sse2.c:loadu_8bit_16x8
Unexecuted instantiation: avg_pred_sse2.c:loadu_8bit_16x8
101
102
0
static INLINE void _mm_storeh_epi64(__m128i *const d, const __m128i s) {
103
0
  _mm_storeh_pi((__m64 *)d, _mm_castsi128_ps(s));
104
0
}
Unexecuted instantiation: variance_sse2.c:_mm_storeh_epi64
Unexecuted instantiation: bilinear_filter_sse2.c:_mm_storeh_epi64
Unexecuted instantiation: vp9_frame_scale_ssse3.c:_mm_storeh_epi64
Unexecuted instantiation: sse_sse4.c:_mm_storeh_epi64
Unexecuted instantiation: sse_avx2.c:_mm_storeh_epi64
Unexecuted instantiation: post_proc_sse2.c:_mm_storeh_epi64
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:_mm_storeh_epi64
Unexecuted instantiation: loopfilter_sse2.c:_mm_storeh_epi64
Unexecuted instantiation: sum_squares_sse2.c:_mm_storeh_epi64
Unexecuted instantiation: avg_pred_sse2.c:_mm_storeh_epi64
105
106
static INLINE void store_8bit_4x4(const __m128i *const s, uint8_t *const d,
107
0
                                  const ptrdiff_t stride) {
108
0
  *(int *)(d + 0 * stride) = _mm_cvtsi128_si32(s[0]);
109
0
  *(int *)(d + 1 * stride) = _mm_cvtsi128_si32(s[1]);
110
0
  *(int *)(d + 2 * stride) = _mm_cvtsi128_si32(s[2]);
111
0
  *(int *)(d + 3 * stride) = _mm_cvtsi128_si32(s[3]);
112
0
}
Unexecuted instantiation: variance_sse2.c:store_8bit_4x4
Unexecuted instantiation: bilinear_filter_sse2.c:store_8bit_4x4
Unexecuted instantiation: vp9_frame_scale_ssse3.c:store_8bit_4x4
Unexecuted instantiation: sse_sse4.c:store_8bit_4x4
Unexecuted instantiation: sse_avx2.c:store_8bit_4x4
Unexecuted instantiation: post_proc_sse2.c:store_8bit_4x4
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:store_8bit_4x4
Unexecuted instantiation: loopfilter_sse2.c:store_8bit_4x4
Unexecuted instantiation: sum_squares_sse2.c:store_8bit_4x4
Unexecuted instantiation: avg_pred_sse2.c:store_8bit_4x4
113
114
static INLINE void store_8bit_4x4_sse2(const __m128i s, uint8_t *const d,
115
0
                                       const ptrdiff_t stride) {
116
0
  __m128i ss[4];
117
118
0
  ss[0] = s;
119
0
  ss[1] = _mm_srli_si128(s, 4);
120
0
  ss[2] = _mm_srli_si128(s, 8);
121
0
  ss[3] = _mm_srli_si128(s, 12);
122
0
  store_8bit_4x4(ss, d, stride);
123
0
}
Unexecuted instantiation: variance_sse2.c:store_8bit_4x4_sse2
Unexecuted instantiation: bilinear_filter_sse2.c:store_8bit_4x4_sse2
Unexecuted instantiation: vp9_frame_scale_ssse3.c:store_8bit_4x4_sse2
Unexecuted instantiation: sse_sse4.c:store_8bit_4x4_sse2
Unexecuted instantiation: sse_avx2.c:store_8bit_4x4_sse2
Unexecuted instantiation: post_proc_sse2.c:store_8bit_4x4_sse2
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:store_8bit_4x4_sse2
Unexecuted instantiation: loopfilter_sse2.c:store_8bit_4x4_sse2
Unexecuted instantiation: sum_squares_sse2.c:store_8bit_4x4_sse2
Unexecuted instantiation: avg_pred_sse2.c:store_8bit_4x4_sse2
124
125
static INLINE void store_8bit_8x4_from_16x2(const __m128i *const s,
126
                                            uint8_t *const d,
127
0
                                            const ptrdiff_t stride) {
128
0
  _mm_storel_epi64((__m128i *)(d + 0 * stride), s[0]);
129
0
  _mm_storeh_epi64((__m128i *)(d + 1 * stride), s[0]);
130
0
  _mm_storel_epi64((__m128i *)(d + 2 * stride), s[1]);
131
0
  _mm_storeh_epi64((__m128i *)(d + 3 * stride), s[1]);
132
0
}
Unexecuted instantiation: variance_sse2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: bilinear_filter_sse2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: vp9_frame_scale_ssse3.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: sse_sse4.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: sse_avx2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: post_proc_sse2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: loopfilter_sse2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: sum_squares_sse2.c:store_8bit_8x4_from_16x2
Unexecuted instantiation: avg_pred_sse2.c:store_8bit_8x4_from_16x2
133
134
static INLINE void store_8bit_8x8(const __m128i *const s, uint8_t *const d,
135
0
                                  const ptrdiff_t stride) {
136
0
  _mm_storel_epi64((__m128i *)(d + 0 * stride), s[0]);
137
0
  _mm_storel_epi64((__m128i *)(d + 1 * stride), s[1]);
138
0
  _mm_storel_epi64((__m128i *)(d + 2 * stride), s[2]);
139
0
  _mm_storel_epi64((__m128i *)(d + 3 * stride), s[3]);
140
0
  _mm_storel_epi64((__m128i *)(d + 4 * stride), s[4]);
141
0
  _mm_storel_epi64((__m128i *)(d + 5 * stride), s[5]);
142
0
  _mm_storel_epi64((__m128i *)(d + 6 * stride), s[6]);
143
0
  _mm_storel_epi64((__m128i *)(d + 7 * stride), s[7]);
144
0
}
Unexecuted instantiation: variance_sse2.c:store_8bit_8x8
Unexecuted instantiation: bilinear_filter_sse2.c:store_8bit_8x8
Unexecuted instantiation: vp9_frame_scale_ssse3.c:store_8bit_8x8
Unexecuted instantiation: sse_sse4.c:store_8bit_8x8
Unexecuted instantiation: sse_avx2.c:store_8bit_8x8
Unexecuted instantiation: post_proc_sse2.c:store_8bit_8x8
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:store_8bit_8x8
Unexecuted instantiation: loopfilter_sse2.c:store_8bit_8x8
Unexecuted instantiation: sum_squares_sse2.c:store_8bit_8x8
Unexecuted instantiation: avg_pred_sse2.c:store_8bit_8x8
145
146
static INLINE void storeu_8bit_16x4(const __m128i *const s, uint8_t *const d,
147
0
                                    const ptrdiff_t stride) {
148
0
  _mm_storeu_si128((__m128i *)(d + 0 * stride), s[0]);
149
0
  _mm_storeu_si128((__m128i *)(d + 1 * stride), s[1]);
150
0
  _mm_storeu_si128((__m128i *)(d + 2 * stride), s[2]);
151
0
  _mm_storeu_si128((__m128i *)(d + 3 * stride), s[3]);
152
0
}
Unexecuted instantiation: variance_sse2.c:storeu_8bit_16x4
Unexecuted instantiation: bilinear_filter_sse2.c:storeu_8bit_16x4
Unexecuted instantiation: vp9_frame_scale_ssse3.c:storeu_8bit_16x4
Unexecuted instantiation: sse_sse4.c:storeu_8bit_16x4
Unexecuted instantiation: sse_avx2.c:storeu_8bit_16x4
Unexecuted instantiation: post_proc_sse2.c:storeu_8bit_16x4
Unexecuted instantiation: vpx_subpixel_8t_intrin_ssse3.c:storeu_8bit_16x4
Unexecuted instantiation: loopfilter_sse2.c:storeu_8bit_16x4
Unexecuted instantiation: sum_squares_sse2.c:storeu_8bit_16x4
Unexecuted instantiation: avg_pred_sse2.c:storeu_8bit_16x4
153
154
#endif  // VPX_VPX_DSP_X86_MEM_SSE2_H_