diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn index 1ac7d9d63a..dcfd5fa619 100644 --- a/webrtc/modules/BUILD.gn +++ b/webrtc/modules/BUILD.gn @@ -522,8 +522,6 @@ if (rtc_include_tests) { "video_coding/video_receiver_unittest.cc", "video_coding/video_sender_unittest.cc", "video_processing/test/denoiser_test.cc", - "video_processing/test/video_processing_unittest.cc", - "video_processing/test/video_processing_unittest.h", ] if (apm_debug_dump) { diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn index 0adbfe86d4..b1ab8ecc5e 100644 --- a/webrtc/modules/video_processing/BUILD.gn +++ b/webrtc/modules/video_processing/BUILD.gn @@ -13,12 +13,6 @@ build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" rtc_static_library("video_processing") { sources = [ - "frame_preprocessor.cc", - "frame_preprocessor.h", - "include/video_processing.h", - "include/video_processing_defines.h", - "spatial_resampler.cc", - "spatial_resampler.h", "util/denoiser_filter.cc", "util/denoiser_filter.h", "util/denoiser_filter_c.cc", @@ -27,12 +21,8 @@ rtc_static_library("video_processing") { "util/noise_estimation.h", "util/skin_detection.cc", "util/skin_detection.h", - "video_decimator.cc", - "video_decimator.h", "video_denoiser.cc", "video_denoiser.h", - "video_processing_impl.cc", - "video_processing_impl.h", ] deps = [ diff --git a/webrtc/modules/video_processing/frame_preprocessor.cc b/webrtc/modules/video_processing/frame_preprocessor.cc deleted file mode 100644 index 8d6d8bbaa6..0000000000 --- a/webrtc/modules/video_processing/frame_preprocessor.cc +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "webrtc/modules/video_processing/frame_preprocessor.h" - -#include "webrtc/modules/video_processing/video_denoiser.h" - -namespace webrtc { - -VPMFramePreprocessor::VPMFramePreprocessor() - : resampled_frame_(), frame_cnt_(0) { - spatial_resampler_ = new VPMSimpleSpatialResampler(); - vd_ = new VPMVideoDecimator(); - EnableDenoising(false); -} - -VPMFramePreprocessor::~VPMFramePreprocessor() { - Reset(); - delete vd_; - delete spatial_resampler_; -} - -void VPMFramePreprocessor::Reset() { - vd_->Reset(); - spatial_resampler_->Reset(); - frame_cnt_ = 0; -} - -void VPMFramePreprocessor::EnableTemporalDecimation(bool enable) { - vd_->EnableTemporalDecimation(enable); -} - -void VPMFramePreprocessor::SetInputFrameResampleMode( - VideoFrameResampling resampling_mode) { - spatial_resampler_->SetInputFrameResampleMode(resampling_mode); -} - -int32_t VPMFramePreprocessor::SetTargetResolution(uint32_t width, - uint32_t height, - uint32_t frame_rate) { - if ((width == 0) || (height == 0) || (frame_rate == 0)) { - return VPM_PARAMETER_ERROR; - } - int32_t ret_val = 0; - ret_val = spatial_resampler_->SetTargetFrameSize(width, height); - - if (ret_val < 0) - return ret_val; - - vd_->SetTargetFramerate(frame_rate); - return VPM_OK; -} - -void VPMFramePreprocessor::UpdateIncomingframe_rate() { - vd_->UpdateIncomingframe_rate(); -} - -uint32_t VPMFramePreprocessor::GetDecimatedFrameRate() { - return vd_->GetDecimatedFrameRate(); -} - -uint32_t VPMFramePreprocessor::GetDecimatedWidth() const { - return spatial_resampler_->TargetWidth(); -} - -uint32_t VPMFramePreprocessor::GetDecimatedHeight() const { - return spatial_resampler_->TargetHeight(); -} - -void VPMFramePreprocessor::EnableDenoising(bool enable) { - if (enable) { - denoiser_.reset(new VideoDenoiser(true)); - } else { - denoiser_.reset(); - } -} - -const VideoFrame* VPMFramePreprocessor::PreprocessFrame( - const VideoFrame& frame) { - if (frame.IsZeroSize()) { - return nullptr; - } - - vd_->UpdateIncomingframe_rate(); - if (vd_->DropFrame()) { - return nullptr; - } - - const VideoFrame* current_frame = &frame; - if (denoiser_) { - denoised_frame_ = VideoFrame( - denoiser_->DenoiseFrame(current_frame->video_frame_buffer(), true), - current_frame->timestamp(), current_frame->render_time_ms(), - current_frame->rotation()); - current_frame = &denoised_frame_; - } - - if (spatial_resampler_->ApplyResample(current_frame->width(), - current_frame->height())) { - if (spatial_resampler_->ResampleFrame(*current_frame, &resampled_frame_) != - VPM_OK) { - return nullptr; - } - current_frame = &resampled_frame_; - } - - ++frame_cnt_; - return current_frame; -} - -} // namespace webrtc diff --git a/webrtc/modules/video_processing/frame_preprocessor.h b/webrtc/modules/video_processing/frame_preprocessor.h deleted file mode 100644 index 38875cdca7..0000000000 --- a/webrtc/modules/video_processing/frame_preprocessor.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ - -#include - -#include "webrtc/modules/video_processing/include/video_processing.h" -#include "webrtc/modules/video_processing/spatial_resampler.h" -#include "webrtc/modules/video_processing/video_decimator.h" -#include "webrtc/typedefs.h" -#include "webrtc/video_frame.h" - -namespace webrtc { - -class VideoDenoiser; - -// All pointers/members in this class are assumed to be protected by the class -// owner. -class VPMFramePreprocessor { - public: - VPMFramePreprocessor(); - ~VPMFramePreprocessor(); - - void Reset(); - - // Enable temporal decimation. - void EnableTemporalDecimation(bool enable); - - void SetInputFrameResampleMode(VideoFrameResampling resampling_mode); - - // Set target resolution: frame rate and dimension. - int32_t SetTargetResolution(uint32_t width, - uint32_t height, - uint32_t frame_rate); - - // Update incoming frame rate/dimension. - void UpdateIncomingframe_rate(); - - int32_t updateIncomingFrameSize(uint32_t width, uint32_t height); - - // Set decimated values: frame rate/dimension. - uint32_t GetDecimatedFrameRate(); - uint32_t GetDecimatedWidth() const; - uint32_t GetDecimatedHeight() const; - - // Preprocess output: - void EnableDenoising(bool enable); - const VideoFrame* PreprocessFrame(const VideoFrame& frame); - - private: - // The content does not change so much every frame, so to reduce complexity - // we can compute new content metrics every |kSkipFrameCA| frames. - enum { kSkipFrameCA = 2 }; - - VideoFrame denoised_frame_; - VideoFrame resampled_frame_; - VPMSpatialResampler* spatial_resampler_; - VPMVideoDecimator* vd_; - std::unique_ptr denoiser_; - uint32_t frame_cnt_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ diff --git a/webrtc/modules/video_processing/include/video_processing.h b/webrtc/modules/video_processing/include/video_processing.h deleted file mode 100644 index e2069ddbe7..0000000000 --- a/webrtc/modules/video_processing/include/video_processing.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_processing/include/video_processing_defines.h" -#include "webrtc/video_frame.h" - -// The module is largely intended to process video streams, except functionality -// provided by static functions which operate independent of previous frames. It -// is recommended, but not required that a unique instance be used for each -// concurrently processed stream. Similarly, it is recommended to call Reset() -// before switching to a new stream, but this is not absolutely required. -// -// The module provides basic thread safety by permitting only a single function -// to execute concurrently. - -namespace webrtc { - -class VideoProcessing { - public: - static VideoProcessing* Create(); - virtual ~VideoProcessing() {} - - // The following functions refer to the pre-processor unit within VPM. The - // pre-processor perfoms spatial/temporal decimation and content analysis on - // the frames prior to encoding. - - // Enable/disable temporal decimation - virtual void EnableTemporalDecimation(bool enable) = 0; - - virtual int32_t SetTargetResolution(uint32_t width, - uint32_t height, - uint32_t frame_rate) = 0; - - virtual uint32_t GetDecimatedFrameRate() = 0; - virtual uint32_t GetDecimatedWidth() const = 0; - virtual uint32_t GetDecimatedHeight() const = 0; - - // Set the spatial resampling settings of the VPM according to - // VideoFrameResampling. - virtual void SetInputFrameResampleMode( - VideoFrameResampling resampling_mode) = 0; - - virtual void EnableDenoising(bool enable) = 0; - virtual const VideoFrame* PreprocessFrame(const VideoFrame& frame) = 0; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_H_ diff --git a/webrtc/modules/video_processing/include/video_processing_defines.h b/webrtc/modules/video_processing/include/video_processing_defines.h deleted file mode 100644 index 9cc71bde27..0000000000 --- a/webrtc/modules/video_processing/include/video_processing_defines.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -/* - * video_processing_defines.h - * This header file includes the definitions used in the video processor module - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_DEFINES_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_DEFINES_H_ - -#include "webrtc/typedefs.h" - -namespace webrtc { - -// Error codes -#define VPM_OK 0 -#define VPM_GENERAL_ERROR -1 -#define VPM_MEMORY -2 -#define VPM_PARAMETER_ERROR -3 -#define VPM_SCALE_ERROR -4 -#define VPM_UNINITIALIZED -5 -#define VPM_UNIMPLEMENTED -6 - -enum VideoFrameResampling { - kNoRescaling, // Disables rescaling. - kFastRescaling, // Point filter. - kBiLinear, // Bi-linear interpolation. - kBox, // Box inteprolation. -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_INCLUDE_VIDEO_PROCESSING_DEFINES_H_ diff --git a/webrtc/modules/video_processing/spatial_resampler.cc b/webrtc/modules/video_processing/spatial_resampler.cc deleted file mode 100644 index 4d98605b2c..0000000000 --- a/webrtc/modules/video_processing/spatial_resampler.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "webrtc/modules/video_processing/spatial_resampler.h" - -namespace webrtc { - -VPMSimpleSpatialResampler::VPMSimpleSpatialResampler() - : resampling_mode_(kFastRescaling), target_width_(0), target_height_(0) {} - -VPMSimpleSpatialResampler::~VPMSimpleSpatialResampler() {} - -int32_t VPMSimpleSpatialResampler::SetTargetFrameSize(int32_t width, - int32_t height) { - if (resampling_mode_ == kNoRescaling) - return VPM_OK; - - if (width < 1 || height < 1) - return VPM_PARAMETER_ERROR; - - target_width_ = width; - target_height_ = height; - - return VPM_OK; -} - -void VPMSimpleSpatialResampler::SetInputFrameResampleMode( - VideoFrameResampling resampling_mode) { - resampling_mode_ = resampling_mode; -} - -void VPMSimpleSpatialResampler::Reset() { - resampling_mode_ = kFastRescaling; - target_width_ = 0; - target_height_ = 0; -} - -int32_t VPMSimpleSpatialResampler::ResampleFrame(const VideoFrame& inFrame, - VideoFrame* outFrame) { - // Don't copy if frame remains as is. - if (resampling_mode_ == kNoRescaling) { - return VPM_OK; - // Check if re-sampling is needed - } else if ((inFrame.width() == target_width_) && - (inFrame.height() == target_height_)) { - return VPM_OK; - } - - rtc::scoped_refptr scaled_buffer( - buffer_pool_.CreateBuffer(target_width_, target_height_)); - - scaled_buffer->CropAndScaleFrom(*inFrame.video_frame_buffer()); - - *outFrame = VideoFrame(scaled_buffer, - inFrame.timestamp(), - inFrame.render_time_ms(), - inFrame.rotation()); - - return VPM_OK; -} - -int32_t VPMSimpleSpatialResampler::TargetHeight() { - return target_height_; -} - -int32_t VPMSimpleSpatialResampler::TargetWidth() { - return target_width_; -} - -bool VPMSimpleSpatialResampler::ApplyResample(int32_t width, int32_t height) { - if ((width == target_width_ && height == target_height_) || - resampling_mode_ == kNoRescaling) - return false; - else - return true; -} - -} // namespace webrtc diff --git a/webrtc/modules/video_processing/spatial_resampler.h b/webrtc/modules/video_processing/spatial_resampler.h deleted file mode 100644 index 66f7bbc887..0000000000 --- a/webrtc/modules/video_processing/spatial_resampler.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_SPATIAL_RESAMPLER_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_SPATIAL_RESAMPLER_H_ - -#include "webrtc/typedefs.h" - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_processing/include/video_processing_defines.h" - -#include "webrtc/common_video/include/i420_buffer_pool.h" -#include "webrtc/video_frame.h" - -namespace webrtc { - -class VPMSpatialResampler { - public: - virtual ~VPMSpatialResampler() {} - virtual int32_t SetTargetFrameSize(int32_t width, int32_t height) = 0; - virtual void SetInputFrameResampleMode( - VideoFrameResampling resampling_mode) = 0; - virtual void Reset() = 0; - virtual int32_t ResampleFrame(const VideoFrame& inFrame, - VideoFrame* outFrame) = 0; - virtual int32_t TargetWidth() = 0; - virtual int32_t TargetHeight() = 0; - virtual bool ApplyResample(int32_t width, int32_t height) = 0; -}; - -class VPMSimpleSpatialResampler : public VPMSpatialResampler { - public: - VPMSimpleSpatialResampler(); - ~VPMSimpleSpatialResampler(); - virtual int32_t SetTargetFrameSize(int32_t width, int32_t height); - virtual void SetInputFrameResampleMode(VideoFrameResampling resampling_mode); - virtual void Reset(); - virtual int32_t ResampleFrame(const VideoFrame& inFrame, - VideoFrame* outFrame); - virtual int32_t TargetWidth(); - virtual int32_t TargetHeight(); - virtual bool ApplyResample(int32_t width, int32_t height); - - private: - VideoFrameResampling resampling_mode_; - int32_t target_width_; - int32_t target_height_; - I420BufferPool buffer_pool_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_SPATIAL_RESAMPLER_H_ diff --git a/webrtc/modules/video_processing/test/createTable.m b/webrtc/modules/video_processing/test/createTable.m deleted file mode 100644 index fe8777ee71..0000000000 --- a/webrtc/modules/video_processing/test/createTable.m +++ /dev/null @@ -1,179 +0,0 @@ -% Create the color enhancement look-up table and write it to -% file colorEnhancementTable.cpp. Copy contents of that file into -% the source file for the color enhancement function. - -clear -close all - - -% First, define the color enhancement in a normalized domain - -% Compander function is defined in three radial zones. -% 1. From 0 to radius r0, the compander function -% is a second-order polynomial intersecting the points (0,0) -% and (r0, r0), and with a slope B in (0,0). -% 2. From r0 to r1, the compander is a third-order polynomial -% intersecting the points (r0, r0) and (r1, r1), and with the -% same slope as the first part in the point (r0, r0) and slope -% equal to 1 in (r1, r1). -% 3. For radii larger than r1, the compander function is the -% unity scale function (no scaling at all). - -r0=0.07; % Dead zone radius (must be > 0) -r1=0.6; % Enhancement zone radius (must be > r0 and < 1) -B=0.2; % initial slope of compander function (between 0 and 1) - -x0=linspace(0,r0).'; % zone 1 -x1=linspace(r0,r1).'; % zone 2 -x2=linspace(r1,1).'; % zone 3 - -A=(1-B)/r0; -f0=A*x0.^2+B*x0; % compander function in zone 1 - -% equation system for finding second zone parameters -M=[r0^3 r0^2 r0 1; - 3*r0^2 2*r0 1 0; - 3*r1^2 2*r1 1 0; - r1^3 r1^2 r1 1]; -m=[A*r0^2+B*r0; 2*A*r0+B; 1; r1]; -% solve equations -theta=M\m; - -% compander function in zone 1 -f1=[x1.^3 x1.^2 x1 ones(size(x1))]*theta; - -x=[x0; x1; x2]; -f=[f0; f1; x2]; - -% plot it -figure(1) -plot(x,f,x,x,':') -xlabel('Normalized radius') -ylabel('Modified radius') - - -% Now, create the look-up table in the integer color space -[U,V]=meshgrid(0:255, 0:255); % U-V space -U0=U; -V0=V; - -% Conversion matrix from normalized YUV to RGB -T=[1 0 1.13983; 1 -0.39465 -0.58060; 1 2.03211 0]; -Ylum=0.5; - -figure(2) -Z(:,:,1)=Ylum + (U-127)/256*T(1,2) + (V-127)/256*T(1,3); -Z(:,:,2)=Ylum + (U-127)/256*T(2,2) + (V-127)/256*T(2,3); -Z(:,:,3)=Ylum + (U-127)/256*T(3,2) + (V-127)/256*T(3,3); -Z=max(Z,0); -Z=min(Z,1); -subplot(121) -image(Z); -axis square -axis off -set(gcf,'color','k') - -R = sqrt((U-127).^2 + (V-127).^2); -Rnorm = R/127; -RnormMod = Rnorm; -RnormMod(RnormMod==0)=1; % avoid division with zero - -% find indices to pixels in dead-zone (zone 1) -ix=find(Rnorm<=r0); -scaleMatrix = (A*Rnorm(ix).^2 + B*Rnorm(ix))./RnormMod(ix); -U(ix)=(U(ix)-127).*scaleMatrix+127; -V(ix)=(V(ix)-127).*scaleMatrix+127; - -% find indices to pixels in zone 2 -ix=find(Rnorm>r0 & Rnorm<=r1); -scaleMatrix = (theta(1)*Rnorm(ix).^3 + theta(2)*Rnorm(ix).^2 + ... - theta(3)*Rnorm(ix) + theta(4)) ./ RnormMod(ix); -U(ix)=(U(ix)-127).*scaleMatrix + 127; -V(ix)=(V(ix)-127).*scaleMatrix + 127; - -% round to integer values and saturate -U=round(U); -V=round(V); -U=max(min(U,255),0); -V=max(min(V,255),0); - -Z(:,:,1)=Ylum + (U-127)/256*T(1,2) + (V-127)/256*T(1,3); -Z(:,:,2)=Ylum + (U-127)/256*T(2,2) + (V-127)/256*T(2,3); -Z(:,:,3)=Ylum + (U-127)/256*T(3,2) + (V-127)/256*T(3,3); -Z=max(Z,0); -Z=min(Z,1); -subplot(122) -image(Z); -axis square -axis off - -figure(3) -subplot(121) -mesh(U-U0) -subplot(122) -mesh(V-V0) - - - -% Last, write to file -% Write only one matrix, since U=V' - -fid = fopen('../out/Debug/colorEnhancementTable.h','wt'); -if fid==-1 - error('Cannot open file colorEnhancementTable.cpp'); -end - -fprintf(fid,'//colorEnhancementTable.h\n\n'); -fprintf(fid,'//Copy the constant table to the appropriate header file.\n\n'); - -fprintf(fid,'//Table created with Matlab script createTable.m\n\n'); -fprintf(fid,'//Usage:\n'); -fprintf(fid,'// Umod=colorTable[U][V]\n'); -fprintf(fid,'// Vmod=colorTable[V][U]\n'); - -fprintf(fid,'static unsigned char colorTable[%i][%i] = {\n', size(U,1), size(U,2)); - -for u=1:size(U,2) - fprintf(fid,' {%i', U(1,u)); - for v=2:size(U,1) - fprintf(fid,', %i', U(v,u)); - end - fprintf(fid,'}'); - if u - -#include -#include - -#include "webrtc/base/keep_ref_until_done.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" -#include "webrtc/test/frame_utils.h" -#include "webrtc/test/testsupport/fileutils.h" - -namespace webrtc { - -namespace { - -// Define command line flag 'gen_files' (default value: false). -DEFINE_bool(gen_files, false, "Output files for visual inspection."); - -} // namespace - -static void PreprocessFrameAndVerify(const VideoFrame& source, - int target_width, - int target_height, - VideoProcessing* vpm, - const VideoFrame** out_frame); -static rtc::scoped_refptr CropBuffer( - rtc::scoped_refptr source_buffer, - int offset_x, - int offset_y, - int cropped_width, - int cropped_height); -// The |source_data| is cropped and scaled to |target_width| x |target_height|, -// and then scaled back to the expected cropped size. |expected_psnr| is used to -// verify basic quality, and is set to be ~0.1/0.05dB lower than actual PSNR -// verified under the same conditions. -static void TestSize( - const VideoFrame& source_frame, - const VideoFrameBuffer& cropped_source_buffer, - int target_width, - int target_height, - double expected_psnr, - VideoProcessing* vpm); -static void WriteProcessedFrameForVisualInspection(const VideoFrame& source, - const VideoFrame& processed); - -VideoProcessingTest::VideoProcessingTest() - : vp_(NULL), - source_file_(NULL), - width_(352), - half_width_((width_ + 1) / 2), - height_(288), - size_y_(width_ * height_), - size_uv_(half_width_ * ((height_ + 1) / 2)), - frame_length_(CalcBufferSize(kI420, width_, height_)) {} - -void VideoProcessingTest::SetUp() { - vp_ = VideoProcessing::Create(); - ASSERT_TRUE(vp_ != NULL); - - const std::string video_file = - webrtc::test::ResourcePath("foreman_cif", "yuv"); - source_file_ = fopen(video_file.c_str(), "rb"); - ASSERT_TRUE(source_file_ != NULL) - << "Cannot read source file: " + video_file + "\n"; -} - -void VideoProcessingTest::TearDown() { - if (source_file_ != NULL) { - ASSERT_EQ(0, fclose(source_file_)); - } - source_file_ = NULL; - delete vp_; - vp_ = NULL; -} - -#if defined(WEBRTC_IOS) -TEST_F(VideoProcessingTest, DISABLED_PreprocessorLogic) { -#else -TEST_F(VideoProcessingTest, PreprocessorLogic) { -#endif - // Disable temporal sampling (frame dropping). - vp_->EnableTemporalDecimation(false); - int resolution = 100; - EXPECT_EQ(VPM_OK, vp_->SetTargetResolution(resolution, resolution, 15)); - EXPECT_EQ(VPM_OK, vp_->SetTargetResolution(resolution, resolution, 30)); - // Disable spatial sampling. - vp_->SetInputFrameResampleMode(kNoRescaling); - EXPECT_EQ(VPM_OK, vp_->SetTargetResolution(resolution, resolution, 30)); - const VideoFrame* out_frame = NULL; - // Set rescaling => output frame != NULL. - vp_->SetInputFrameResampleMode(kFastRescaling); - - rtc::scoped_refptr buffer = - I420Buffer::Create(width_, height_, width_, half_width_, half_width_); - - // Clear video frame so DrMemory/Valgrind will allow reads of the buffer. - buffer->InitializeData(); - VideoFrame video_frame(buffer, 0, 0, webrtc::kVideoRotation_0); - - PreprocessFrameAndVerify(video_frame, resolution, resolution, vp_, - &out_frame); - // No rescaling=> output frame = NULL. - vp_->SetInputFrameResampleMode(kNoRescaling); - EXPECT_TRUE(vp_->PreprocessFrame(video_frame) != nullptr); -} - -#if defined(WEBRTC_IOS) -TEST_F(VideoProcessingTest, DISABLED_Resampler) { -#else -TEST_F(VideoProcessingTest, Resampler) { -#endif - enum { NumRuns = 1 }; - - int64_t min_runtime = 0; - int64_t total_runtime = 0; - - rewind(source_file_); - ASSERT_TRUE(source_file_ != NULL) << "Cannot read input file \n"; - - // no temporal decimation - vp_->EnableTemporalDecimation(false); - - // Reading test frame - rtc::scoped_refptr video_buffer( - test::ReadI420Buffer(width_, height_, source_file_)); - ASSERT_TRUE(video_buffer); - - for (uint32_t run_idx = 0; run_idx < NumRuns; run_idx++) { - // Initiate test timer. - const int64_t time_start = rtc::TimeNanos(); - - // Init the sourceFrame with a timestamp. - int64_t time_start_ms = time_start / rtc::kNumNanosecsPerMillisec; - VideoFrame video_frame(video_buffer, time_start_ms * 90, time_start_ms, - webrtc::kVideoRotation_0); - - // Test scaling to different sizes: source is of |width|/|height| = 352/288. - // Pure scaling: - TestSize(video_frame, *video_buffer, width_ / 4, height_ / 4, 25.2, vp_); - TestSize(video_frame, *video_buffer, width_ / 2, height_ / 2, 28.1, vp_); - // No resampling: - TestSize(video_frame, *video_buffer, width_, height_, -1, vp_); - TestSize(video_frame, *video_buffer, 2 * width_, 2 * height_, 32.2, vp_); - - // Scaling and cropping. The cropped source frame is the largest center - // aligned region that can be used from the source while preserving aspect - // ratio. - TestSize(video_frame, *CropBuffer(video_buffer, 0, 56, 352, 176), - 100, 50, 24.0, vp_); - TestSize(video_frame, *CropBuffer(video_buffer, 0, 30, 352, 225), - 400, 256, 31.3, vp_); - TestSize(video_frame, *CropBuffer(video_buffer, 68, 0, 216, 288), - 480, 640, 32.15, vp_); - TestSize(video_frame, *CropBuffer(video_buffer, 0, 12, 352, 264), - 960, 720, 32.2, vp_); - TestSize(video_frame, *CropBuffer(video_buffer, 0, 44, 352, 198), - 1280, 720, 32.15, vp_); - - // Upsampling to odd size. - TestSize(video_frame, *CropBuffer(video_buffer, 0, 26, 352, 233), - 501, 333, 32.05, vp_); - // Downsample to odd size. - TestSize(video_frame, *CropBuffer(video_buffer, 0, 34, 352, 219), - 281, 175, 29.3, vp_); - - // Stop timer. - const int64_t runtime = - (rtc::TimeNanos() - time_start) / rtc::kNumNanosecsPerMicrosec; - if (runtime < min_runtime || run_idx == 0) { - min_runtime = runtime; - } - total_runtime += runtime; - } - - printf("\nAverage run time = %d us / frame\n", - static_cast(total_runtime)); - printf("Min run time = %d us / frame\n\n", static_cast(min_runtime)); -} - -void PreprocessFrameAndVerify(const VideoFrame& source, - int target_width, - int target_height, - VideoProcessing* vpm, - const VideoFrame** out_frame) { - ASSERT_EQ(VPM_OK, vpm->SetTargetResolution(target_width, target_height, 30)); - *out_frame = vpm->PreprocessFrame(source); - EXPECT_TRUE(*out_frame != nullptr); - - // If no resizing is needed, expect the original frame. - if (target_width == source.width() && target_height == source.height()) { - EXPECT_EQ(&source, *out_frame); - return; - } - - // Verify the resampled frame. - EXPECT_EQ(source.render_time_ms(), (*out_frame)->render_time_ms()); - EXPECT_EQ(source.timestamp(), (*out_frame)->timestamp()); - EXPECT_EQ(target_width, (*out_frame)->width()); - EXPECT_EQ(target_height, (*out_frame)->height()); -} - -rtc::scoped_refptr CropBuffer( - rtc::scoped_refptr source_buffer, - int offset_x, - int offset_y, - int cropped_width, - int cropped_height) { - // Force even. - offset_x &= ~1; - offset_y &= ~1; - - size_t y_start = offset_x + offset_y * source_buffer->StrideY(); - size_t u_start = (offset_x / 2) + (offset_y / 2) * source_buffer->StrideU(); - size_t v_start = (offset_x / 2) + (offset_y / 2) * source_buffer->StrideV(); - - return rtc::scoped_refptr( - new rtc::RefCountedObject( - cropped_width, cropped_height, source_buffer->DataY() + y_start, - source_buffer->StrideY(), source_buffer->DataU() + u_start, - source_buffer->StrideU(), source_buffer->DataV() + v_start, - source_buffer->StrideV(), rtc::KeepRefUntilDone(source_buffer))); -} - -void TestSize(const VideoFrame& source_frame, - const VideoFrameBuffer& cropped_source, - int target_width, - int target_height, - double expected_psnr, - VideoProcessing* vpm) { - // Resample source_frame to out_frame. - const VideoFrame* out_frame = NULL; - vpm->SetInputFrameResampleMode(kBox); - PreprocessFrameAndVerify(source_frame, target_width, target_height, vpm, - &out_frame); - if (out_frame == NULL) - return; - WriteProcessedFrameForVisualInspection(source_frame, *out_frame); - - // Scale |resampled_source_frame| back to the source scale. - VideoFrame resampled_source_frame(*out_frame); - // Compute PSNR against the cropped source frame and check expectation. - PreprocessFrameAndVerify(resampled_source_frame, - cropped_source.width(), - cropped_source.height(), vpm, &out_frame); - WriteProcessedFrameForVisualInspection(resampled_source_frame, *out_frame); - - // Compute PSNR against the cropped source frame and check expectation. - double psnr = - I420PSNR(cropped_source, *out_frame->video_frame_buffer()); - EXPECT_GT(psnr, expected_psnr); - printf( - "PSNR: %f. PSNR is between source of size %d %d, and a modified " - "source which is scaled down/up to: %d %d, and back to source size \n", - psnr, source_frame.width(), source_frame.height(), target_width, - target_height); -} - -void WriteProcessedFrameForVisualInspection(const VideoFrame& source, - const VideoFrame& processed) { - // Skip if writing to files is not enabled. - if (!FLAGS_gen_files) - return; - // Write the processed frame to file for visual inspection. - std::ostringstream filename; - filename << webrtc::test::OutputPath() << "Resampler_from_" << source.width() - << "x" << source.height() << "_to_" << processed.width() << "x" - << processed.height() << "_30Hz_P420.yuv"; - std::cout << "Watch " << filename.str() << " and verify that it is okay." - << std::endl; - FILE* stand_alone_file = fopen(filename.str().c_str(), "wb"); - if (PrintVideoFrame(processed, stand_alone_file) < 0) - std::cerr << "Failed to write: " << filename.str() << std::endl; - if (stand_alone_file) - fclose(stand_alone_file); -} - -} // namespace webrtc diff --git a/webrtc/modules/video_processing/test/video_processing_unittest.h b/webrtc/modules/video_processing/test/video_processing_unittest.h deleted file mode 100644 index 5a737acefe..0000000000 --- a/webrtc/modules/video_processing/test/video_processing_unittest.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ - -#include - -#include "webrtc/modules/video_processing/include/video_processing.h" -#include "webrtc/system_wrappers/include/trace.h" -#include "webrtc/test/gtest.h" -#include "webrtc/test/testsupport/fileutils.h" - -namespace webrtc { - -class VideoProcessingTest : public ::testing::Test { - protected: - VideoProcessingTest(); - virtual void SetUp(); - virtual void TearDown(); - static void SetUpTestCase() { - Trace::CreateTrace(); - std::string trace_file = webrtc::test::OutputPath() + "VPMTrace.txt"; - ASSERT_EQ(0, Trace::SetTraceFile(trace_file.c_str())); - } - static void TearDownTestCase() { Trace::ReturnTrace(); } - VideoProcessing* vp_; - FILE* source_file_; - const int width_; - const int half_width_; - const int height_; - const int size_y_; - const int size_uv_; - const size_t frame_length_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_TEST_VIDEO_PROCESSING_UNITTEST_H_ diff --git a/webrtc/modules/video_processing/test/writeYUV420file.m b/webrtc/modules/video_processing/test/writeYUV420file.m deleted file mode 100644 index 359445009b..0000000000 --- a/webrtc/modules/video_processing/test/writeYUV420file.m +++ /dev/null @@ -1,22 +0,0 @@ -function writeYUV420file(filename, Y, U, V) -% writeYUV420file(filename, Y, U, V) - -fid = fopen(filename,'wb'); -if fid==-1 - error(['Cannot open file ' filename]); -end - -numFrames=size(Y,3); - -for k=1:numFrames - % Write luminance - fwrite(fid,uint8(Y(:,:,k).'), 'uchar'); - - % Write U channel - fwrite(fid,uint8(U(:,:,k).'), 'uchar'); - - % Write V channel - fwrite(fid,uint8(V(:,:,k).'), 'uchar'); -end - -fclose(fid); diff --git a/webrtc/modules/video_processing/util/denoiser_filter.h b/webrtc/modules/video_processing/util/denoiser_filter.h index fa1415b09a..2fdcca03dd 100644 --- a/webrtc/modules/video_processing/util/denoiser_filter.h +++ b/webrtc/modules/video_processing/util/denoiser_filter.h @@ -15,7 +15,6 @@ #include #include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_processing/include/video_processing_defines.h" namespace webrtc { diff --git a/webrtc/modules/video_processing/util/noise_estimation.h b/webrtc/modules/video_processing/util/noise_estimation.h index 294bfb3a73..f414a47872 100644 --- a/webrtc/modules/video_processing/util/noise_estimation.h +++ b/webrtc/modules/video_processing/util/noise_estimation.h @@ -14,7 +14,6 @@ #include #include "webrtc/modules/include/module_common_types.h" -#include "webrtc/modules/video_processing/include/video_processing_defines.h" #include "webrtc/modules/video_processing/util/denoiser_filter.h" namespace webrtc { diff --git a/webrtc/modules/video_processing/video_decimator.cc b/webrtc/modules/video_processing/video_decimator.cc deleted file mode 100644 index c6623fa836..0000000000 --- a/webrtc/modules/video_processing/video_decimator.cc +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "webrtc/base/checks.h" -#include "webrtc/base/timeutils.h" -#include "webrtc/modules/video_processing/include/video_processing.h" -#include "webrtc/modules/video_processing/video_decimator.h" - -#define VD_MIN(a, b) ((a) < (b)) ? (a) : (b) - -namespace webrtc { - -VPMVideoDecimator::VPMVideoDecimator() { - Reset(); -} - -VPMVideoDecimator::~VPMVideoDecimator() {} - -void VPMVideoDecimator::Reset() { - overshoot_modifier_ = 0; - drop_count_ = 0; - keep_count_ = 0; - target_frame_rate_ = 30; - incoming_frame_rate_ = 0.0f; - memset(incoming_frame_times_, 0, sizeof(incoming_frame_times_)); - enable_temporal_decimation_ = true; -} - -void VPMVideoDecimator::EnableTemporalDecimation(bool enable) { - enable_temporal_decimation_ = enable; -} - -void VPMVideoDecimator::SetTargetFramerate(int frame_rate) { - RTC_DCHECK(frame_rate); - target_frame_rate_ = frame_rate; -} - -bool VPMVideoDecimator::DropFrame() { - if (!enable_temporal_decimation_) - return false; - - if (incoming_frame_rate_ <= 0) - return false; - - const uint32_t incomingframe_rate = - static_cast(incoming_frame_rate_ + 0.5f); - - if (target_frame_rate_ == 0) - return true; - - bool drop = false; - if (incomingframe_rate > target_frame_rate_) { - int32_t overshoot = - overshoot_modifier_ + (incomingframe_rate - target_frame_rate_); - if (overshoot < 0) { - overshoot = 0; - overshoot_modifier_ = 0; - } - - if (overshoot && 2 * overshoot < (int32_t)incomingframe_rate) { - if (drop_count_) { // Just got here so drop to be sure. - drop_count_ = 0; - return true; - } - const uint32_t dropVar = incomingframe_rate / overshoot; - - if (keep_count_ >= dropVar) { - drop = true; - overshoot_modifier_ = -((int32_t)incomingframe_rate % overshoot) / 3; - keep_count_ = 1; - } else { - keep_count_++; - } - } else { - keep_count_ = 0; - const uint32_t dropVar = overshoot / target_frame_rate_; - if (drop_count_ < dropVar) { - drop = true; - drop_count_++; - } else { - overshoot_modifier_ = overshoot % target_frame_rate_; - drop = false; - drop_count_ = 0; - } - } - } - return drop; -} - -uint32_t VPMVideoDecimator::GetDecimatedFrameRate() { - ProcessIncomingframe_rate(rtc::TimeMillis()); - if (!enable_temporal_decimation_) { - return static_cast(incoming_frame_rate_ + 0.5f); - } - return VD_MIN(target_frame_rate_, - static_cast(incoming_frame_rate_ + 0.5f)); -} - -uint32_t VPMVideoDecimator::Inputframe_rate() { - ProcessIncomingframe_rate(rtc::TimeMillis()); - return static_cast(incoming_frame_rate_ + 0.5f); -} - -void VPMVideoDecimator::UpdateIncomingframe_rate() { - int64_t now = rtc::TimeMillis(); - if (incoming_frame_times_[0] == 0) { - // First no shift. - } else { - // Shift. - for (int i = kFrameCountHistory_size - 2; i >= 0; i--) { - incoming_frame_times_[i + 1] = incoming_frame_times_[i]; - } - } - incoming_frame_times_[0] = now; - ProcessIncomingframe_rate(now); -} - -void VPMVideoDecimator::ProcessIncomingframe_rate(int64_t now) { - int32_t num = 0; - int32_t nrOfFrames = 0; - for (num = 1; num < (kFrameCountHistory_size - 1); num++) { - // Don't use data older than 2sec. - if (incoming_frame_times_[num] <= 0 || - now - incoming_frame_times_[num] > kFrameHistoryWindowMs) { - break; - } else { - nrOfFrames++; - } - } - if (num > 1) { - int64_t diff = now - incoming_frame_times_[num - 1]; - incoming_frame_rate_ = 1.0; - if (diff > 0) { - incoming_frame_rate_ = nrOfFrames * 1000.0f / static_cast(diff); - } - } else { - incoming_frame_rate_ = static_cast(nrOfFrames); - } -} - -} // namespace webrtc diff --git a/webrtc/modules/video_processing/video_decimator.h b/webrtc/modules/video_processing/video_decimator.h deleted file mode 100644 index 1b871df8c3..0000000000 --- a/webrtc/modules/video_processing/video_decimator.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DECIMATOR_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DECIMATOR_H_ - -#include "webrtc/modules/include/module_common_types.h" -#include "webrtc/typedefs.h" - -namespace webrtc { - -class VPMVideoDecimator { - public: - VPMVideoDecimator(); - ~VPMVideoDecimator(); - - void Reset(); - - void EnableTemporalDecimation(bool enable); - - void SetTargetFramerate(int frame_rate); - - bool DropFrame(); - - void UpdateIncomingframe_rate(); - - // Get Decimated Frame Rate/Dimensions. - uint32_t GetDecimatedFrameRate(); - - // Get input frame rate. - uint32_t Inputframe_rate(); - - private: - void ProcessIncomingframe_rate(int64_t now); - - enum { kFrameCountHistory_size = 90 }; - enum { kFrameHistoryWindowMs = 2000 }; - - // Temporal decimation. - int32_t overshoot_modifier_; - uint32_t drop_count_; - uint32_t keep_count_; - uint32_t target_frame_rate_; - float incoming_frame_rate_; - int64_t incoming_frame_times_[kFrameCountHistory_size]; - bool enable_temporal_decimation_; -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DECIMATOR_H_ diff --git a/webrtc/modules/video_processing/video_processing_impl.cc b/webrtc/modules/video_processing/video_processing_impl.cc deleted file mode 100644 index 86f75bf239..0000000000 --- a/webrtc/modules/video_processing/video_processing_impl.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "webrtc/modules/video_processing/video_processing_impl.h" - -#include - -#include "webrtc/base/checks.h" -#include "webrtc/base/logging.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" - -namespace webrtc { - -VideoProcessing* VideoProcessing::Create() { - return new VideoProcessingImpl(); -} - -VideoProcessingImpl::VideoProcessingImpl() {} -VideoProcessingImpl::~VideoProcessingImpl() {} - -void VideoProcessingImpl::EnableTemporalDecimation(bool enable) { - rtc::CritScope mutex(&mutex_); - frame_pre_processor_.EnableTemporalDecimation(enable); -} - -void VideoProcessingImpl::SetInputFrameResampleMode( - VideoFrameResampling resampling_mode) { - rtc::CritScope cs(&mutex_); - frame_pre_processor_.SetInputFrameResampleMode(resampling_mode); -} - -int32_t VideoProcessingImpl::SetTargetResolution(uint32_t width, - uint32_t height, - uint32_t frame_rate) { - rtc::CritScope cs(&mutex_); - return frame_pre_processor_.SetTargetResolution(width, height, frame_rate); -} - -uint32_t VideoProcessingImpl::GetDecimatedFrameRate() { - rtc::CritScope cs(&mutex_); - return frame_pre_processor_.GetDecimatedFrameRate(); -} - -uint32_t VideoProcessingImpl::GetDecimatedWidth() const { - rtc::CritScope cs(&mutex_); - return frame_pre_processor_.GetDecimatedWidth(); -} - -uint32_t VideoProcessingImpl::GetDecimatedHeight() const { - rtc::CritScope cs(&mutex_); - return frame_pre_processor_.GetDecimatedHeight(); -} - -void VideoProcessingImpl::EnableDenoising(bool enable) { - rtc::CritScope cs(&mutex_); - frame_pre_processor_.EnableDenoising(enable); -} - -const VideoFrame* VideoProcessingImpl::PreprocessFrame( - const VideoFrame& frame) { - rtc::CritScope mutex(&mutex_); - return frame_pre_processor_.PreprocessFrame(frame); -} - -} // namespace webrtc diff --git a/webrtc/modules/video_processing/video_processing_impl.h b/webrtc/modules/video_processing/video_processing_impl.h deleted file mode 100644 index 21e23c904d..0000000000 --- a/webrtc/modules/video_processing/video_processing_impl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ -#define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ - -#include "webrtc/base/criticalsection.h" -#include "webrtc/modules/video_processing/include/video_processing.h" -#include "webrtc/modules/video_processing/frame_preprocessor.h" - -namespace webrtc { -class CriticalSectionWrapper; - -class VideoProcessingImpl : public VideoProcessing { - public: - VideoProcessingImpl(); - ~VideoProcessingImpl() override; - - // Implements VideoProcessing. - void EnableTemporalDecimation(bool enable) override; - void SetInputFrameResampleMode(VideoFrameResampling resampling_mode) override; - int32_t SetTargetResolution(uint32_t width, - uint32_t height, - uint32_t frame_rate) override; - uint32_t GetDecimatedFrameRate() override; - uint32_t GetDecimatedWidth() const override; - uint32_t GetDecimatedHeight() const override; - void EnableDenoising(bool enable) override; - const VideoFrame* PreprocessFrame(const VideoFrame& frame) override; - - private: - rtc::CriticalSection mutex_; - VPMFramePreprocessor frame_pre_processor_ GUARDED_BY(mutex_); -}; - -} // namespace webrtc - -#endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_PROCESSING_IMPL_H_ diff --git a/webrtc/video/video_stream_decoder.cc b/webrtc/video/video_stream_decoder.cc index 28b11b9c48..7a00e42093 100644 --- a/webrtc/video/video_stream_decoder.cc +++ b/webrtc/video/video_stream_decoder.cc @@ -18,7 +18,6 @@ #include "webrtc/base/logging.h" #include "webrtc/common_video/include/frame_callback.h" #include "webrtc/modules/video_coding/video_coding_impl.h" -#include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/system_wrappers/include/metrics.h" #include "webrtc/video/call_stats.h" #include "webrtc/video/payload_router.h" diff --git a/webrtc/video/vie_encoder.h b/webrtc/video/vie_encoder.h index 12669622d1..ae9f0bae5b 100644 --- a/webrtc/video/vie_encoder.h +++ b/webrtc/video/vie_encoder.h @@ -27,7 +27,6 @@ #include "webrtc/modules/video_coding/include/video_coding_defines.h" #include "webrtc/modules/video_coding/utility/quality_scaler.h" #include "webrtc/modules/video_coding/video_coding_impl.h" -#include "webrtc/modules/video_processing/include/video_processing.h" #include "webrtc/system_wrappers/include/atomic32.h" #include "webrtc/video/overuse_frame_detector.h" #include "webrtc/video_encoder.h"