Improve VideoCodecTest perf stats output.
- Output verbose send stats before verbose recv stats. - Add |rate_profile_idx| to output names. - Only report encode framerate and keyframe size for the entire stream. - Add encoded bitrate/framerate stats per layer. Remove # dropped frames. - Add U/V quality stats (mainly to compare to HW codecs) Bug: webrtc:10349 Change-Id: I8f0d05e0fdf96ea998a06732462a080245b61221 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128614 Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27223}
This commit is contained in:

committed by
Commit Bot

parent
533a9fec55
commit
c528410d2c
@ -475,6 +475,11 @@ void VideoCodecTestFixtureImpl::AnalyzeAllFrames(
|
|||||||
: config_.num_frames - 1;
|
: config_.num_frames - 1;
|
||||||
RTC_CHECK(last_frame_num >= first_frame_num);
|
RTC_CHECK(last_frame_num >= first_frame_num);
|
||||||
|
|
||||||
|
VideoStatistics send_stat = stats_.SliceAndCalcAggregatedVideoStatistic(
|
||||||
|
first_frame_num, last_frame_num);
|
||||||
|
printf("==> Send stats\n");
|
||||||
|
printf("%s\n\n", send_stat.ToString("send_").c_str());
|
||||||
|
|
||||||
std::vector<VideoStatistics> layer_stats =
|
std::vector<VideoStatistics> layer_stats =
|
||||||
stats_.SliceAndCalcLayerVideoStatistic(first_frame_num, last_frame_num);
|
stats_.SliceAndCalcLayerVideoStatistic(first_frame_num, last_frame_num);
|
||||||
printf("==> Receive stats\n");
|
printf("==> Receive stats\n");
|
||||||
@ -484,36 +489,37 @@ void VideoCodecTestFixtureImpl::AnalyzeAllFrames(
|
|||||||
// For perf dashboard.
|
// For perf dashboard.
|
||||||
char modifier_buf[256];
|
char modifier_buf[256];
|
||||||
rtc::SimpleStringBuilder modifier(modifier_buf);
|
rtc::SimpleStringBuilder modifier(modifier_buf);
|
||||||
modifier << "_sl" << layer_stat.spatial_idx << "tl"
|
modifier << "_r" << rate_profile_idx << "_sl" << layer_stat.spatial_idx;
|
||||||
<< layer_stat.temporal_idx;
|
|
||||||
PrintResult("enc_speed", modifier.str(), config_.test_name,
|
auto PrintResultHelper = [&modifier, this](const std::string& measurement,
|
||||||
layer_stat.enc_speed_fps, "fps", /*important=*/false);
|
double value,
|
||||||
PrintResult("dec_speed", modifier.str(), config_.test_name,
|
const std::string& units) {
|
||||||
layer_stat.dec_speed_fps, "fps", /*important=*/false);
|
PrintResult(measurement, modifier.str(), config_.test_name, value,
|
||||||
PrintResult("avg_key_frame_size", modifier.str(), config_.test_name,
|
units, /*important=*/false);
|
||||||
layer_stat.avg_key_frame_size_bytes, "bytes",
|
};
|
||||||
/*important=*/false);
|
|
||||||
PrintResult("avg_delta_frame_size", modifier.str(), config_.test_name,
|
if (layer_stat.temporal_idx == config_.NumberOfTemporalLayers() - 1) {
|
||||||
layer_stat.avg_delta_frame_size_bytes, "bytes",
|
PrintResultHelper("enc_speed", layer_stat.enc_speed_fps, "fps");
|
||||||
/*important=*/false);
|
PrintResultHelper("avg_key_frame_size",
|
||||||
PrintResult("avg_qp", modifier.str(), config_.test_name,
|
layer_stat.avg_key_frame_size_bytes, "bytes");
|
||||||
layer_stat.avg_qp, "", /*important=*/false);
|
PrintResultHelper("num_key_frames", layer_stat.num_key_frames,
|
||||||
PrintResult("avg_psnr_y", modifier.str(), config_.test_name,
|
"frames");
|
||||||
layer_stat.avg_psnr_y, "dB", /*important=*/false);
|
|
||||||
PrintResult("min_psnr", modifier.str(), config_.test_name,
|
|
||||||
layer_stat.min_psnr, "dB", /*important=*/false);
|
|
||||||
PrintResult("num_dropped_frames", modifier.str(), config_.test_name,
|
|
||||||
layer_stat.num_input_frames - layer_stat.num_encoded_frames,
|
|
||||||
"frames", /*important=*/false);
|
|
||||||
PrintResult("num_key_frames", modifier.str(), config_.test_name,
|
|
||||||
layer_stat.num_key_frames, "frames", /*important=*/false);
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoStatistics send_stat = stats_.SliceAndCalcAggregatedVideoStatistic(
|
modifier << "tl" << layer_stat.temporal_idx;
|
||||||
first_frame_num, last_frame_num);
|
PrintResultHelper("dec_speed", layer_stat.dec_speed_fps, "fps");
|
||||||
printf("==> Send stats\n");
|
PrintResultHelper("avg_delta_frame_size",
|
||||||
printf("%s\n", send_stat.ToString("send_").c_str());
|
layer_stat.avg_delta_frame_size_bytes, "bytes");
|
||||||
|
PrintResultHelper("bitrate", layer_stat.bitrate_kbps, "kbps");
|
||||||
|
PrintResultHelper("framerate", layer_stat.framerate_fps, "fps");
|
||||||
|
PrintResultHelper("avg_psnr_y", layer_stat.avg_psnr_y, "dB");
|
||||||
|
PrintResultHelper("avg_psnr_u", layer_stat.avg_psnr_u, "dB");
|
||||||
|
PrintResultHelper("avg_psnr_v", layer_stat.avg_psnr_v, "dB");
|
||||||
|
PrintResultHelper("min_psnr_yuv", layer_stat.min_psnr, "dB");
|
||||||
|
PrintResultHelper("avg_qp", layer_stat.avg_qp, "");
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
const RateControlThresholds* rc_threshold =
|
const RateControlThresholds* rc_threshold =
|
||||||
rc_thresholds ? &(*rc_thresholds)[rate_profile_idx] : nullptr;
|
rc_thresholds ? &(*rc_thresholds)[rate_profile_idx] : nullptr;
|
||||||
|
Reference in New Issue
Block a user