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

Side by Side Diff: remoting/codec/video_decoder_vpx_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 unified diff | Download patch
« no previous file with comments | « remoting/codec/video_decoder_vpx.cc ('k') | remoting/codec/video_encoder.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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/codec/video_decoder_vpx.h" 5 #include "remoting/codec/video_decoder_vpx.h"
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 #include "remoting/codec/codec_test.h" 8 #include "remoting/codec/codec_test.h"
9 #include "remoting/codec/video_encoder_vpx.h" 9 #include "remoting/codec/video_encoder_vpx.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 namespace { 15 namespace {
16 16
17 class VideoDecoderVpxTest : public testing::Test { 17 class VideoDecoderVpxTest : public testing::Test {
18 protected: 18 protected:
19 scoped_ptr<VideoEncoderVpx> encoder_; 19 std::unique_ptr<VideoEncoderVpx> encoder_;
20 scoped_ptr<VideoDecoderVpx> decoder_; 20 std::unique_ptr<VideoDecoderVpx> decoder_;
21 21
22 VideoDecoderVpxTest() : encoder_(VideoEncoderVpx::CreateForVP8()), 22 VideoDecoderVpxTest() : encoder_(VideoEncoderVpx::CreateForVP8()),
23 decoder_(VideoDecoderVpx::CreateForVP8()) { 23 decoder_(VideoDecoderVpx::CreateForVP8()) {
24 } 24 }
25 25
26 void TestGradient(int screen_width, int screen_height, 26 void TestGradient(int screen_width, int screen_height,
27 double max_error_limit, double mean_error_limit) { 27 double max_error_limit, double mean_error_limit) {
28 TestVideoEncoderDecoderGradient( 28 TestVideoEncoderDecoderGradient(
29 encoder_.get(), decoder_.get(), 29 encoder_.get(), decoder_.get(),
30 webrtc::DesktopSize(screen_width, screen_height), 30 webrtc::DesktopSize(screen_width, screen_height),
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 // Check that encoding and decoding a particular frame doesn't change the 76 // Check that encoding and decoding a particular frame doesn't change the
77 // frame too much. The frame used is a gradient, which does not contain sharp 77 // frame too much. The frame used is a gradient, which does not contain sharp
78 // transitions, so encoding lossiness should not be too high. 78 // transitions, so encoding lossiness should not be too high.
79 TEST_F(VideoDecoderVp9Test, Gradient) { 79 TEST_F(VideoDecoderVp9Test, Gradient) {
80 TestGradient(320, 240, 0.04, 0.02); 80 TestGradient(320, 240, 0.04, 0.02);
81 } 81 }
82 82
83 } // namespace remoting 83 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/video_decoder_vpx.cc ('k') | remoting/codec/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698