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

Side by Side Diff: webrtc/modules/video_processing/frame_preprocessor.cc

Issue 2065733003: Delete unused and almost unused frame-related methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Eliminate call to set_video_frame_buffer. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return nullptr; 89 return nullptr;
90 } 90 }
91 91
92 vd_->UpdateIncomingframe_rate(); 92 vd_->UpdateIncomingframe_rate();
93 if (vd_->DropFrame()) { 93 if (vd_->DropFrame()) {
94 return nullptr; 94 return nullptr;
95 } 95 }
96 96
97 const VideoFrame* current_frame = &frame; 97 const VideoFrame* current_frame = &frame;
98 if (denoiser_) { 98 if (denoiser_) {
99 rtc::scoped_refptr<I420Buffer>* denoised_frame = &denoised_buffer_[0]; 99 rtc::scoped_refptr<I420Buffer>* denoised_buffer = &denoised_buffer_[0];
100 rtc::scoped_refptr<I420Buffer>* denoised_frame_prev = &denoised_buffer_[1]; 100 rtc::scoped_refptr<I420Buffer>* denoised_buffer_prev = &denoised_buffer_[1];
101 // Swap the buffer to save one memcpy in DenoiseFrame. 101 // Swap the buffer to save one memcpy in DenoiseFrame.
102 if (denoised_frame_toggle_) { 102 if (denoised_frame_toggle_) {
103 denoised_frame = &denoised_buffer_[1]; 103 denoised_buffer = &denoised_buffer_[1];
104 denoised_frame_prev = &denoised_buffer_[0]; 104 denoised_buffer_prev = &denoised_buffer_[0];
105 } 105 }
106 // Invert the flag. 106 // Invert the flag.
107 denoised_frame_toggle_ ^= 1; 107 denoised_frame_toggle_ ^= 1;
108 denoiser_->DenoiseFrame(current_frame->video_frame_buffer(), denoised_frame, 108 denoiser_->DenoiseFrame(current_frame->video_frame_buffer(),
109 denoised_frame_prev, true); 109 denoised_buffer,
110 denoised_frame_.ShallowCopy(*current_frame); 110 denoised_buffer_prev, true);
111 denoised_frame_.set_video_frame_buffer(*denoised_frame); 111 denoised_frame_ = VideoFrame(*denoised_buffer,
112 current_frame->timestamp(),
113 current_frame->render_time_ms(),
114 current_frame->rotation());
112 current_frame = &denoised_frame_; 115 current_frame = &denoised_frame_;
113 } 116 }
114 117
115 if (spatial_resampler_->ApplyResample(current_frame->width(), 118 if (spatial_resampler_->ApplyResample(current_frame->width(),
116 current_frame->height())) { 119 current_frame->height())) {
117 if (spatial_resampler_->ResampleFrame(*current_frame, &resampled_frame_) != 120 if (spatial_resampler_->ResampleFrame(*current_frame, &resampled_frame_) !=
118 VPM_OK) { 121 VPM_OK) {
119 return nullptr; 122 return nullptr;
120 } 123 }
121 current_frame = &resampled_frame_; 124 current_frame = &resampled_frame_;
122 } 125 }
123 126
124 ++frame_cnt_; 127 ++frame_cnt_;
125 return current_frame; 128 return current_frame;
126 } 129 }
127 130
128 } // namespace webrtc 131 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_sender.cc ('k') | webrtc/modules/video_processing/spatial_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698