OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <emmintrin.h> | 11 #include <emmintrin.h> |
12 | 12 |
13 #include "vpx_dsp/vpx_dsp_common.h" | 13 #include "vpx_dsp/vpx_dsp_common.h" |
14 #include "vpx_mem/vpx_mem.h" | 14 #include "vpx_mem/vpx_mem.h" |
15 #include "vpx_ports/mem.h" | 15 #include "vpx_ports/mem.h" |
16 | 16 |
17 #if CONFIG_VP9_HIGHBITDEPTH | 17 #if CONFIG_VP9_HIGHBITDEPTH |
18 void vp9_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, | 18 void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, |
19 intptr_t count, | 19 intptr_t count, |
20 int skip_block, | 20 int skip_block, |
21 const int16_t *zbin_ptr, | 21 const int16_t *zbin_ptr, |
22 const int16_t *round_ptr, | 22 const int16_t *round_ptr, |
23 const int16_t *quant_ptr, | 23 const int16_t *quant_ptr, |
24 const int16_t *quant_shift_ptr, | 24 const int16_t *quant_shift_ptr, |
25 tran_low_t *qcoeff_ptr, | 25 tran_low_t *qcoeff_ptr, |
26 tran_low_t *dqcoeff_ptr, | 26 tran_low_t *dqcoeff_ptr, |
27 const int16_t *dequant_ptr, | 27 const int16_t *dequant_ptr, |
28 uint16_t *eob_ptr, | 28 uint16_t *eob_ptr, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 if (abs_qcoeff) | 94 if (abs_qcoeff) |
95 eob_i = iscan[k] > eob_i ? iscan[k] : eob_i; | 95 eob_i = iscan[k] > eob_i ? iscan[k] : eob_i; |
96 } | 96 } |
97 } | 97 } |
98 } | 98 } |
99 } | 99 } |
100 *eob_ptr = eob_i + 1; | 100 *eob_ptr = eob_i + 1; |
101 } | 101 } |
102 | 102 |
103 | 103 |
104 void vp9_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, | 104 void vpx_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr, |
105 intptr_t n_coeffs, | 105 intptr_t n_coeffs, |
106 int skip_block, | 106 int skip_block, |
107 const int16_t *zbin_ptr, | 107 const int16_t *zbin_ptr, |
108 const int16_t *round_ptr, | 108 const int16_t *round_ptr, |
109 const int16_t *quant_ptr, | 109 const int16_t *quant_ptr, |
110 const int16_t *quant_shift_ptr, | 110 const int16_t *quant_shift_ptr, |
111 tran_low_t *qcoeff_ptr, | 111 tran_low_t *qcoeff_ptr, |
112 tran_low_t *dqcoeff_ptr, | 112 tran_low_t *dqcoeff_ptr, |
113 const int16_t *dequant_ptr, | 113 const int16_t *dequant_ptr, |
114 uint16_t *eob_ptr, | 114 uint16_t *eob_ptr, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 (uint32_t)((tmp2 * quant_shift_ptr[rc != 0]) >> 15); | 170 (uint32_t)((tmp2 * quant_shift_ptr[rc != 0]) >> 15); |
171 qcoeff_ptr[rc] = (int)(abs_qcoeff ^ coeff_sign) - coeff_sign; | 171 qcoeff_ptr[rc] = (int)(abs_qcoeff ^ coeff_sign) - coeff_sign; |
172 dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0] / 2; | 172 dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0] / 2; |
173 if (abs_qcoeff) | 173 if (abs_qcoeff) |
174 eob = iscan[idx_arr[i]] > eob ? iscan[idx_arr[i]] : eob; | 174 eob = iscan[idx_arr[i]] > eob ? iscan[idx_arr[i]] : eob; |
175 } | 175 } |
176 } | 176 } |
177 *eob_ptr = eob + 1; | 177 *eob_ptr = eob + 1; |
178 } | 178 } |
179 #endif | 179 #endif |
OLD | NEW |