Change text output from VideoProcessor slightly.
Changes: * Prefix sections with "==>" and "-->" headers. * Add some more newlines. Motivation: Make output more quickly parsed by humans. BUG=webrtc:8448 Change-Id: I02118e2c25eeae3534285cfe756d8b4818997659 Reviewed-on: https://webrtc-review.googlesource.com/56120 Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22153}
This commit is contained in:
committed by
Commit Bot
parent
41f16bec9f
commit
3f06c3bf04
@ -46,7 +46,7 @@ std::string FrameStatistics::ToString() const {
|
||||
|
||||
std::string VideoStatistics::ToString(std::string prefix) const {
|
||||
std::stringstream ss;
|
||||
ss << "\n" << prefix << "target_bitrate_kbps: " << target_bitrate_kbps;
|
||||
ss << prefix << "target_bitrate_kbps: " << target_bitrate_kbps;
|
||||
ss << "\n" << prefix << "input_framerate_fps: " << input_framerate_fps;
|
||||
ss << "\n" << prefix << "spatial_layer_idx: " << spatial_layer_idx;
|
||||
ss << "\n" << prefix << "temporal_layer_idx: " << temporal_layer_idx;
|
||||
|
||||
@ -31,7 +31,7 @@ std::string CodecSpecificToString(const webrtc::VideoCodec& codec) {
|
||||
std::stringstream ss;
|
||||
switch (codec.codecType) {
|
||||
case kVideoCodecVP8:
|
||||
ss << "\ncomplexity: " << codec.VP8().complexity;
|
||||
ss << "complexity: " << codec.VP8().complexity;
|
||||
ss << "\nresilience: " << codec.VP8().resilience;
|
||||
ss << "\nnum_temporal_layers: "
|
||||
<< static_cast<int>(codec.VP8().numberOfTemporalLayers);
|
||||
@ -41,7 +41,7 @@ std::string CodecSpecificToString(const webrtc::VideoCodec& codec) {
|
||||
ss << "\nkey_frame_interval: " << codec.VP8().keyFrameInterval;
|
||||
break;
|
||||
case kVideoCodecVP9:
|
||||
ss << "\ncomplexity: " << codec.VP9().complexity;
|
||||
ss << "complexity: " << codec.VP9().complexity;
|
||||
ss << "\nresilience: " << codec.VP9().resilienceOn;
|
||||
ss << "\nnum_temporal_layers: "
|
||||
<< static_cast<int>(codec.VP9().numberOfTemporalLayers);
|
||||
@ -55,7 +55,7 @@ std::string CodecSpecificToString(const webrtc::VideoCodec& codec) {
|
||||
ss << "\nflexible_mode: " << codec.VP9().flexibleMode;
|
||||
break;
|
||||
case kVideoCodecH264:
|
||||
ss << "\nframe_dropping: " << codec.H264().frameDroppingOn;
|
||||
ss << "frame_dropping: " << codec.H264().frameDroppingOn;
|
||||
ss << "\nkey_frame_interval: " << codec.H264().keyFrameInterval;
|
||||
ss << "\nprofile: " << codec.H264().profile;
|
||||
break;
|
||||
@ -195,12 +195,13 @@ std::vector<FrameType> TestConfig::FrameTypeForFrame(size_t frame_idx) const {
|
||||
std::string TestConfig::ToString() const {
|
||||
std::string codec_type = CodecTypeToPayloadString(codec_settings.codecType);
|
||||
std::stringstream ss;
|
||||
ss << "\nfilename: " << filename;
|
||||
ss << "\nwidth: " << codec_settings.width;
|
||||
ss << "\nheight: " << codec_settings.height;
|
||||
ss << "filename: " << filename;
|
||||
ss << "\nnum_frames: " << num_frames;
|
||||
ss << "\nnum_cores: " << NumberOfCores();
|
||||
ss << "\ncodec_type: " << codec_type;
|
||||
ss << "\n--> codec_settings";
|
||||
ss << "\nwidth: " << codec_settings.width;
|
||||
ss << "\nheight: " << codec_settings.height;
|
||||
ss << "\nmax_framerate_fps: " << codec_settings.maxFramerate;
|
||||
ss << "\nstart_bitrate_kbps: " << codec_settings.startBitrate;
|
||||
ss << "\nmax_bitrate_kbps: " << codec_settings.maxBitrate;
|
||||
@ -208,7 +209,8 @@ std::string TestConfig::ToString() const {
|
||||
ss << "\nmax_qp: " << codec_settings.qpMax;
|
||||
ss << "\nnum_simulcast_streams : "
|
||||
<< static_cast<int>(codec_settings.numberOfSimulcastStreams);
|
||||
ss << "\n" << codec_type << " specific: ";
|
||||
ss << "\n"
|
||||
<< "--> codec_settings." << codec_type << "\n";
|
||||
ss << CodecSpecificToString(codec_settings);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
@ -253,12 +253,14 @@ void VideoProcessorIntegrationTest::AnalyzeAllFrames(
|
||||
|
||||
std::vector<VideoStatistics> layer_stats =
|
||||
stats_.SliceAndCalcLayerVideoStatistic(first_frame_num, last_frame_num);
|
||||
printf("==> Receive stats\n");
|
||||
for (const auto& layer_stat : layer_stats) {
|
||||
printf("%s\n", layer_stat.ToString("recv_").c_str());
|
||||
printf("%s\n\n", layer_stat.ToString("recv_").c_str());
|
||||
}
|
||||
|
||||
VideoStatistics send_stat = stats_.SliceAndCalcAggregatedVideoStatistic(
|
||||
first_frame_num, last_frame_num);
|
||||
printf("==> Send stats\n");
|
||||
printf("%s\n", send_stat.ToString("send_").c_str());
|
||||
|
||||
const RateControlThresholds* rc_threshold =
|
||||
@ -273,6 +275,7 @@ void VideoProcessorIntegrationTest::AnalyzeAllFrames(
|
||||
}
|
||||
|
||||
cpu_process_time_->Print();
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void VideoProcessorIntegrationTest::VerifyVideoStatistic(
|
||||
@ -473,10 +476,10 @@ void VideoProcessorIntegrationTest::ReleaseAndCloseObjects(
|
||||
|
||||
void VideoProcessorIntegrationTest::PrintSettings(
|
||||
rtc::TaskQueue* task_queue) const {
|
||||
printf("VideoProcessor settings\n==\n");
|
||||
printf("==> TestConfig\n");
|
||||
printf("%s\n", config_.ToString().c_str());
|
||||
|
||||
printf("VideoProcessorIntegrationTest settings\n==\n");
|
||||
printf("==> Codec names\n");
|
||||
std::string encoder_name;
|
||||
std::string decoder_name;
|
||||
rtc::Event sync_event(false, false);
|
||||
|
||||
@ -46,7 +46,8 @@ class VideoProcessorIntegrationTestLibvpx
|
||||
}
|
||||
|
||||
void PrintRdPerf(std::map<size_t, std::vector<VideoStatistics>> rd_stats) {
|
||||
printf("\n%13s %7s %7s %13s %13s %7s %13s %13s\n", "uplink_kbps", "width",
|
||||
printf("--> Summary\n");
|
||||
printf("%13s %7s %7s %13s %13s %7s %13s %13s\n", "uplink_kbps", "width",
|
||||
"height", "downlink_kbps", "framerate_fps", "psnr", "enc_speed_fps",
|
||||
"dec_speed_fps");
|
||||
for (const auto& rd_stat : rd_stats) {
|
||||
|
||||
Reference in New Issue
Block a user