| 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 13 matching lines...) Expand all Loading... |
| 24 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" | 24 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" |
| 25 #include "webrtc/modules/video_coding/codecs/test/stats.h" | 25 #include "webrtc/modules/video_coding/codecs/test/stats.h" |
| 26 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h" | 26 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h" |
| 27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" | 27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
| 28 #include "webrtc/modules/video_coding/include/video_coding.h" | 28 #include "webrtc/modules/video_coding/include/video_coding.h" |
| 29 #include "webrtc/rtc_base/format_macros.h" | 29 #include "webrtc/rtc_base/format_macros.h" |
| 30 #include "webrtc/test/testsupport/frame_reader.h" | 30 #include "webrtc/test/testsupport/frame_reader.h" |
| 31 #include "webrtc/test/testsupport/frame_writer.h" | 31 #include "webrtc/test/testsupport/frame_writer.h" |
| 32 #include "webrtc/test/testsupport/metrics/video_metrics.h" | 32 #include "webrtc/test/testsupport/metrics/video_metrics.h" |
| 33 #include "webrtc/test/testsupport/packet_reader.h" | 33 #include "webrtc/test/testsupport/packet_reader.h" |
| 34 #include "webrtc/test/video_codec_settings.h" |
| 34 | 35 |
| 35 DEFINE_string(test_name, "Quality test", "The name of the test to run. "); | 36 DEFINE_string(test_name, "Quality test", "The name of the test to run. "); |
| 36 DEFINE_string(test_description, | 37 DEFINE_string(test_description, |
| 37 "", | 38 "", |
| 38 "A more detailed description about what " | 39 "A more detailed description about what " |
| 39 "the current test is about."); | 40 "the current test is about."); |
| 40 DEFINE_string(input_filename, | 41 DEFINE_string(input_filename, |
| 41 "", | 42 "", |
| 42 "Input file. " | 43 "Input file. " |
| 43 "The source video file to be encoded and decoded. Must be in " | 44 "The source video file to be encoded and decoded. Must be in " |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 fprintf(stderr, "Cannot write output file: %s\n", | 198 fprintf(stderr, "Cannot write output file: %s\n", |
| 198 config->output_filename.c_str()); | 199 config->output_filename.c_str()); |
| 199 return 4; | 200 return 4; |
| 200 } | 201 } |
| 201 fclose(test_file); | 202 fclose(test_file); |
| 202 | 203 |
| 203 // Check single core flag. | 204 // Check single core flag. |
| 204 config->use_single_core = FLAGS_use_single_core; | 205 config->use_single_core = FLAGS_use_single_core; |
| 205 | 206 |
| 206 // Get codec specific configuration. | 207 // Get codec specific configuration. |
| 207 webrtc::VideoCodingModule::Codec(webrtc::kVideoCodecVP8, | 208 webrtc::test::CodecSettings(webrtc::kVideoCodecVP8, config->codec_settings); |
| 208 config->codec_settings); | |
| 209 | 209 |
| 210 // Check the temporal layers. | 210 // Check the temporal layers. |
| 211 if (FLAGS_temporal_layers < 0 || | 211 if (FLAGS_temporal_layers < 0 || |
| 212 FLAGS_temporal_layers > webrtc::kMaxTemporalStreams) { | 212 FLAGS_temporal_layers > webrtc::kMaxTemporalStreams) { |
| 213 fprintf(stderr, "Temporal layers number must be 0-4, was: %d\n", | 213 fprintf(stderr, "Temporal layers number must be 0-4, was: %d\n", |
| 214 FLAGS_temporal_layers); | 214 FLAGS_temporal_layers); |
| 215 return 13; | 215 return 13; |
| 216 } | 216 } |
| 217 config->codec_settings->VP8()->numberOfTemporalLayers = FLAGS_temporal_layers; | 217 config->codec_settings->VP8()->numberOfTemporalLayers = FLAGS_temporal_layers; |
| 218 | 218 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 if (FLAGS_python) { | 549 if (FLAGS_python) { |
| 550 PrintPythonOutput(config, stats, ssim_result, psnr_result); | 550 PrintPythonOutput(config, stats, ssim_result, psnr_result); |
| 551 } | 551 } |
| 552 delete processor; | 552 delete processor; |
| 553 delete encoder; | 553 delete encoder; |
| 554 delete decoder; | 554 delete decoder; |
| 555 Log("Quality test finished!"); | 555 Log("Quality test finished!"); |
| 556 return 0; | 556 return 0; |
| 557 } | 557 } |
| OLD | NEW |