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

Issue 2684073006: cc: UYVY video is not premultiplied rgba

Created:
3 years, 10 months ago by dshwang
Modified:
3 years, 9 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, posciak+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: UYVY video is not premultiplied rgba BUG=683347 TEST=cc_unittests VideoResourceUpdaterTest.CreateForHardwarePlanes_UYVYTexture CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -7 lines) Patch
M cc/resources/video_resource_updater.cc View 1 chunk +1 line, -1 line 2 comments Download
M cc/resources/video_resource_updater_unittest.cc View 4 chunks +41 lines, -6 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
dshwang
ccameron@, dcastagna@, could you review? when dcastagna@ made UYVY support, this bug was created but ...
3 years, 10 months ago (2017-02-09 02:36:00 UTC) #5
dshwang
On 2017/02/09 02:36:00, dshwang wrote: > ccameron@, dcastagna@, could you review? when dcastagna@ made UYVY ...
3 years, 9 months ago (2017-02-28 02:16:06 UTC) #8
Daniele Castagna
https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc#newcode42 cc/resources/video_resource_updater.cc:42: case GL_TEXTURE_2D: Isn't CrOS using TEXTURE_EXTERNAL_OES?
3 years, 9 months ago (2017-02-28 03:17:53 UTC) #9
dshwang
https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc#newcode42 cc/resources/video_resource_updater.cc:42: case GL_TEXTURE_2D: On 2017/02/28 03:17:53, Daniele Castagna wrote: > ...
3 years, 9 months ago (2017-02-28 04:18:45 UTC) #10
Daniele Castagna
On 2017/02/28 at 04:18:45, dongseong.hwang wrote: > https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc > File cc/resources/video_resource_updater.cc (right): > > https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource_updater.cc#newcode42 ...
3 years, 9 months ago (2017-02-28 04:20:12 UTC) #11
dshwang
On 2017/02/28 04:20:12, Daniele Castagna wrote: > On 2017/02/28 at 04:18:45, dongseong.hwang wrote: > > ...
3 years, 9 months ago (2017-02-28 04:31:52 UTC) #12
dshwang
On 2017/02/28 04:31:52, dshwang wrote: > On 2017/02/28 04:20:12, Daniele Castagna wrote: > > On ...
3 years, 9 months ago (2017-03-07 21:34:30 UTC) #13
Daniele Castagna
On 2017/03/07 at 21:34:30, dongseong.hwang wrote: > On 2017/02/28 04:31:52, dshwang wrote: > > On ...
3 years, 9 months ago (2017-03-10 02:54:50 UTC) #14
dshwang
3 years, 9 months ago (2017-03-23 20:07:30 UTC) #15
On 2017/03/10 02:54:50, Daniele Castagna wrote:
> On 2017/03/07 at 21:34:30, dongseong.hwang wrote:
> > On 2017/02/28 04:31:52, dshwang wrote:
> > > On 2017/02/28 04:20:12, Daniele Castagna wrote:
> > > > On 2017/02/28 at 04:18:45, dongseong.hwang wrote:
> > > > >
> > > >
> > >
>
https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource...
> > > > > File cc/resources/video_resource_updater.cc (right):
> > > > > 
> > > > >
> > > >
> > >
>
https://codereview.chromium.org/2684073006/diff/1/cc/resources/video_resource...
> > > > > cc/resources/video_resource_updater.cc:42: case GL_TEXTURE_2D:
> > > > > On 2017/02/28 03:17:53, Daniele Castagna wrote:
> > > > > > Isn't CrOS using TEXTURE_EXTERNAL_OES?
> > > > > 
> > > > > Not always TEXTURE_EXTERNAL_OES
> > > > > 
> > > > > GPU video decoder uses TEXTURE_EXTERNAL_OES
> > > > > GpuMemoryBufferVideoFramePool with native GMB uses
TEXTURE_EXTERNAL_OES
> > > > > GpuMemoryBufferVideoFramePool with software-fallback GMB uses
> GL_TEXTURE_2D
> > > > 
> > > > That seems correct.
> > > > 
> > > > There is no UYVY with software GMB though, so my point still stands. How
> did
> > > you
> > > > notice this problem working on UYVY?
> > > 
> > > ah, I never meet issue. I just read code and submit the patch in theory.
> because
> > > when I add YUYV, premultiplied sounds wrong.
> > > There is no UYVY and YUYV with software GMB though. By the way, I think
the
> > > changed code looks more logical :)
> > 
> > Daniele, could you review again? It's minor change, and looks more logical,
> although any code path doesn't come to here yet.
> 
> I still don't understand why you want this, it's not going to change anything
> but adding a multiplication by 1 in the shader.
> 
> If I understand correctly, the UYVY texture will behave like an RGBX texture
> when sampled in the shader.
> 
> The only difference that PREMULTIPLIED alpha makes vs NON PREMULTIPLIED is if
> the color should be multiplied by the alpha in the fragment shader.
> 
> Look at
>
https://cs.chromium.org/chromium/src/cc/output/shader.cc?rcl=1fd0ec64195b3be2...
> 
> In your case, I'm assuming texColor.a will be 1.0. So why would you want to
> multiply every color sampled by 1 when you can avoid that and the result
should
> be exactly the same?


Yes, it doesn't change any behavior. I just want to make it more logically make
sense. It's not big deal, tho.
premultiplied is RGBA concept, but XRGB, YUYV, UYVY doesn't contain alpha
channel, so doesn't make sense with premultiplied. It's fine, if gpu driver
fills tex.a to 1.0 when texture lookup on top of EGL image, which is on top of
GEM prime FD. but who know what gpu driver do for this unclear behavior.

Powered by Google App Engine
This is Rietveld 408576698