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

Issue 774297 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Refactor viz::GLHelper to have an async YUV readback component from texture

Project Member Reported by emir...@chromium.org, Oct 12 2017

Issue description

This idea came up in  issue 727385 .

- We shouldn't do it using viz::GLHelper, but rather move it into a smaller component. 
- This functionality should read back YUV. This would be an improvement over ARGB and convert(32 bpp->12/20bpp).
- It requires some more piping about alpha channel and flipped origin from SkImage.
- Another reason we should proceed with YUV readback, other than additional performance benefits, is color space conversions: libyuv currently uses BT.601 conversion factors, but the media video pipeline assumes BT.709 (the difference between the old standard-definition TV and HDTV).

 

Comment 1 by laforge@google.com, Nov 8 2017

Components: -Internals>Viz Internals>Services>Viz
Migrating from Internals>Viz to Internals>Services>Viz.
Cc: bsalomon@chromium.org junov@chromium.org
We had a discussion with miu@ and concluded to extract the code for reading TEXTURE into CPU readable YUV or ARGB buffers into a smaller component. It can ideally live inside renderer process, can be constructed with the context and used by multiple clients, couple WebRTC cases already exist. We can start by making a fork of the existing code in GLHelper. 

Note that if there is a Skia alternative for this, i.e. SkImage::readYUVPixelsAsync(), all of this would be actually unnecessary. bsalomon@ do you have any input on the feasibility of that?

Also, junov@ would this be useful for any Blink calls as well? 

Comment 3 by bsalo...@google.com, Jan 12 2018

Cc: brianosman@chromium.org
Something like that is certainly possibly. If we did something like this, what would be the mechanism for the client to know that the result is ready? GLsync object returned from the call?
I am not sure about the native callbacks between skia and Chrome. But we can have a AsyncReadClient interface defined on skia side, an instance in Chrome can be passed with the call and AsyncReadClient::OnPixelsRead() would let Chrome side know that it is ready?
Cc: -junov@chromium.org

Sign in to add a comment