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

Unified Diff: content/renderer/media/webrtc/video_destination_handler.cc

Issue 663183002: ppapi: Change endianness in libyuv calls, from BGRA to ARGB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | content/renderer/pepper/pepper_video_source_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/video_destination_handler.cc
diff --git a/content/renderer/media/webrtc/video_destination_handler.cc b/content/renderer/media/webrtc/video_destination_handler.cc
index 160537165d7912e4c514f6d49272f9dd60d0adde..a5f9296386cc06de0ba19514b459bb8af9aa9ee6 100644
--- a/content/renderer/media/webrtc/video_destination_handler.cc
+++ b/content/renderer/media/webrtc/video_destination_handler.cc
@@ -101,6 +101,8 @@ void PpFrameWriter::FrameWriterDelegate::DeliverFrame(
<< "The image_data's mapped bitmap is NULL.";
return;
}
+ // We only support PP_IMAGEDATAFORMAT_BGRA_PREMUL at the moment.
+ DCHECK(image_data->format() == PP_IMAGEDATAFORMAT_BGRA_PREMUL);
fbarchard 2014/10/21 01:02:57 FYI our effects code is normally unattenuated.
io_message_loop_->PostTaskAndReply(
FROM_HERE,
base::Bind(&FrameWriterDelegate::DeliverFrameOnIO, this,
@@ -153,7 +155,7 @@ void PpFrameWriter::FrameWriterDelegate::DeliverFrameOnIO(
MediaStreamVideoSource::kUnknownFrameRate,
media::PIXEL_FORMAT_YV12);
- libyuv::BGRAToI420(data,
+ libyuv::ARGBToI420(data,
fbarchard 2014/10/21 01:02:57 note that this has immediate performance benefit -
stride,
new_frame->data(media::VideoFrame::kYPlane),
new_frame->stride(media::VideoFrame::kYPlane),
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_video_source_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698