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