From b04d85e4fb4ef06233cca881abe07e209ae5a41b Mon Sep 17 00:00:00 2001 From: "mikhal@webrtc.org" Date: Thu, 11 Oct 2012 17:19:10 +0000 Subject: [PATCH] git-svn-id: http://webrtc.googlecode.com/svn/trunk@2916 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/common_video/libyuv/include/scaler.h | 5 ---- src/common_video/libyuv/scaler.cc | 29 ------------------------ 2 files changed, 34 deletions(-) diff --git a/src/common_video/libyuv/include/scaler.h b/src/common_video/libyuv/include/scaler.h index 8851194a79..8838844b65 100644 --- a/src/common_video/libyuv/include/scaler.h +++ b/src/common_video/libyuv/include/scaler.h @@ -16,7 +16,6 @@ #define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_ #include "common_video/libyuv/include/webrtc_libyuv.h" -#include "common_video/interface/i420_video_frame.h" #include "typedefs.h" namespace webrtc { @@ -48,13 +47,9 @@ class Scaler { // Return value: 0 - OK, // -1 - parameter error // -2 - scaler not set - // TODO(mikhal): Remove legacy implementation of old VideoFrame. int Scale(const VideoFrame& src_frame, VideoFrame* dst_frame); - int Scale(const I420VideoFrame& src_frame, - I420VideoFrame* dst_frame); - private: // Determine if the VideoTypes are currently supported. bool SupportedVideoType(VideoType src_video_type, diff --git a/src/common_video/libyuv/scaler.cc b/src/common_video/libyuv/scaler.cc index 5851b2a824..1304e0dfa4 100644 --- a/src/common_video/libyuv/scaler.cc +++ b/src/common_video/libyuv/scaler.cc @@ -84,35 +84,6 @@ int Scaler::Scale(const VideoFrame& src_frame, libyuv::FilterMode(method_)); } - -// TODO(mikhal): Add test to new function. Currently not used. -int Scaler::Scale(const I420VideoFrame& src_frame, - I420VideoFrame* dst_frame) { - assert(dst_frame); - // TODO(mikhal): Add isEmpty - // if (src_frame.Buffer() == NULL || src_frame.Length() == 0) - // return -1; - if (!set_) - return -2; - - // TODO(mikhal): Setting stride equal to width - should align. - dst_frame->CreateEmptyFrame(dst_width_, dst_height_, dst_width_ , - (dst_width_ + 1) / 2, (dst_width_ + 1) / 2); - - return libyuv::I420Scale(src_frame.buffer(kYPlane), src_frame.stride(kYPlane), - src_frame.buffer(kUPlane), src_frame.stride(kYPlane), - src_frame.buffer(kVPlane), src_frame.stride(kYPlane), - src_width_, src_height_, - dst_frame->buffer(kYPlane), - dst_frame->stride(kYPlane), - dst_frame->buffer(kYPlane), - dst_frame->stride(kYPlane), - dst_frame->buffer(kYPlane), - dst_frame->stride(kYPlane), - dst_width_, dst_height_, - libyuv::FilterMode(method_)); -} - // TODO(mikhal): Add support for more types. bool Scaler::SupportedVideoType(VideoType src_video_type, VideoType dst_video_type) {