|
|
Created:
4 years, 5 months ago by mcasas Modified:
4 years, 5 months ago Reviewers:
emircan CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionImageCapture.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
Committed: https://crrev.com/fce8860058fcbfab7c49d674d578dea1c180ac95
Cr-Commit-Position: refs/heads/master@{#405572}
Patch Set 1 #
Total comments: 2
Patch Set 2 : emircan@s comments #Patch Set 3 : Adapted/corrected DLOG message #
Messages
Total messages: 20 (12 generated)
Description was changed from ========== ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android BUG=627983 ========== to ========== ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android BUG=627983 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 ==========
Description was changed from ========== ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android BUG=627983 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 ========== to ========== ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android This CL corrects using 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 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 ==========
Description was changed from ========== ImageCapture.grabFrame()/<video>.captureStream(), use ABGR pixel format for Android This CL corrects using 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 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 ========== to ========== 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 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 ==========
mcasas@chromium.org changed reviewers: + emircan@chromium.org
emircan@ PTAL
Description was changed from ========== 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 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 ========== to ========== 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 ==========
https://codereview.chromium.org/2150453003/diff/1/content/renderer/media/html... File content/renderer/media/html_video_element_capturer_source.cc (right): https://codereview.chromium.org/2150453003/diff/1/content/renderer/media/html... content/renderer/media/html_video_element_capturer_source.cc:181: source_pixel_format) == 0) { I think the underlying problem is that bitmap.colorType() which is kN32_SkColorType is defined differently on some platforms. It is based on SK_PMCOLOR_BYTE_ORDER which is detected at compile time. Android might not always be ABGR. 1) You can base on SK_PMCOLOR_BYTE_ORDER as in [0] 2) kN32_SkColorType == kBGRA_8888_SkColorType ? libyuv::FOURCC_ARGB : libyuv::FOURCC_ABGR [0] https://cs.chromium.org/chromium/src/third_party/skia/include/core/SkImageInf...
The CQ bit was checked by mcasas@chromium.org to run a CQ dry run
PTAL https://codereview.chromium.org/2150453003/diff/1/content/renderer/media/html... File content/renderer/media/html_video_element_capturer_source.cc (right): https://codereview.chromium.org/2150453003/diff/1/content/renderer/media/html... content/renderer/media/html_video_element_capturer_source.cc:181: source_pixel_format) == 0) { On 2016/07/14 18:16:00, emircan wrote: > I think the underlying problem is that bitmap.colorType() which is > kN32_SkColorType is defined differently on some platforms. It is based on > SK_PMCOLOR_BYTE_ORDER which is detected at compile time. Android might not > always be ABGR. > 1) You can base on SK_PMCOLOR_BYTE_ORDER as in [0] > 2) kN32_SkColorType == kBGRA_8888_SkColorType ? libyuv::FOURCC_ARGB : > libyuv::FOURCC_ABGR > > [0] > https://cs.chromium.org/chromium/src/third_party/skia/include/core/SkImageInf... Great suggestion! Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
Patchset #3 (id:40001) has been deleted
The CQ bit was checked by mcasas@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from emircan@chromium.org Link to the patchset: https://codereview.chromium.org/2150453003/#ps60001 (title: "Adapted/corrected DLOG message")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:60001)
Message was sent while issue was closed.
CQ bit was unchecked.
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Committed: https://crrev.com/fce8860058fcbfab7c49d674d578dea1c180ac95 Cr-Commit-Position: refs/heads/master@{#405572} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/fce8860058fcbfab7c49d674d578dea1c180ac95 Cr-Commit-Position: refs/heads/master@{#405572} |