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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Implement Holmer@ comments Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
13 13
14 #include <algorithm> 14 #include <algorithm>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/api/video/i420_buffer.h" 19 #include "webrtc/api/video/i420_buffer.h"
20 #include "webrtc/api/video/video_frame.h" 20 #include "webrtc/api/video/video_frame.h"
21 #include "webrtc/base/checks.h" 21 #include "webrtc/base/checks.h"
22 #include "webrtc/common_video/include/video_frame.h" 22 #include "webrtc/common_video/include/video_frame.h"
23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
24 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 24 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
25 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h" 25 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
26 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" 26 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
27 #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h" 27 #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h"
28 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
28 #include "webrtc/test/gtest.h" 29 #include "webrtc/test/gtest.h"
29 30
30 using ::testing::_; 31 using ::testing::_;
31 using ::testing::AllOf; 32 using ::testing::AllOf;
32 using ::testing::Field; 33 using ::testing::Field;
33 using ::testing::Return; 34 using ::testing::Return;
34 35
35 namespace webrtc { 36 namespace webrtc {
36 namespace testing { 37 namespace testing {
37 38
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // 96 to 127 dynamic payload types for video codecs 200 // 96 to 127 dynamic payload types for video codecs
200 settings->plType = 120; 201 settings->plType = 120;
201 settings->startBitrate = 300; 202 settings->startBitrate = 300;
202 settings->minBitrate = 30; 203 settings->minBitrate = 30;
203 settings->maxBitrate = 0; 204 settings->maxBitrate = 0;
204 settings->maxFramerate = 30; 205 settings->maxFramerate = 30;
205 settings->width = kDefaultWidth; 206 settings->width = kDefaultWidth;
206 settings->height = kDefaultHeight; 207 settings->height = kDefaultHeight;
207 settings->numberOfSimulcastStreams = kNumberOfSimulcastStreams; 208 settings->numberOfSimulcastStreams = kNumberOfSimulcastStreams;
208 ASSERT_EQ(3, kNumberOfSimulcastStreams); 209 ASSERT_EQ(3, kNumberOfSimulcastStreams);
210 settings->timing_frame_thresholds = {kDefaultTimingFramesDelayMs,
211 kDefaultOutlierFrameSizePercent};
209 ConfigureStream(kDefaultWidth / 4, kDefaultHeight / 4, kMaxBitrates[0], 212 ConfigureStream(kDefaultWidth / 4, kDefaultHeight / 4, kMaxBitrates[0],
210 kMinBitrates[0], kTargetBitrates[0], 213 kMinBitrates[0], kTargetBitrates[0],
211 &settings->simulcastStream[0], temporal_layer_profile[0]); 214 &settings->simulcastStream[0], temporal_layer_profile[0]);
212 ConfigureStream(kDefaultWidth / 2, kDefaultHeight / 2, kMaxBitrates[1], 215 ConfigureStream(kDefaultWidth / 2, kDefaultHeight / 2, kMaxBitrates[1],
213 kMinBitrates[1], kTargetBitrates[1], 216 kMinBitrates[1], kTargetBitrates[1],
214 &settings->simulcastStream[1], temporal_layer_profile[1]); 217 &settings->simulcastStream[1], temporal_layer_profile[1]);
215 ConfigureStream(kDefaultWidth, kDefaultHeight, kMaxBitrates[2], 218 ConfigureStream(kDefaultWidth, kDefaultHeight, kMaxBitrates[2],
216 kMinBitrates[2], kTargetBitrates[2], 219 kMinBitrates[2], kTargetBitrates[2],
217 &settings->simulcastStream[2], temporal_layer_profile[2]); 220 &settings->simulcastStream[2], temporal_layer_profile[2]);
218 settings->VP8()->resilience = kResilientStream; 221 settings->VP8()->resilience = kResilientStream;
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 VideoCodec settings_; 740 VideoCodec settings_;
738 rtc::scoped_refptr<I420Buffer> input_buffer_; 741 rtc::scoped_refptr<I420Buffer> input_buffer_;
739 std::unique_ptr<VideoFrame> input_frame_; 742 std::unique_ptr<VideoFrame> input_frame_;
740 std::unique_ptr<SimulcastRateAllocator> rate_allocator_; 743 std::unique_ptr<SimulcastRateAllocator> rate_allocator_;
741 }; 744 };
742 745
743 } // namespace testing 746 } // namespace testing
744 } // namespace webrtc 747 } // namespace webrtc
745 748
746 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ 749 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc ('k') | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698