OLD | NEW |
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 |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 | 841 |
842 // Test the layer pattern and sync flag for various spatial-temporal patterns. | 842 // Test the layer pattern and sync flag for various spatial-temporal patterns. |
843 // 3-2-1 pattern: 3 temporal layers for lowest resolution, 2 for middle, and | 843 // 3-2-1 pattern: 3 temporal layers for lowest resolution, 2 for middle, and |
844 // 1 temporal layer for highest resolution. | 844 // 1 temporal layer for highest resolution. |
845 // For this profile, we expect the temporal index pattern to be: | 845 // For this profile, we expect the temporal index pattern to be: |
846 // 1st stream: 0, 2, 1, 2, .... | 846 // 1st stream: 0, 2, 1, 2, .... |
847 // 2nd stream: 0, 1, 0, 1, ... | 847 // 2nd stream: 0, 1, 0, 1, ... |
848 // 3rd stream: -1, -1, -1, -1, .... | 848 // 3rd stream: -1, -1, -1, -1, .... |
849 // Regarding the 3rd stream, note that a stream/encoder with 1 temporal layer | 849 // Regarding the 3rd stream, note that a stream/encoder with 1 temporal layer |
850 // should always have temporal layer idx set to kNoTemporalIdx = -1. | 850 // should always have temporal layer idx set to kNoTemporalIdx = -1. |
851 // Since CodecSpecificInfoVP8.temporalIdx is uint8, this will wrap to 255. | 851 // Since CodecSpecificInfoVP8.temporalIdx is uint8_t, this will wrap to 255. |
852 // TODO(marpan): Although this seems safe for now, we should fix this. | 852 // TODO(marpan): Although this seems safe for now, we should fix this. |
853 void TestSpatioTemporalLayers321PatternEncoder() { | 853 void TestSpatioTemporalLayers321PatternEncoder() { |
854 int temporal_layer_profile[3] = {3, 2, 1}; | 854 int temporal_layer_profile[3] = {3, 2, 1}; |
855 SetUpCodec(temporal_layer_profile); | 855 SetUpCodec(temporal_layer_profile); |
856 Vp8TestEncodedImageCallback encoder_callback; | 856 Vp8TestEncodedImageCallback encoder_callback; |
857 encoder_->RegisterEncodeCompleteCallback(&encoder_callback); | 857 encoder_->RegisterEncodeCompleteCallback(&encoder_callback); |
858 encoder_->SetRates(kMaxBitrates[2], 30); // To get all three streams. | 858 encoder_->SetRates(kMaxBitrates[2], 30); // To get all three streams. |
859 | 859 |
860 int expected_temporal_idx[3] = { -1, -1, -1}; | 860 int expected_temporal_idx[3] = { -1, -1, -1}; |
861 bool expected_layer_sync[3] = {false, false, false}; | 861 bool expected_layer_sync[3] = {false, false, false}; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 rtc::scoped_ptr<VP8Decoder> decoder_; | 990 rtc::scoped_ptr<VP8Decoder> decoder_; |
991 MockDecodedImageCallback decoder_callback_; | 991 MockDecodedImageCallback decoder_callback_; |
992 VideoCodec settings_; | 992 VideoCodec settings_; |
993 VideoFrame input_frame_; | 993 VideoFrame input_frame_; |
994 }; | 994 }; |
995 | 995 |
996 } // namespace testing | 996 } // namespace testing |
997 } // namespace webrtc | 997 } // namespace webrtc |
998 | 998 |
999 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ | 999 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_ |
OLD | NEW |