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

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

Issue 2020593002: Refactor scaling. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trivial rebase. Created 4 years, 6 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 fe70393c21cdf32d8c11abc062f88acf3a372815..7176d4966eb46ed93c0506edd061c277d7e3f0e7 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.h
+++ b/webrtc/modules/video_coding/utility/quality_scaler.h
@@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QUALITY_SCALER_H_
-#include "webrtc/common_video/libyuv/include/scaler.h"
+#include "webrtc/common_video/include/i420_buffer_pool.h"
#include "webrtc/modules/video_coding/utility/moving_average.h"
namespace webrtc {
@@ -32,9 +32,10 @@ class QualityScaler {
void ReportFramerate(int framerate);
void ReportQP(int qp);
void ReportDroppedFrame();
- void OnEncodeFrame(const VideoFrame& frame);
+ void OnEncodeFrame(int width, int height);
Resolution GetScaledResolution() const;
- const VideoFrame& GetScaledFrame(const VideoFrame& frame);
+ rtc::scoped_refptr<VideoFrameBuffer> GetScaledBuffer(
+ const rtc::scoped_refptr<VideoFrameBuffer>& frame);
int downscale_shift() const { return downscale_shift_; }
// QP is obtained from VP8-bitstream for HW, so the QP corresponds to the
@@ -52,8 +53,7 @@ class QualityScaler {
void ClearSamples();
void UpdateSampleCounts();
- Scaler scaler_;
- VideoFrame scaled_frame_;
+ I420BufferPool pool_;
size_t num_samples_downscale_;
size_t num_samples_upscale_;
« no previous file with comments | « webrtc/modules/video_coding/utility/moving_average.h ('k') | webrtc/modules/video_coding/utility/quality_scaler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698