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

Side by Side Diff: source/libvpx/vp8/encoder/arm/neon/denoising_neon.c

Issue 290613006: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * [4, 7] 1 3 4 43 * [4, 7] 1 3 4
44 * [8, 15] 2 4 5 44 * [8, 15] 2 4 5
45 * [16, 255] 3 6 7 45 * [16, 255] 3 6 7
46 */ 46 */
47 47
48 int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y, 48 int vp8_denoiser_filter_neon(unsigned char *mc_running_avg_y,
49 int mc_running_avg_y_stride, 49 int mc_running_avg_y_stride,
50 unsigned char *running_avg_y, 50 unsigned char *running_avg_y,
51 int running_avg_y_stride, 51 int running_avg_y_stride,
52 unsigned char *sig, int sig_stride, 52 unsigned char *sig, int sig_stride,
53 unsigned int motion_magnitude) { 53 unsigned int motion_magnitude,
54 int increase_denoising) {
54 /* If motion_magnitude is small, making the denoiser more aggressive by 55 /* If motion_magnitude is small, making the denoiser more aggressive by
55 * increasing the adjustment for each level, level1 adjustment is 56 * increasing the adjustment for each level, level1 adjustment is
56 * increased, the deltas stay the same. 57 * increased, the deltas stay the same.
57 */ 58 */
58 const uint8x16_t v_level1_adjustment = vdupq_n_u8( 59 const uint8x16_t v_level1_adjustment = vdupq_n_u8(
59 (motion_magnitude <= MOTION_MAGNITUDE_THRESHOLD) ? 4 : 3); 60 (motion_magnitude <= MOTION_MAGNITUDE_THRESHOLD) ? 4 : 3);
60 const uint8x16_t v_delta_level_1_and_2 = vdupq_n_u8(1); 61 const uint8x16_t v_delta_level_1_and_2 = vdupq_n_u8(1);
61 const uint8x16_t v_delta_level_2_and_3 = vdupq_n_u8(2); 62 const uint8x16_t v_delta_level_2_and_3 = vdupq_n_u8(2);
62 const uint8x16_t v_level1_threshold = vdupq_n_u8(4); 63 const uint8x16_t v_level1_threshold = vdupq_n_u8(4);
63 const uint8x16_t v_level2_threshold = vdupq_n_u8(8); 64 const uint8x16_t v_level2_threshold = vdupq_n_u8(8);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 152 }
152 153
153 /* Tell above level that block was filtered. */ 154 /* Tell above level that block was filtered. */
154 running_avg_y -= running_avg_y_stride * 16; 155 running_avg_y -= running_avg_y_stride * 16;
155 sig -= sig_stride * 16; 156 sig -= sig_stride * 16;
156 157
157 vp8_copy_mem16x16(running_avg_y, running_avg_y_stride, sig, sig_stride); 158 vp8_copy_mem16x16(running_avg_y, running_avg_y_stride, sig, sig_stride);
158 159
159 return FILTER_BLOCK; 160 return FILTER_BLOCK;
160 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698