New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627983 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

ImageCapture.grabFrame()/<video>.captureStream() returns colour channels swapped on Android

Project Member Reported by mcasas@chromium.org, Jul 13 2016

Issue description

- Open https://simpl.info/ic in Canary on Android and start
 either camera. I'm using a N5X.
- click on grabFrame()
- check the resulting picture: looks blueish, because the
 UV channels are swapped in Android (thinks is I420, when 
 it is YV12 or viceversa).
 

Comment 1 by mcasas@chromium.org, Jul 13 2016

Cc: emir...@chromium.org
Components: Blink>MediaStream>CaptureFromElement
Summary: ImageCapture.grabFrame()/<video>.captureStream() returns colour channels swapped on Android (was: ImageCapture grabFrame() on Android returns colour channels swapped)
Same problem occurs for <video>.captureStream(), see 
attached screenshot on Canary 54.0.2791.0.
2360220812122193484-account_id=5.png
739 KB View Download
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fce8860058fcbfab7c49d674d578dea1c180ac95

commit fce8860058fcbfab7c49d674d578dea1c180ac95
Author: mcasas <mcasas@chromium.org>
Date: Thu Jul 14 21:18:41 2016

ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android

This CL corrects the code to use the pixel format: must use
ABGR instead of the incorrect ARGB, for the JS APIs
mentioned in the title and for Android platform.

BUG= 627983 

Verified on N7.2, N6.

TEST= two parts, e.g. on a N5X or N6 phone:
1) Navigate to [1], open either camera, click on
grabFrame() and verify correct colours
2) Navigate to [2], click on "Start <video> playback",
then on "Create Stream..." and then on "Play back..."
and verify correct colours.

[1] https://simpl.info/ic
[2] https://rawgit.com/Miguelao/demos/master/videoelementcapture.html

Review-Url: https://codereview.chromium.org/2150453003
Cr-Commit-Position: refs/heads/master@{#405572}

[modify] https://crrev.com/fce8860058fcbfab7c49d674d578dea1c180ac95/content/renderer/media/html_video_element_capturer_source.cc
[modify] https://crrev.com/fce8860058fcbfab7c49d674d578dea1c180ac95/content/renderer/media/image_capture_frame_grabber.cc

Comment 4 by mcasas@chromium.org, Jul 15 2016

Status: Fixed (was: Assigned)
Fixed. To be Verified in tomorrow's Canary.

Comment 5 by mcasas@chromium.org, Jul 21 2016

Status: Verified (was: Fixed)
verified with the demo in #2 for Android Canary 54.0.2802.0

Comment 6 by mcasas@chromium.org, Jul 21 2016

Also verified with https://simpl.info/ic

Comment 7 by sshru...@google.com, Nov 23 2016

Components: -Blink>MediaStream>ImageCapture Blink>ImageCapture
Labels: M-54

Sign in to add a comment