diff options
author | Johann <johann.koenig@duck.com> | 2018-11-21 13:30:45 -0500 |
---|---|---|
committer | Johann <johann.koenig@duck.com> | 2018-11-28 11:30:02 -0500 |
commit | 0eeb7975128997b3f978d3a6c81d6e25b4d4a8c9 (patch) | |
tree | 83a6f15223237a55e0f0a093332cf6855aca5cf7 /vpx_dsp/x86/quantize_sse2.c | |
parent | 615922dfb53103aa3d1620790b97d2ba3b4c76ad (diff) | |
download | libvpx-0eeb7975128997b3f978d3a6c81d6e25b4d4a8c9.tar libvpx-0eeb7975128997b3f978d3a6c81d6e25b4d4a8c9.tar.gz libvpx-0eeb7975128997b3f978d3a6c81d6e25b4d4a8c9.tar.bz2 libvpx-0eeb7975128997b3f978d3a6c81d6e25b4d4a8c9.zip |
quantize: fix x86 hbd builds
Calculate the high bits of dqcoeff in high bit depth builds and store
them appropriately.
BUG=webm:1448
Change-Id: I61a2f8bfcf2e30765f10a94073c4d58321d2fa24
Diffstat (limited to 'vpx_dsp/x86/quantize_sse2.c')
-rw-r--r-- | vpx_dsp/x86/quantize_sse2.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/vpx_dsp/x86/quantize_sse2.c b/vpx_dsp/x86/quantize_sse2.c index fa098a3a0..e38a4059a 100644 --- a/vpx_dsp/x86/quantize_sse2.c +++ b/vpx_dsp/x86/quantize_sse2.c @@ -74,14 +74,11 @@ void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, store_tran_low(qcoeff0, qcoeff_ptr); store_tran_low(qcoeff1, qcoeff_ptr + 8); - coeff0 = calculate_dqcoeff(qcoeff0, dequant); + calculate_dqcoeff_and_store(qcoeff0, dequant, dqcoeff_ptr); dequant = _mm_unpackhi_epi64(dequant, dequant); - coeff1 = calculate_dqcoeff(qcoeff1, dequant); + calculate_dqcoeff_and_store(qcoeff1, dequant, dqcoeff_ptr + 8); - store_tran_low(coeff0, dqcoeff_ptr); - store_tran_low(coeff1, dqcoeff_ptr + 8); - - eob = scan_for_eob(&coeff0, &coeff1, cmp_mask0, cmp_mask1, iscan, 0, zero); + eob = scan_for_eob(&qcoeff0, &qcoeff1, cmp_mask0, cmp_mask1, iscan, 0, zero); // AC only loop. while (index < n_coeffs) { @@ -108,13 +105,10 @@ void vpx_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, store_tran_low(qcoeff0, qcoeff_ptr + index); store_tran_low(qcoeff1, qcoeff_ptr + index + 8); - coeff0 = calculate_dqcoeff(qcoeff0, dequant); - coeff1 = calculate_dqcoeff(qcoeff1, dequant); - - store_tran_low(coeff0, dqcoeff_ptr + index); - store_tran_low(coeff1, dqcoeff_ptr + index + 8); + calculate_dqcoeff_and_store(qcoeff0, dequant, dqcoeff_ptr + index); + calculate_dqcoeff_and_store(qcoeff1, dequant, dqcoeff_ptr + index + 8); - eob0 = scan_for_eob(&coeff0, &coeff1, cmp_mask0, cmp_mask1, iscan, index, + eob0 = scan_for_eob(&qcoeff0, &qcoeff1, cmp_mask0, cmp_mask1, iscan, index, zero); eob = _mm_max_epi16(eob, eob0); |