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

Unified Diff: media/blink/skcanvas_video_renderer.cc

Issue 1321023006: J420ToABGR for 1 step Android J420 conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deps roll pushed. this cl is just the skcanvas call for j420 now Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/skcanvas_video_renderer.cc
diff --git a/media/blink/skcanvas_video_renderer.cc b/media/blink/skcanvas_video_renderer.cc
index 0f9fdac7401b361feeef1144e3dc084f5a522d6b..2559b825b86b27152ecf701949f547eab9d0839e 100644
--- a/media/blink/skcanvas_video_renderer.cc
+++ b/media/blink/skcanvas_video_renderer.cc
@@ -27,11 +27,13 @@
#define LIBYUV_I420_TO_ARGB libyuv::I420ToARGB
#define LIBYUV_I422_TO_ARGB libyuv::I422ToARGB
#define LIBYUV_I420ALPHA_TO_ARGB libyuv::I420AlphaToARGB
+#define LIBYUV_J420_TO_ARGB libyuv::J420ToARGB
#elif SK_R32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16 && \
SK_A32_SHIFT == 24
#define LIBYUV_I420_TO_ARGB libyuv::I420ToABGR
#define LIBYUV_I422_TO_ARGB libyuv::I422ToABGR
#define LIBYUV_I420ALPHA_TO_ARGB libyuv::I420AlphaToABGR
+#define LIBYUV_J420_TO_ARGB libyuv::J420ToABGR
#else
#error Unexpected Skia ARGB_8888 layout!
#endif
@@ -420,7 +422,7 @@ void SkCanvasVideoRenderer::ConvertVideoFrameToRGBPixels(
case PIXEL_FORMAT_YV12:
case PIXEL_FORMAT_I420:
if (CheckColorSpace(video_frame, COLOR_SPACE_JPEG)) {
- libyuv::J420ToARGB(
+ LIBYUV_J420_TO_ARGB(
video_frame->visible_data(VideoFrame::kYPlane),
video_frame->stride(VideoFrame::kYPlane),
video_frame->visible_data(VideoFrame::kUPlane),
@@ -431,15 +433,6 @@ void SkCanvasVideoRenderer::ConvertVideoFrameToRGBPixels(
row_bytes,
video_frame->visible_rect().width(),
video_frame->visible_rect().height());
-#if SK_R32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16 && \
- SK_A32_SHIFT == 24
- libyuv::ARGBToABGR(static_cast<uint8*>(rgb_pixels),
- row_bytes,
- static_cast<uint8*>(rgb_pixels),
- row_bytes,
- video_frame->visible_rect().width(),
- video_frame->visible_rect().height());
-#endif
} else if (CheckColorSpace(video_frame, COLOR_SPACE_HD_REC709)) {
ConvertYUVToRGB32(video_frame->visible_data(VideoFrame::kYPlane),
video_frame->visible_data(VideoFrame::kUPlane),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698