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

Unified Diff: webrtc/modules/video_processing/frame_preprocessor.cc

Issue 1917323002: Remove remaining quality-analysis (QM). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 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_processing/frame_preprocessor.cc
diff --git a/webrtc/modules/video_processing/frame_preprocessor.cc b/webrtc/modules/video_processing/frame_preprocessor.cc
index 7393af856bb8d685c140adb53dec2db89c74ff90..100cdb519ab349a7cfbf6fa00f4a42d8f8fd6ead 100644
--- a/webrtc/modules/video_processing/frame_preprocessor.cc
+++ b/webrtc/modules/video_processing/frame_preprocessor.cc
@@ -15,12 +15,8 @@
namespace webrtc {
VPMFramePreprocessor::VPMFramePreprocessor()
- : content_metrics_(nullptr),
- resampled_frame_(),
- enable_ca_(false),
- frame_cnt_(0) {
+ : resampled_frame_(), frame_cnt_(0) {
spatial_resampler_ = new VPMSimpleSpatialResampler();
- ca_ = new VPMContentAnalysis(true);
vd_ = new VPMVideoDecimator();
EnableDenoising(false);
denoised_frame_toggle_ = 0;
@@ -28,17 +24,13 @@ VPMFramePreprocessor::VPMFramePreprocessor()
VPMFramePreprocessor::~VPMFramePreprocessor() {
Reset();
- delete ca_;
delete vd_;
delete spatial_resampler_;
}
void VPMFramePreprocessor::Reset() {
- ca_->Release();
vd_->Reset();
- content_metrics_ = nullptr;
spatial_resampler_->Reset();
- enable_ca_ = false;
frame_cnt_ = 0;
}
@@ -46,10 +38,6 @@ void VPMFramePreprocessor::EnableTemporalDecimation(bool enable) {
vd_->EnableTemporalDecimation(enable);
}
-void VPMFramePreprocessor::EnableContentAnalysis(bool enable) {
- enable_ca_ = enable;
-}
-
void VPMFramePreprocessor::SetInputFrameResampleMode(
VideoFrameResampling resampling_mode) {
spatial_resampler_->SetInputFrameResampleMode(resampling_mode);
@@ -131,18 +119,8 @@ const VideoFrame* VPMFramePreprocessor::PreprocessFrame(
current_frame = &resampled_frame_;
}
- // Perform content analysis on the frame to be encoded.
- if (enable_ca_ && frame_cnt_ % kSkipFrameCA == 0) {
- // Compute new metrics every |kSkipFramesCA| frames, starting with
- // the first frame.
- content_metrics_ = ca_->ComputeContentMetrics(*current_frame);
- }
++frame_cnt_;
return current_frame;
}
-VideoContentMetrics* VPMFramePreprocessor::GetContentMetrics() const {
- return content_metrics_;
-}
-
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_processing/frame_preprocessor.h ('k') | webrtc/modules/video_processing/include/video_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698