/src/libvpx/vpx_dsp/x86/bitdepth_conversion_avx2.h
Line | Count | Source |
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_AVX2_H_ |
11 | | #define VPX_VPX_DSP_X86_BITDEPTH_CONVERSION_AVX2_H_ |
12 | | |
13 | | #include <immintrin.h> |
14 | | |
15 | | #include "./vpx_config.h" |
16 | | #include "vpx/vpx_integer.h" |
17 | | #include "vpx_dsp/vpx_dsp_common.h" |
18 | | |
19 | | // Load 16 16 bit values. If the source is 32 bits then pack down with |
20 | | // saturation. |
21 | 1.01G | static INLINE __m256i load_tran_low(const tran_low_t *a) { |
22 | 1.01G | #if CONFIG_VP9_HIGHBITDEPTH |
23 | 1.01G | const __m256i a_low = _mm256_loadu_si256((const __m256i *)a); |
24 | 1.01G | const __m256i a_high = _mm256_loadu_si256((const __m256i *)(a + 8)); |
25 | 1.01G | return _mm256_packs_epi32(a_low, a_high); |
26 | | #else |
27 | | return _mm256_loadu_si256((const __m256i *)a); |
28 | | #endif |
29 | 1.01G | } avg_intrin_avx2.c:load_tran_low Line | Count | Source | 21 | 130M | static INLINE __m256i load_tran_low(const tran_low_t *a) { | 22 | 130M | #if CONFIG_VP9_HIGHBITDEPTH | 23 | 130M | const __m256i a_low = _mm256_loadu_si256((const __m256i *)a); | 24 | 130M | const __m256i a_high = _mm256_loadu_si256((const __m256i *)(a + 8)); | 25 | 130M | return _mm256_packs_epi32(a_low, a_high); | 26 | | #else | 27 | | return _mm256_loadu_si256((const __m256i *)a); | 28 | | #endif | 29 | 130M | } |
vp9_quantize_avx2.c:load_tran_low Line | Count | Source | 21 | 171M | static INLINE __m256i load_tran_low(const tran_low_t *a) { | 22 | 171M | #if CONFIG_VP9_HIGHBITDEPTH | 23 | 171M | const __m256i a_low = _mm256_loadu_si256((const __m256i *)a); | 24 | 171M | const __m256i a_high = _mm256_loadu_si256((const __m256i *)(a + 8)); | 25 | 171M | return _mm256_packs_epi32(a_low, a_high); | 26 | | #else | 27 | | return _mm256_loadu_si256((const __m256i *)a); | 28 | | #endif | 29 | 171M | } |
vp9_error_avx2.c:load_tran_low Line | Count | Source | 21 | 708M | static INLINE __m256i load_tran_low(const tran_low_t *a) { | 22 | 708M | #if CONFIG_VP9_HIGHBITDEPTH | 23 | 708M | const __m256i a_low = _mm256_loadu_si256((const __m256i *)a); | 24 | 708M | const __m256i a_high = _mm256_loadu_si256((const __m256i *)(a + 8)); | 25 | 708M | return _mm256_packs_epi32(a_low, a_high); | 26 | | #else | 27 | | return _mm256_loadu_si256((const __m256i *)a); | 28 | | #endif | 29 | 708M | } |
|
30 | | |
31 | 268M | static INLINE void store_tran_low(__m256i a, tran_low_t *b) { |
32 | 268M | #if CONFIG_VP9_HIGHBITDEPTH |
33 | 268M | const __m256i one = _mm256_set1_epi16(1); |
34 | 268M | const __m256i a_hi = _mm256_mulhi_epi16(a, one); |
35 | 268M | const __m256i a_lo = _mm256_mullo_epi16(a, one); |
36 | 268M | const __m256i a_1 = _mm256_unpacklo_epi16(a_lo, a_hi); |
37 | 268M | const __m256i a_2 = _mm256_unpackhi_epi16(a_lo, a_hi); |
38 | 268M | _mm256_storeu_si256((__m256i *)b, a_1); |
39 | 268M | _mm256_storeu_si256((__m256i *)(b + 8), a_2); |
40 | | #else |
41 | | _mm256_storeu_si256((__m256i *)b, a); |
42 | | #endif |
43 | 268M | } avg_intrin_avx2.c:store_tran_low Line | Count | Source | 31 | 7.58M | static INLINE void store_tran_low(__m256i a, tran_low_t *b) { | 32 | 7.58M | #if CONFIG_VP9_HIGHBITDEPTH | 33 | 7.58M | const __m256i one = _mm256_set1_epi16(1); | 34 | 7.58M | const __m256i a_hi = _mm256_mulhi_epi16(a, one); | 35 | 7.58M | const __m256i a_lo = _mm256_mullo_epi16(a, one); | 36 | 7.58M | const __m256i a_1 = _mm256_unpacklo_epi16(a_lo, a_hi); | 37 | 7.58M | const __m256i a_2 = _mm256_unpackhi_epi16(a_lo, a_hi); | 38 | 7.58M | _mm256_storeu_si256((__m256i *)b, a_1); | 39 | 7.58M | _mm256_storeu_si256((__m256i *)(b + 8), a_2); | 40 | | #else | 41 | | _mm256_storeu_si256((__m256i *)b, a); | 42 | | #endif | 43 | 7.58M | } |
vp9_quantize_avx2.c:store_tran_low Line | Count | Source | 31 | 261M | static INLINE void store_tran_low(__m256i a, tran_low_t *b) { | 32 | 261M | #if CONFIG_VP9_HIGHBITDEPTH | 33 | 261M | const __m256i one = _mm256_set1_epi16(1); | 34 | 261M | const __m256i a_hi = _mm256_mulhi_epi16(a, one); | 35 | 261M | const __m256i a_lo = _mm256_mullo_epi16(a, one); | 36 | 261M | const __m256i a_1 = _mm256_unpacklo_epi16(a_lo, a_hi); | 37 | 261M | const __m256i a_2 = _mm256_unpackhi_epi16(a_lo, a_hi); | 38 | 261M | _mm256_storeu_si256((__m256i *)b, a_1); | 39 | 261M | _mm256_storeu_si256((__m256i *)(b + 8), a_2); | 40 | | #else | 41 | | _mm256_storeu_si256((__m256i *)b, a); | 42 | | #endif | 43 | 261M | } |
Unexecuted instantiation: vp9_error_avx2.c:store_tran_low |
44 | | #endif // VPX_VPX_DSP_X86_BITDEPTH_CONVERSION_AVX2_H_ |