OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 int width; | 75 int width; |
76 int height; | 76 int height; |
77 | 77 |
78 int num_temporal_layers; | 78 int num_temporal_layers; |
79 int key_frame_interval; | 79 int key_frame_interval; |
80 bool error_concealment_on; | 80 bool error_concealment_on; |
81 bool denoising_on; | 81 bool denoising_on; |
82 bool frame_dropper_on; | 82 bool frame_dropper_on; |
83 bool spatial_resize_on; | 83 bool spatial_resize_on; |
| 84 bool resilience_on; |
84 | 85 |
85 float packet_loss_probability; // [0.0, 1.0]. | 86 float packet_loss_probability; // [0.0, 1.0]. |
86 | 87 |
87 std::string filename; | 88 std::string filename; |
88 bool verbose_logging; | 89 bool verbose_logging; |
89 | 90 |
90 // In batch mode, the VideoProcessor is fed all the frames for processing | 91 // In batch mode, the VideoProcessor is fed all the frames for processing |
91 // before any metrics are calculated. This is useful for pipelining HW codecs, | 92 // before any metrics are calculated. This is useful for pipelining HW codecs, |
92 // for which some calculated metrics otherwise would be incorrect. The | 93 // for which some calculated metrics otherwise would be incorrect. The |
93 // downside with batch mode is that mid-test rate allocation is not supported. | 94 // downside with batch mode is that mid-test rate allocation is not supported. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 config_.codec_settings->VP8()->errorConcealmentOn = | 276 config_.codec_settings->VP8()->errorConcealmentOn = |
276 process.error_concealment_on; | 277 process.error_concealment_on; |
277 config_.codec_settings->VP8()->denoisingOn = process.denoising_on; | 278 config_.codec_settings->VP8()->denoisingOn = process.denoising_on; |
278 config_.codec_settings->VP8()->numberOfTemporalLayers = | 279 config_.codec_settings->VP8()->numberOfTemporalLayers = |
279 num_temporal_layers_; | 280 num_temporal_layers_; |
280 config_.codec_settings->VP8()->frameDroppingOn = | 281 config_.codec_settings->VP8()->frameDroppingOn = |
281 process.frame_dropper_on; | 282 process.frame_dropper_on; |
282 config_.codec_settings->VP8()->automaticResizeOn = | 283 config_.codec_settings->VP8()->automaticResizeOn = |
283 process.spatial_resize_on; | 284 process.spatial_resize_on; |
284 config_.codec_settings->VP8()->keyFrameInterval = kBaseKeyFrameInterval; | 285 config_.codec_settings->VP8()->keyFrameInterval = kBaseKeyFrameInterval; |
| 286 config_.codec_settings->VP8()->resilience = |
| 287 process.resilience_on ? kResilientStream : kResilienceOff; |
285 break; | 288 break; |
286 case kVideoCodecVP9: | 289 case kVideoCodecVP9: |
287 config_.codec_settings->VP9()->denoisingOn = process.denoising_on; | 290 config_.codec_settings->VP9()->denoisingOn = process.denoising_on; |
288 config_.codec_settings->VP9()->numberOfTemporalLayers = | 291 config_.codec_settings->VP9()->numberOfTemporalLayers = |
289 num_temporal_layers_; | 292 num_temporal_layers_; |
290 config_.codec_settings->VP9()->frameDroppingOn = | 293 config_.codec_settings->VP9()->frameDroppingOn = |
291 process.frame_dropper_on; | 294 process.frame_dropper_on; |
292 config_.codec_settings->VP9()->automaticResizeOn = | 295 config_.codec_settings->VP9()->automaticResizeOn = |
293 process.spatial_resize_on; | 296 process.spatial_resize_on; |
294 config_.codec_settings->VP9()->keyFrameInterval = kBaseKeyFrameInterval; | 297 config_.codec_settings->VP9()->keyFrameInterval = kBaseKeyFrameInterval; |
| 298 config_.codec_settings->VP9()->resilienceOn = process.resilience_on; |
295 break; | 299 break; |
296 default: | 300 default: |
297 RTC_NOTREACHED(); | 301 RTC_NOTREACHED(); |
298 break; | 302 break; |
299 } | 303 } |
300 | 304 |
301 // Create file objects for quality analysis. | 305 // Create file objects for quality analysis. |
302 analysis_frame_reader_.reset(new test::YuvFrameReaderImpl( | 306 analysis_frame_reader_.reset(new test::YuvFrameReaderImpl( |
303 config_.input_filename, config_.codec_settings->width, | 307 config_.input_filename, config_.codec_settings->width, |
304 config_.codec_settings->height)); | 308 config_.codec_settings->height)); |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 VideoCodecType codec_type, | 693 VideoCodecType codec_type, |
690 bool hw_codec, | 694 bool hw_codec, |
691 bool use_single_core, | 695 bool use_single_core, |
692 float packet_loss_probability, | 696 float packet_loss_probability, |
693 int key_frame_interval, | 697 int key_frame_interval, |
694 int num_temporal_layers, | 698 int num_temporal_layers, |
695 bool error_concealment_on, | 699 bool error_concealment_on, |
696 bool denoising_on, | 700 bool denoising_on, |
697 bool frame_dropper_on, | 701 bool frame_dropper_on, |
698 bool spatial_resize_on, | 702 bool spatial_resize_on, |
| 703 bool resilience_on, |
699 int width, | 704 int width, |
700 int height, | 705 int height, |
701 const std::string& filename, | 706 const std::string& filename, |
702 bool verbose_logging, | 707 bool verbose_logging, |
703 bool batch_mode) { | 708 bool batch_mode) { |
704 process_settings->codec_type = codec_type; | 709 process_settings->codec_type = codec_type; |
705 process_settings->hw_codec = hw_codec; | 710 process_settings->hw_codec = hw_codec; |
706 process_settings->use_single_core = use_single_core; | 711 process_settings->use_single_core = use_single_core; |
707 process_settings->packet_loss_probability = packet_loss_probability; | 712 process_settings->packet_loss_probability = packet_loss_probability; |
708 process_settings->key_frame_interval = key_frame_interval; | 713 process_settings->key_frame_interval = key_frame_interval; |
709 process_settings->num_temporal_layers = num_temporal_layers, | 714 process_settings->num_temporal_layers = num_temporal_layers, |
710 process_settings->error_concealment_on = error_concealment_on; | 715 process_settings->error_concealment_on = error_concealment_on; |
711 process_settings->denoising_on = denoising_on; | 716 process_settings->denoising_on = denoising_on; |
712 process_settings->frame_dropper_on = frame_dropper_on; | 717 process_settings->frame_dropper_on = frame_dropper_on; |
713 process_settings->spatial_resize_on = spatial_resize_on; | 718 process_settings->spatial_resize_on = spatial_resize_on; |
| 719 process_settings->resilience_on = resilience_on; |
714 process_settings->width = width; | 720 process_settings->width = width; |
715 process_settings->height = height; | 721 process_settings->height = height; |
716 process_settings->filename = filename; | 722 process_settings->filename = filename; |
717 process_settings->verbose_logging = verbose_logging; | 723 process_settings->verbose_logging = verbose_logging; |
718 process_settings->batch_mode = batch_mode; | 724 process_settings->batch_mode = batch_mode; |
719 } | 725 } |
720 | 726 |
721 static void SetCodecParams(CodecParams* process_settings, | 727 static void SetCodecParams(CodecParams* process_settings, |
722 VideoCodecType codec_type, | 728 VideoCodecType codec_type, |
723 bool hw_codec, | 729 bool hw_codec, |
724 bool use_single_core, | 730 bool use_single_core, |
725 float packet_loss_probability, | 731 float packet_loss_probability, |
726 int key_frame_interval, | 732 int key_frame_interval, |
727 int num_temporal_layers, | 733 int num_temporal_layers, |
728 bool error_concealment_on, | 734 bool error_concealment_on, |
729 bool denoising_on, | 735 bool denoising_on, |
730 bool frame_dropper_on, | 736 bool frame_dropper_on, |
731 bool spatial_resize_on) { | 737 bool spatial_resize_on, |
| 738 bool resilience_on) { |
732 SetCodecParams(process_settings, codec_type, hw_codec, use_single_core, | 739 SetCodecParams(process_settings, codec_type, hw_codec, use_single_core, |
733 packet_loss_probability, key_frame_interval, | 740 packet_loss_probability, key_frame_interval, |
734 num_temporal_layers, error_concealment_on, denoising_on, | 741 num_temporal_layers, error_concealment_on, denoising_on, |
735 frame_dropper_on, spatial_resize_on, kCifWidth, kCifHeight, | 742 frame_dropper_on, spatial_resize_on, resilience_on, |
736 kFilenameForemanCif, false /* verbose_logging */, | 743 kCifWidth, kCifHeight, kFilenameForemanCif, |
737 false /* batch_mode */); | 744 false /* verbose_logging */, false /* batch_mode */); |
738 } | 745 } |
739 | 746 |
740 static void SetQualityThresholds(QualityThresholds* quality_thresholds, | 747 static void SetQualityThresholds(QualityThresholds* quality_thresholds, |
741 double min_avg_psnr, | 748 double min_avg_psnr, |
742 double min_min_psnr, | 749 double min_min_psnr, |
743 double min_avg_ssim, | 750 double min_avg_ssim, |
744 double min_min_ssim) { | 751 double min_min_ssim) { |
745 quality_thresholds->min_avg_psnr = min_avg_psnr; | 752 quality_thresholds->min_avg_psnr = min_avg_psnr; |
746 quality_thresholds->min_min_psnr = min_min_psnr; | 753 quality_thresholds->min_min_psnr = min_min_psnr; |
747 quality_thresholds->min_avg_ssim = min_avg_ssim; | 754 quality_thresholds->min_avg_ssim = min_avg_ssim; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 | 834 |
828 // Codec and network settings. | 835 // Codec and network settings. |
829 float packet_loss_probability_; | 836 float packet_loss_probability_; |
830 int num_temporal_layers_; | 837 int num_temporal_layers_; |
831 }; | 838 }; |
832 | 839 |
833 } // namespace test | 840 } // namespace test |
834 } // namespace webrtc | 841 } // namespace webrtc |
835 | 842 |
836 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES
T_H_ | 843 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES
T_H_ |
OLD | NEW |