Coverage Report

Created: 2024-09-06 07:53

/src/libvpx/vpx_dsp/x86/bitdepth_conversion_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
#ifndef VPX_VPX_DSP_X86_BITDEPTH_CONVERSION_SSE2_H_
11
#define VPX_VPX_DSP_X86_BITDEPTH_CONVERSION_SSE2_H_
12
13
#include <xmmintrin.h>
14
15
#include "./vpx_config.h"
16
#include "vpx/vpx_integer.h"
17
#include "vpx_dsp/vpx_dsp_common.h"
18
19
// Load 8 16 bit values. If the source is 32 bits then pack down with
20
// saturation.
21
0
static INLINE __m128i load_tran_low(const tran_low_t *a) {
22
0
#if CONFIG_VP9_HIGHBITDEPTH
23
0
  const __m128i a_low = _mm_load_si128((const __m128i *)a);
24
0
  return _mm_packs_epi32(a_low, *(const __m128i *)(a + 4));
25
#else
26
  return _mm_load_si128((const __m128i *)a);
27
#endif
28
0
}
Unexecuted instantiation: avg_intrin_sse2.c:load_tran_low
Unexecuted instantiation: vp9_quantize_sse2.c:load_tran_low
Unexecuted instantiation: vp9_quantize_ssse3.c:load_tran_low
Unexecuted instantiation: vp9_dct_intrin_sse2.c:load_tran_low
Unexecuted instantiation: quantize_sse2.c:load_tran_low
Unexecuted instantiation: quantize_ssse3.c:load_tran_low
Unexecuted instantiation: quantize_avx.c:load_tran_low
29
30
// Store 8 16 bit values. If the destination is 32 bits then sign extend the
31
// values by multiplying by 1.
32
0
static INLINE void store_tran_low(__m128i a, tran_low_t *b) {
33
0
#if CONFIG_VP9_HIGHBITDEPTH
34
0
  const __m128i one = _mm_set1_epi16(1);
35
0
  const __m128i a_hi = _mm_mulhi_epi16(a, one);
36
0
  const __m128i a_lo = _mm_mullo_epi16(a, one);
37
0
  const __m128i a_1 = _mm_unpacklo_epi16(a_lo, a_hi);
38
0
  const __m128i a_2 = _mm_unpackhi_epi16(a_lo, a_hi);
39
0
  _mm_store_si128((__m128i *)(b), a_1);
40
0
  _mm_store_si128((__m128i *)(b + 4), a_2);
41
#else
42
  _mm_store_si128((__m128i *)(b), a);
43
#endif
44
0
}
Unexecuted instantiation: avg_intrin_sse2.c:store_tran_low
Unexecuted instantiation: vp9_quantize_sse2.c:store_tran_low
Unexecuted instantiation: vp9_quantize_ssse3.c:store_tran_low
Unexecuted instantiation: vp9_dct_intrin_sse2.c:store_tran_low
Unexecuted instantiation: quantize_sse2.c:store_tran_low
Unexecuted instantiation: quantize_ssse3.c:store_tran_low
Unexecuted instantiation: quantize_avx.c:store_tran_low
45
46
// Zero fill 8 positions in the output buffer.
47
0
static INLINE void store_zero_tran_low(tran_low_t *a) {
48
0
  const __m128i zero = _mm_setzero_si128();
49
0
#if CONFIG_VP9_HIGHBITDEPTH
50
0
  _mm_store_si128((__m128i *)(a), zero);
51
0
  _mm_store_si128((__m128i *)(a + 4), zero);
52
#else
53
  _mm_store_si128((__m128i *)(a), zero);
54
#endif
55
0
}
Unexecuted instantiation: avg_intrin_sse2.c:store_zero_tran_low
Unexecuted instantiation: vp9_quantize_sse2.c:store_zero_tran_low
Unexecuted instantiation: vp9_quantize_ssse3.c:store_zero_tran_low
Unexecuted instantiation: vp9_dct_intrin_sse2.c:store_zero_tran_low
Unexecuted instantiation: quantize_sse2.c:store_zero_tran_low
Unexecuted instantiation: quantize_ssse3.c:store_zero_tran_low
Unexecuted instantiation: quantize_avx.c:store_zero_tran_low
56
#endif  // VPX_VPX_DSP_X86_BITDEPTH_CONVERSION_SSE2_H_