summaryrefslogtreecommitdiff
path: root/vpx_dsp/x86
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-09-08 01:05:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-09-08 01:05:18 +0000
commit4b0e78bfdaccc969fa7d524bd635e403dad68650 (patch)
treeb562124122ab3e50487bfb03e543ca18c7704a58 /vpx_dsp/x86
parentbcbc4761fa72117be4ba32889ea79fca94c21956 (diff)
parent309125b1e71ac2dec8fe2a97f76fd9b6e8fe55d6 (diff)
downloadlibvpx-4b0e78bfdaccc969fa7d524bd635e403dad68650.tar
libvpx-4b0e78bfdaccc969fa7d524bd635e403dad68650.tar.gz
libvpx-4b0e78bfdaccc969fa7d524bd635e403dad68650.tar.bz2
libvpx-4b0e78bfdaccc969fa7d524bd635e403dad68650.zip
Merge "vpx_dsp: added vpx_highbd_idct32x32_1_add_sse2()"
Diffstat (limited to 'vpx_dsp/x86')
-rw-r--r--vpx_dsp/x86/inv_txfm_sse2.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/vpx_dsp/x86/inv_txfm_sse2.c b/vpx_dsp/x86/inv_txfm_sse2.c
index a6fc1161f..330ae8d6a 100644
--- a/vpx_dsp/x86/inv_txfm_sse2.c
+++ b/vpx_dsp/x86/inv_txfm_sse2.c
@@ -4020,4 +4020,32 @@ void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8,
}
}
}
+
+void vpx_highbd_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest8,
+ int stride, int bd) {
+ __m128i dc_value, d;
+ const __m128i zero = _mm_setzero_si128();
+ const __m128i one = _mm_set1_epi16(1);
+ const __m128i max = _mm_subs_epi16(_mm_slli_epi16(one, bd), one);
+ int a, i, j;
+ uint16_t *dest = CONVERT_TO_SHORTPTR(dest8);
+ tran_low_t out;
+
+ out = highbd_dct_const_round_shift(input[0] * cospi_16_64);
+ out = highbd_dct_const_round_shift(out * cospi_16_64);
+ a = ROUND_POWER_OF_TWO(out, 6);
+
+ d = _mm_set1_epi32(a);
+ dc_value = _mm_packs_epi32(d, d);
+ for (i = 0; i < 32; ++i) {
+ for (j = 0; j < 4; ++j) {
+ d = _mm_loadu_si128((const __m128i *)(&dest[j * 8]));
+ d = _mm_adds_epi16(d, dc_value);
+ d = _mm_max_epi16(d, zero);
+ d = _mm_min_epi16(d, max);
+ _mm_storeu_si128((__m128i *)(&dest[j * 8]), d);
+ }
+ dest += stride;
+ }
+}
#endif // CONFIG_VP9_HIGHBITDEPTH