Updated analysis in videoprocessor.

- Run analysis after all frames are processed. Before part of it was
done at bitrate change points;
- Analysis is done for whole stream as well as for each rate update
interval;
- Changed units from number of frames to time units for some metrics
and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
'time to reach target bitrate, sec';
- Changed data type of FrameStatistic::max_nalu_length (renamed to
max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
use such advanced data type in such low level data structure.

Bug: webrtc:8524
Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
Reviewed-on: https://webrtc-review.googlesource.com/31901
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21653}
This commit is contained in:
Sergey Silkin
2018-01-17 11:36:27 +01:00
committed by Commit Bot
parent 8d0f1db319
commit 1880c7162b
20 changed files with 732 additions and 907 deletions

View File

@ -42,19 +42,20 @@ struct TestConfig {
};
void SetCodecSettings(VideoCodecType codec_type,
int num_temporal_layers,
size_t num_temporal_layers,
bool error_concealment_on,
bool denoising_on,
bool frame_dropper_on,
bool spatial_resize_on,
bool resilience_on,
int width,
int height);
size_t width,
size_t height);
int NumberOfCores() const;
int NumberOfTemporalLayers() const;
int TemporalLayerForFrame(int frame_idx) const;
std::vector<FrameType> FrameTypeForFrame(int frame_idx) const;
size_t NumberOfCores() const;
size_t NumberOfTemporalLayers() const;
size_t NumberOfSpatialLayers() const;
size_t TemporalLayerForFrame(size_t frame_idx) const;
std::vector<FrameType> FrameTypeForFrame(size_t frame_idx) const;
std::string ToString() const;
std::string CodecName() const;
std::string FilenameWithParams() const;
@ -70,7 +71,7 @@ struct TestConfig {
std::string output_filename;
// Number of frames to process.
int num_frames = 0;
size_t num_frames = 0;
// Configurations related to networking.
NetworkingConfig networking_config;
@ -96,7 +97,7 @@ struct TestConfig {
// to this setting. Forcing key frames may also affect encoder planning
// optimizations in a negative way, since it will suddenly be forced to
// produce an expensive key frame.
int keyframe_interval = 0;
size_t keyframe_interval = 0;
// Codec settings to use.
webrtc::VideoCodec codec_settings;
@ -118,6 +119,9 @@ struct TestConfig {
// Custom checker that will be called for each frame.
const EncodedFrameChecker* encoded_frame_checker = nullptr;
// Print out frame level stats.
bool print_frame_level_stats = false;
};
} // namespace test