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

Unified Diff: content/renderer/pepper/pepper_media_stream_video_track_host.cc

Issue 2694113002: Delete media/base/yuv_convert and dependents. Prefer libyuv. (Closed)
Patch Set: Fix media_unittests. Created 3 years, 10 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
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device_unittest.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_media_stream_video_track_host.cc
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.cc b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
index f536ef3ff515b377a5a25428776d4dcb09efe44c..bbded169a288bbc254843f120c2534356fd0a6f5 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.cc
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
@@ -15,7 +15,6 @@
#include "content/renderer/media/media_stream_video_track.h"
#include "media/base/bind_to_current_loop.h"
#include "media/base/video_util.h"
-#include "media/base/yuv_convert.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/ppb_media_stream_video_track.h"
#include "ppapi/c/ppb_video_frame.h"
@@ -110,20 +109,17 @@ void ConvertFromMediaVideoFrame(const scoped_refptr<media::VideoFrame>& src,
dst_size.width(),
dst_size.height());
} else {
- media::ScaleYUVToRGB32(src->visible_data(VideoFrame::kYPlane),
- src->visible_data(VideoFrame::kUPlane),
- src->visible_data(VideoFrame::kVPlane),
- dst,
- src->visible_rect().width(),
- src->visible_rect().height(),
- dst_size.width(),
- dst_size.height(),
- src->stride(VideoFrame::kYPlane),
- src->stride(VideoFrame::kUPlane),
- dst_size.width() * 4,
- media::YV12,
- media::ROTATE_0,
- media::FILTER_BILINEAR);
+ libyuv::YUVToARGBScaleClip(
+ src->visible_data(VideoFrame::kYPlane),
+ src->stride(VideoFrame::kYPlane),
+ src->visible_data(VideoFrame::kUPlane),
+ src->stride(VideoFrame::kUPlane),
+ src->visible_data(VideoFrame::kVPlane),
+ src->stride(VideoFrame::kVPlane), libyuv::FOURCC_YV12,
+ src->visible_rect().width(), src->visible_rect().height(), dst,
+ dst_size.width() * 4, libyuv::FOURCC_ARGB, dst_size.width(),
+ dst_size.height(), 0, 0, dst_size.width(), dst_size.height(),
+ kFilterMode);
}
} else if (dst_format == PP_VIDEOFRAME_FORMAT_YV12 ||
dst_format == PP_VIDEOFRAME_FORMAT_I420) {
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device_unittest.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698