Coverage Report

Created: 2026-03-08 06:51

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/aom/aom_dsp/x86/intrapred_x86.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2020, Alliance for Open Media. All rights reserved.
3
 *
4
 * This source code is subject to the terms of the BSD 2 Clause License and
5
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6
 * was not distributed with this source code in the LICENSE file, you can
7
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8
 * Media Patent License 1.0 was not distributed with this source code in the
9
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10
 */
11
12
#ifndef AOM_AOM_DSP_X86_INTRAPRED_X86_H_
13
#define AOM_AOM_DSP_X86_INTRAPRED_X86_H_
14
15
#include <emmintrin.h>  // SSE2
16
#include "aom/aom_integer.h"
17
#include "config/aom_config.h"
18
19
2.20M
static inline __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
2.20M
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
2.20M
  const __m128i zero = _mm_setzero_si128();
22
2.20M
  x = _mm_sad_epu8(x, zero);
23
2.20M
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
2.20M
  return _mm_add_epi16(x, high);
25
2.20M
}
intrapred_sse2.c:dc_sum_16_sse2
Line
Count
Source
19
2.01M
static inline __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
2.01M
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
2.01M
  const __m128i zero = _mm_setzero_si128();
22
2.01M
  x = _mm_sad_epu8(x, zero);
23
2.01M
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
2.01M
  return _mm_add_epi16(x, high);
25
2.01M
}
Unexecuted instantiation: intrapred_sse4.c:dc_sum_16_sse2
intrapred_avx2.c:dc_sum_16_sse2
Line
Count
Source
19
188k
static inline __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
188k
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
188k
  const __m128i zero = _mm_setzero_si128();
22
188k
  x = _mm_sad_epu8(x, zero);
23
188k
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
188k
  return _mm_add_epi16(x, high);
25
188k
}
26
27
759k
static inline __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
759k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
759k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
759k
  const __m128i zero = _mm_setzero_si128();
31
759k
  x0 = _mm_sad_epu8(x0, zero);
32
759k
  x1 = _mm_sad_epu8(x1, zero);
33
759k
  x0 = _mm_add_epi16(x0, x1);
34
759k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
759k
  return _mm_add_epi16(x0, high);
36
759k
}
intrapred_sse2.c:dc_sum_32_sse2
Line
Count
Source
27
626k
static inline __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
626k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
626k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
626k
  const __m128i zero = _mm_setzero_si128();
31
626k
  x0 = _mm_sad_epu8(x0, zero);
32
626k
  x1 = _mm_sad_epu8(x1, zero);
33
626k
  x0 = _mm_add_epi16(x0, x1);
34
626k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
626k
  return _mm_add_epi16(x0, high);
36
626k
}
Unexecuted instantiation: intrapred_sse4.c:dc_sum_32_sse2
intrapred_avx2.c:dc_sum_32_sse2
Line
Count
Source
27
132k
static inline __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
132k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
132k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
132k
  const __m128i zero = _mm_setzero_si128();
31
132k
  x0 = _mm_sad_epu8(x0, zero);
32
132k
  x1 = _mm_sad_epu8(x1, zero);
33
132k
  x0 = _mm_add_epi16(x0, x1);
34
132k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
132k
  return _mm_add_epi16(x0, high);
36
132k
}
37
38
#endif  // AOM_AOM_DSP_X86_INTRAPRED_X86_H_