Coverage Report

Created: 2026-10-17 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/avm/avm_dsp/x86/convolve_sse4_1.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2021, Alliance for Open Media. All rights reserved
3
 *
4
 * This source code is subject to the terms of the BSD 3-Clause Clear License
5
 * and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
6
 * License was not distributed with this source code in the LICENSE file, you
7
 * can obtain it at aomedia.org/license/software-license/bsd-3-c-c/.  If the
8
 * Alliance for Open Media Patent License 1.0 was not distributed with this
9
 * source code in the PATENTS file, you can obtain it at
10
 * aomedia.org/license/patent-license/.
11
 */
12
13
#ifndef AVM_AVM_DSP_X86_CONVOLVE_SSE4_1_H_
14
#define AVM_AVM_DSP_X86_CONVOLVE_SSE4_1_H_
15
16
// Note:
17
//  This header file should be put below any x86 intrinsics head file
18
19
void av2_ext_highbd_warp_horiz_sse4_1(const uint16_t *ref, __m128i *tmp,
20
                                      int stride, int32_t ix4, int32_t iy4,
21
                                      int32_t offset, int height, int width,
22
                                      int bd, const int offset_bits_horiz,
23
                                      const int reduce_bits_horiz);
24
25
static INLINE void mult_add_store(CONV_BUF_TYPE *const dst,
26
                                  const __m128i *const res,
27
                                  const __m128i *const wt0,
28
                                  const __m128i *const wt1,
29
0
                                  const int do_average) {
30
0
  __m128i d;
31
0
  if (do_average) {
32
0
    d = _mm_loadu_si128((__m128i *)dst);
33
0
    d = _mm_add_epi32(_mm_mullo_epi32(d, *wt0), _mm_mullo_epi32(*res, *wt1));
34
0
    d = _mm_srai_epi32(d, DIST_PRECISION_BITS);
35
0
  } else {
36
0
    d = *res;
37
0
  }
38
0
  _mm_store_si128((__m128i *)dst, d);
39
0
}
Unexecuted instantiation: highbd_convolve_2d_sse4.c:mult_add_store
Unexecuted instantiation: highbd_jnt_convolve_sse4.c:mult_add_store
Unexecuted instantiation: highbd_jnt_convolve_avx2.c:mult_add_store
Unexecuted instantiation: highbd_warp_affine_avx2.c:mult_add_store
40
41
static INLINE __m128i highbd_comp_avg_sse4_1(const __m128i *const data_ref_0,
42
                                             const __m128i *const res_unsigned,
43
                                             const __m128i *const wt0,
44
                                             const __m128i *const wt1,
45
0
                                             const int use_dist_wtd_avg) {
46
0
  __m128i res;
47
0
  if (use_dist_wtd_avg) {
48
0
    const __m128i wt0_res = _mm_mullo_epi32(*data_ref_0, *wt0);
49
0
    const __m128i wt1_res = _mm_mullo_epi32(*res_unsigned, *wt1);
50
51
0
    const __m128i wt_res = _mm_add_epi32(wt0_res, wt1_res);
52
0
    res = _mm_srai_epi32(wt_res, DIST_PRECISION_BITS);
53
0
  } else {
54
0
    const __m128i wt_res = _mm_add_epi32(*data_ref_0, *res_unsigned);
55
0
    res = _mm_srai_epi32(wt_res, 1);
56
0
  }
57
0
  return res;
58
0
}
Unexecuted instantiation: highbd_convolve_2d_sse4.c:highbd_comp_avg_sse4_1
Unexecuted instantiation: highbd_jnt_convolve_sse4.c:highbd_comp_avg_sse4_1
Unexecuted instantiation: highbd_jnt_convolve_avx2.c:highbd_comp_avg_sse4_1
Unexecuted instantiation: highbd_warp_affine_avx2.c:highbd_comp_avg_sse4_1
59
60
#endif  // AVM_AVM_DSP_X86_CONVOLVE_SSE4_1_H_