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

Unified Diff: media/filters/wsola_internals.cc

Issue 1904213003: Convert //media/filters from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/vp9_raw_bits_reader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/wsola_internals.cc
diff --git a/media/filters/wsola_internals.cc b/media/filters/wsola_internals.cc
index 9ce1f0d966d189d92f1df9e74d61f3d2fd995edd..a247df91c5cd761093ff1c0753f648ef0d372911 100644
--- a/media/filters/wsola_internals.cc
+++ b/media/filters/wsola_internals.cc
@@ -10,9 +10,9 @@
#include <algorithm>
#include <cmath>
#include <limits>
+#include <memory>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "media/base/audio_bus.h"
namespace media {
@@ -114,7 +114,7 @@ int DecimatedSearch(int decimation,
int channels = search_segment->channels();
int block_size = target_block->frames();
int num_candidate_blocks = search_segment->frames() - (block_size - 1);
- scoped_ptr<float[]> dot_prod(new float[channels]);
+ std::unique_ptr<float[]> dot_prod(new float[channels]);
float similarity[3]; // Three elements for cubic interpolation.
int n = 0;
@@ -192,7 +192,7 @@ int FullSearch(int low_limit,
const float* energy_candidate_blocks) {
int channels = search_block->channels();
int block_size = target_block->frames();
- scoped_ptr<float[]> dot_prod(new float[channels]);
+ std::unique_ptr<float[]> dot_prod(new float[channels]);
float best_similarity = std::numeric_limits<float>::min();
int optimal_index = 0;
@@ -233,8 +233,8 @@ int OptimalIndex(const AudioBus* search_block,
// heuristically based on experiments.
const int kSearchDecimation = 5;
- scoped_ptr<float[]> energy_target_block(new float[channels]);
- scoped_ptr<float[]> energy_candidate_blocks(
+ std::unique_ptr<float[]> energy_target_block(new float[channels]);
+ std::unique_ptr<float[]> energy_candidate_blocks(
new float[channels * num_candidate_blocks]);
// Energy of all candid frames.
« no previous file with comments | « media/filters/vp9_raw_bits_reader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698