Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: source/libvpx/vp9/encoder/arm/neon/vp9_quantize_neon.c

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_reader.h ('k') | source/libvpx/vp9/encoder/vp9_aq_complexity.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 <arm_neon.h> 11 #include <arm_neon.h>
12 12
13 #include <math.h> 13 #include <math.h>
14 14
15 #include "vpx_mem/vpx_mem.h" 15 #include "vpx_mem/vpx_mem.h"
16 16
17 #include "vp9/common/vp9_quant_common.h" 17 #include "vp9/common/vp9_quant_common.h"
18 #include "vp9/common/vp9_seg_common.h" 18 #include "vp9/common/vp9_seg_common.h"
19 19
20 #include "vp9/encoder/vp9_encoder.h" 20 #include "vp9/encoder/vp9_encoder.h"
21 #include "vp9/encoder/vp9_quantize.h" 21 #include "vp9/encoder/vp9_quantize.h"
22 #include "vp9/encoder/vp9_rd.h" 22 #include "vp9/encoder/vp9_rd.h"
23 23
24 void vp9_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count, 24 void vp9_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count,
25 int skip_block, const int16_t *zbin_ptr, 25 int skip_block, const int16_t *zbin_ptr,
26 const int16_t *round_ptr, const int16_t *quant_ptr, 26 const int16_t *round_ptr, const int16_t *quant_ptr,
27 const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, 27 const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr,
28 int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, 28 int16_t *dqcoeff_ptr, const int16_t *dequant_ptr,
29 int zbin_oq_value, uint16_t *eob_ptr, 29 uint16_t *eob_ptr,
30 const int16_t *scan, const int16_t *iscan) { 30 const int16_t *scan, const int16_t *iscan) {
31 // TODO(jingning) Decide the need of these arguments after the 31 // TODO(jingning) Decide the need of these arguments after the
32 // quantization process is completed. 32 // quantization process is completed.
33 (void)zbin_ptr; 33 (void)zbin_ptr;
34 (void)quant_shift_ptr; 34 (void)quant_shift_ptr;
35 (void)zbin_oq_value;
36 (void)scan; 35 (void)scan;
37 36
38 if (!skip_block) { 37 if (!skip_block) {
39 // Quantization pass: All coefficients with index >= zero_flag are 38 // Quantization pass: All coefficients with index >= zero_flag are
40 // skippable. Note: zero_flag can be zero. 39 // skippable. Note: zero_flag can be zero.
41 int i; 40 int i;
42 const int16x8_t v_zero = vdupq_n_s16(0); 41 const int16x8_t v_zero = vdupq_n_s16(0);
43 const int16x8_t v_one = vdupq_n_s16(1); 42 const int16x8_t v_one = vdupq_n_s16(1);
44 int16x8_t v_eobmax_76543210 = vdupq_n_s16(-1); 43 int16x8_t v_eobmax_76543210 = vdupq_n_s16(-1);
45 int16x8_t v_round = vmovq_n_s16(round_ptr[1]); 44 int16x8_t v_round = vmovq_n_s16(round_ptr[1]);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 vmax_s16(v_eobmax_tmp, vreinterpret_s16_s64(v_eobmax_xxx3)); 109 vmax_s16(v_eobmax_tmp, vreinterpret_s16_s64(v_eobmax_xxx3));
111 110
112 *eob_ptr = (uint16_t)vget_lane_s16(v_eobmax_final, 0); 111 *eob_ptr = (uint16_t)vget_lane_s16(v_eobmax_final, 0);
113 } 112 }
114 } else { 113 } else {
115 vpx_memset(qcoeff_ptr, 0, count * sizeof(int16_t)); 114 vpx_memset(qcoeff_ptr, 0, count * sizeof(int16_t));
116 vpx_memset(dqcoeff_ptr, 0, count * sizeof(int16_t)); 115 vpx_memset(dqcoeff_ptr, 0, count * sizeof(int16_t));
117 *eob_ptr = 0; 116 *eob_ptr = 0;
118 } 117 }
119 } 118 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_reader.h ('k') | source/libvpx/vp9/encoder/vp9_aq_complexity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698