Coverage Report

Created: 2023-06-07 06:31

/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
1.98M
static INLINE __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
1.98M
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
1.98M
  const __m128i zero = _mm_setzero_si128();
22
1.98M
  x = _mm_sad_epu8(x, zero);
23
1.98M
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
1.98M
  return _mm_add_epi16(x, high);
25
1.98M
}
intrapred_sse2.c:dc_sum_16_sse2
Line
Count
Source
19
1.75M
static INLINE __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
1.75M
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
1.75M
  const __m128i zero = _mm_setzero_si128();
22
1.75M
  x = _mm_sad_epu8(x, zero);
23
1.75M
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
1.75M
  return _mm_add_epi16(x, high);
25
1.75M
}
Unexecuted instantiation: intrapred_sse4.c:dc_sum_16_sse2
intrapred_avx2.c:dc_sum_16_sse2
Line
Count
Source
19
222k
static INLINE __m128i dc_sum_16_sse2(const uint8_t *ref) {
20
222k
  __m128i x = _mm_load_si128((__m128i const *)ref);
21
222k
  const __m128i zero = _mm_setzero_si128();
22
222k
  x = _mm_sad_epu8(x, zero);
23
222k
  const __m128i high = _mm_unpackhi_epi64(x, x);
24
222k
  return _mm_add_epi16(x, high);
25
222k
}
26
27
874k
static INLINE __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
874k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
874k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
874k
  const __m128i zero = _mm_setzero_si128();
31
874k
  x0 = _mm_sad_epu8(x0, zero);
32
874k
  x1 = _mm_sad_epu8(x1, zero);
33
874k
  x0 = _mm_add_epi16(x0, x1);
34
874k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
874k
  return _mm_add_epi16(x0, high);
36
874k
}
intrapred_sse2.c:dc_sum_32_sse2
Line
Count
Source
27
734k
static INLINE __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
734k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
734k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
734k
  const __m128i zero = _mm_setzero_si128();
31
734k
  x0 = _mm_sad_epu8(x0, zero);
32
734k
  x1 = _mm_sad_epu8(x1, zero);
33
734k
  x0 = _mm_add_epi16(x0, x1);
34
734k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
734k
  return _mm_add_epi16(x0, high);
36
734k
}
Unexecuted instantiation: intrapred_sse4.c:dc_sum_32_sse2
intrapred_avx2.c:dc_sum_32_sse2
Line
Count
Source
27
140k
static INLINE __m128i dc_sum_32_sse2(const uint8_t *ref) {
28
140k
  __m128i x0 = _mm_load_si128((__m128i const *)ref);
29
140k
  __m128i x1 = _mm_load_si128((__m128i const *)(ref + 16));
30
140k
  const __m128i zero = _mm_setzero_si128();
31
140k
  x0 = _mm_sad_epu8(x0, zero);
32
140k
  x1 = _mm_sad_epu8(x1, zero);
33
140k
  x0 = _mm_add_epi16(x0, x1);
34
140k
  const __m128i high = _mm_unpackhi_epi64(x0, x0);
35
140k
  return _mm_add_epi16(x0, high);
36
140k
}
37
38
#endif  // AOM_AOM_DSP_X86_INTRAPRED_X86_H_