Reland "Updated analysis in videoprocessor."
This is a reland of 1880c7162bd3637c433f9421c798808cd6eacaf7 Original change's description: > 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} TBR=brandtr@webrtc.org, stefan@webrtc.org Bug: webrtc:8524 Change-Id: Ie0ad7790689422ffa61da294967fc492a13b75ae Reviewed-on: https://webrtc-review.googlesource.com/40202 Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21668}
This commit is contained in:

committed by
Commit Bot

parent
e2a931886f
commit
3be2a55e7f
@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_
|
||||
#define MODULES_VIDEO_CODING_CODECS_TEST_STATS_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
@ -20,34 +21,42 @@ namespace test {
|
||||
|
||||
// Statistics for one processed frame.
|
||||
struct FrameStatistic {
|
||||
explicit FrameStatistic(int frame_number) : frame_number(frame_number) {}
|
||||
const int frame_number = 0;
|
||||
explicit FrameStatistic(size_t frame_number) : frame_number(frame_number) {}
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
size_t frame_number = 0;
|
||||
size_t rtp_timestamp = 0;
|
||||
|
||||
// Encoding.
|
||||
int64_t encode_start_ns = 0;
|
||||
int encode_return_code = 0;
|
||||
bool encoding_successful = false;
|
||||
int encode_time_us = 0;
|
||||
int bitrate_kbps = 0;
|
||||
size_t encode_time_us = 0;
|
||||
size_t target_bitrate_kbps = 0;
|
||||
size_t encoded_frame_size_bytes = 0;
|
||||
webrtc::FrameType frame_type = kVideoFrameDelta;
|
||||
|
||||
// Layering.
|
||||
size_t temporal_layer_idx = 0;
|
||||
size_t simulcast_svc_idx = 0;
|
||||
|
||||
// H264 specific.
|
||||
rtc::Optional<size_t> max_nalu_length;
|
||||
size_t max_nalu_size_bytes = 0;
|
||||
|
||||
// Decoding.
|
||||
int64_t decode_start_ns = 0;
|
||||
int decode_return_code = 0;
|
||||
bool decoding_successful = false;
|
||||
int decode_time_us = 0;
|
||||
int decoded_width = 0;
|
||||
int decoded_height = 0;
|
||||
size_t decode_time_us = 0;
|
||||
size_t decoded_width = 0;
|
||||
size_t decoded_height = 0;
|
||||
|
||||
// Quantization.
|
||||
int qp = -1;
|
||||
|
||||
// How many packets were discarded of the encoded frame data (if any).
|
||||
int packets_dropped = 0;
|
||||
size_t packets_dropped = 0;
|
||||
size_t total_packets = 0;
|
||||
size_t manipulated_length = 0;
|
||||
|
||||
@ -66,13 +75,10 @@ class Stats {
|
||||
FrameStatistic* AddFrame();
|
||||
|
||||
// Returns the FrameStatistic corresponding to |frame_number|.
|
||||
FrameStatistic* GetFrame(int frame_number);
|
||||
FrameStatistic* GetFrame(size_t frame_number);
|
||||
|
||||
size_t size() const;
|
||||
|
||||
// TODO(brandtr): Add output as CSV.
|
||||
void PrintSummary() const;
|
||||
|
||||
private:
|
||||
std::vector<FrameStatistic> stats_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user