2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
16 #include "webrtc/common_video/libyuv/include/scaler.h"
27 void Init(int max_qp);
29 void ReportFramerate(int framerate);
30 void ReportEncodedFrame(int qp);
31 void ReportDroppedFrame();
33 Resolution GetScaledResolution(const I420VideoFrame& frame);
34 const I420VideoFrame& GetScaledFrame(const I420VideoFrame& frame);
40 void AddSample(int sample);
41 bool GetAverage(size_t num_samples, int* average);
46 std::list<int> samples_;
49 void AdjustScale(bool up);
53 I420VideoFrame scaled_frame_;
56 int low_qp_threshold_;
57 MovingAverage average_qp_;
58 MovingAverage framedrop_percent_;
65 #endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_