Rename spatial/temporal index variables and fields in videoprocessor.

This fixes inconsistency in names of variables and fields which
represent spatial/temporal index of layer:
simulcast_svc_idx -> spatial_idx
spatial_layer_idx -> spatial_idx
temporal_layer_idx -> temporal_idx

Also, this adds printing of spatial/temporal index and target bitrate
to RD report.

Bug: none
Change-Id: Ic4dfdadc57a1577bb3d35d1782a152a9dbef0280
Reviewed-on: https://webrtc-review.googlesource.com/69981
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22869}
This commit is contained in:
Sergey Silkin
2018-04-15 21:06:16 +02:00
committed by Commit Bot
parent eb99d84341
commit bc20fe1221
4 changed files with 126 additions and 141 deletions

View File

@ -40,8 +40,8 @@ struct FrameStatistics {
webrtc::FrameType frame_type = kVideoFrameDelta;
// Layering.
size_t temporal_layer_idx = 0;
size_t simulcast_svc_idx = 0;
size_t spatial_idx = 0;
size_t temporal_idx = 0;
bool inter_layer_predicted = false;
// H264 specific.
@ -72,8 +72,8 @@ struct VideoStatistics {
size_t target_bitrate_kbps = 0;
float input_framerate_fps = 0.0f;
size_t spatial_layer_idx = 0;
size_t temporal_layer_idx = 0;
size_t spatial_idx = 0;
size_t temporal_idx = 0;
size_t width = 0;
size_t height = 0;
@ -117,12 +117,11 @@ class Stats {
~Stats() = default;
// Creates a FrameStatistics for the next frame to be processed.
FrameStatistics* AddFrame(size_t timestamp, size_t spatial_layer_idx);
FrameStatistics* AddFrame(size_t timestamp, size_t spatial_idx);
// Returns the FrameStatistics corresponding to |frame_number| or |timestamp|.
FrameStatistics* GetFrame(size_t frame_number, size_t spatial_layer_idx);
FrameStatistics* GetFrameWithTimestamp(size_t timestamp,
size_t spatial_layer_idx);
FrameStatistics* GetFrame(size_t frame_number, size_t spatial_idx);
FrameStatistics* GetFrameWithTimestamp(size_t timestamp, size_t spatial_idx);
std::vector<VideoStatistics> SliceAndCalcLayerVideoStatistic(
size_t first_frame_num,
@ -133,25 +132,25 @@ class Stats {
void PrintFrameStatistics();
size_t Size(size_t spatial_layer_idx);
size_t Size(size_t spatial_idx);
void Clear();
private:
FrameStatistics AggregateFrameStatistic(size_t frame_num,
size_t spatial_layer_idx,
size_t spatial_idx,
bool aggregate_independent_layers);
size_t CalcLayerTargetBitrateKbps(size_t first_frame_num,
size_t last_frame_num,
size_t spatial_layer_idx,
size_t temporal_layer_idx,
size_t spatial_idx,
size_t temporal_idx,
bool aggregate_independent_layers);
VideoStatistics SliceAndCalcVideoStatistic(size_t first_frame_num,
size_t last_frame_num,
size_t spatial_layer_idx,
size_t temporal_layer_idx,
size_t spatial_idx,
size_t temporal_idx,
bool aggregate_independent_layers);
void GetNumberOfEncodedLayers(size_t first_frame_num,