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

Side by Side Diff: webrtc/common_audio/resampler/sinc_resampler.cc

Issue 2719733002: Replace NULL with nullptr or null in webrtc/audio/ and common_audio/. (Closed)
Patch Set: Fixing test. Created 3 years, 9 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
« no previous file with comments | « webrtc/common_audio/resampler/resampler.cc ('k') | webrtc/common_audio/ring_buffer.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Create input buffers with a 16-byte alignment for SSE optimizations. 154 // Create input buffers with a 16-byte alignment for SSE optimizations.
155 kernel_storage_(static_cast<float*>( 155 kernel_storage_(static_cast<float*>(
156 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))), 156 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))),
157 kernel_pre_sinc_storage_(static_cast<float*>( 157 kernel_pre_sinc_storage_(static_cast<float*>(
158 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))), 158 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))),
159 kernel_window_storage_(static_cast<float*>( 159 kernel_window_storage_(static_cast<float*>(
160 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))), 160 AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))),
161 input_buffer_(static_cast<float*>( 161 input_buffer_(static_cast<float*>(
162 AlignedMalloc(sizeof(float) * input_buffer_size_, 16))), 162 AlignedMalloc(sizeof(float) * input_buffer_size_, 16))),
163 #if defined(WEBRTC_CPU_DETECTION) 163 #if defined(WEBRTC_CPU_DETECTION)
164 convolve_proc_(NULL), 164 convolve_proc_(nullptr),
165 #endif 165 #endif
166 r1_(input_buffer_.get()), 166 r1_(input_buffer_.get()),
167 r2_(input_buffer_.get() + kKernelSize / 2) { 167 r2_(input_buffer_.get() + kKernelSize / 2) {
168 #if defined(WEBRTC_CPU_DETECTION) 168 #if defined(WEBRTC_CPU_DETECTION)
169 InitializeCPUSpecificFeatures(); 169 InitializeCPUSpecificFeatures();
170 RTC_DCHECK(convolve_proc_); 170 RTC_DCHECK(convolve_proc_);
171 #endif 171 #endif
172 RTC_DCHECK_GT(request_frames_, 0); 172 RTC_DCHECK_GT(request_frames_, 0);
173 Flush(); 173 Flush();
174 RTC_DCHECK_GT(block_size_, kKernelSize); 174 RTC_DCHECK_GT(block_size_, kKernelSize);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 sum1 += *input_ptr * *k1++; 365 sum1 += *input_ptr * *k1++;
366 sum2 += *input_ptr++ * *k2++; 366 sum2 += *input_ptr++ * *k2++;
367 } 367 }
368 368
369 // Linearly interpolate the two "convolutions". 369 // Linearly interpolate the two "convolutions".
370 return static_cast<float>((1.0 - kernel_interpolation_factor) * sum1 + 370 return static_cast<float>((1.0 - kernel_interpolation_factor) * sum1 +
371 kernel_interpolation_factor * sum2); 371 kernel_interpolation_factor * sum2);
372 } 372 }
373 373
374 } // namespace webrtc 374 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_audio/resampler/resampler.cc ('k') | webrtc/common_audio/ring_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698