Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: webrtc/modules/video_coding/utility/quality_scaler.h

Issue 1830593003: Make QualityScaler more responsive to downgrades. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove extra height argument Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/utility/quality_scaler.h
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.h b/webrtc/modules/video_coding/utility/quality_scaler.h
index ebceb06893401eca490e40758f2355e444fbf475..34dda0e9f37a44fb8f6cfdf03b0837ee13c90386 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.h
+++ b/webrtc/modules/video_coding/utility/quality_scaler.h
@@ -30,7 +30,8 @@ class QualityScaler {
bool use_framerate_reduction,
int initial_bitrate_kbps,
int width,
- int height);
+ int height,
+ int fps);
void SetMinResolution(int min_width, int min_height);
void ReportFramerate(int framerate);
void ReportQP(int qp);
@@ -46,17 +47,22 @@ class QualityScaler {
void AdjustScale(bool up);
void UpdateTargetResolution(int frame_width, int frame_height);
void ClearSamples();
+ void UpdateSampleCounts();
Scaler scaler_;
VideoFrame scaled_frame_;
- size_t num_samples_;
+ size_t num_samples_downscale_;
+ size_t num_samples_upscale_;
+ int measure_seconds_upscale_;
+ MovingAverage<int> average_qp_upscale_;
+ MovingAverage<int> average_qp_downscale_;
+
int framerate_;
int target_framerate_;
int low_qp_threshold_;
int high_qp_threshold_;
MovingAverage<int> framedrop_percent_;
- MovingAverage<int> average_qp_;
Resolution res_;
int downscale_shift_;
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/modules/video_coding/utility/quality_scaler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698