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

Issue 374743003: Skia side RGB to YUV gpu conversion (Closed)

Created:
6 years, 5 months ago by sugoi1
Modified:
6 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Skia side RGB to YUV gpu conversion This code is the one that's currently working in my local chromium build. A few things still need to be addressed and I'll highlight these directly in the code. BUG=skia: Committed: https://skia.googlesource.com/skia/+/518d83dbc1c899e316e8c896af5defb58b83120f

Patch Set 1 #

Total comments: 9

Patch Set 2 : Some changes to getYUV8Planes() #

Total comments: 14

Patch Set 3 : Fixed comments #

Total comments: 15

Patch Set 4 : Fixed more comments #

Total comments: 9

Patch Set 5 : A few more NULL checks #

Patch Set 6 : Fixed comments and added SkImageGenerator unit tests #

Total comments: 2

Patch Set 7 : Ported a minimal set of blink side changes for YUV decoding tests #

Total comments: 18

Patch Set 8 : Back to Patch Set 6 (updated to ToT) #

Patch Set 9 : Fixed comments #

Patch Set 10 : Fixing more comments #

Patch Set 11 : Fixing Windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -0 lines) Patch
M gyp/tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkImageGenerator.h View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 0 comments Download
M include/core/SkPixelRef.h View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -0 lines 0 comments Download
M src/core/SkImageGenerator.cpp View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
M src/core/SkPixelRef.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M src/gpu/SkGr.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +82 lines, -0 lines 0 comments Download
M src/lazy/SkDiscardablePixelRef.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
A tests/ImageGeneratorTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
sugoi1
Here's my current working implementation on the skia side for the YUV to RGB GPU ...
6 years, 5 months ago (2014-07-08 14:42:03 UTC) #1
Stephen White
https://codereview.chromium.org/374743003/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/374743003/diff/1/include/core/SkImageGenerator.h#newcode132 include/core/SkImageGenerator.h:132: bool getYUV8Planes(SkISize* sizes, const YUV8Planes* planes = NULL); Does ...
6 years, 5 months ago (2014-07-08 15:00:19 UTC) #2
reed1
https://codereview.chromium.org/374743003/diff/1/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/374743003/diff/1/include/core/SkImageGenerator.h#newcode132 include/core/SkImageGenerator.h:132: bool getYUV8Planes(SkISize* sizes, const YUV8Planes* planes = NULL); What ...
6 years, 5 months ago (2014-07-08 15:08:52 UTC) #3
sugoi1
I changed the API in SkPixelRef to remove SkImageGenerator and just add a getYUV8Planes() function. ...
6 years, 5 months ago (2014-07-09 19:57:43 UTC) #4
bsalomon
https://codereview.chromium.org/374743003/diff/20001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/374743003/diff/20001/src/gpu/SkGr.cpp#newcode199 src/gpu/SkGr.cpp:199: const SkBitmap &bm, GrTextureDesc desc) { style nit: Can ...
6 years, 5 months ago (2014-07-09 20:19:18 UTC) #5
reed1
Thanks, I like the api directly on pixelref. Two API concerns: 1. I think we ...
6 years, 5 months ago (2014-07-09 20:29:08 UTC) #6
robertphillips
https://codereview.chromium.org/374743003/diff/20001/include/core/SkPixelRef.h File include/core/SkPixelRef.h (right): https://codereview.chromium.org/374743003/diff/20001/include/core/SkPixelRef.h#newcode238 include/core/SkPixelRef.h:238: */ SkISize sizes[3], void* planes[3], int rowBytes[3] ? https://codereview.chromium.org/374743003/diff/20001/src/gpu/SkGr.cpp ...
6 years, 5 months ago (2014-07-10 12:47:20 UTC) #7
sugoi1
https://codereview.chromium.org/374743003/diff/20001/include/core/SkPixelRef.h File include/core/SkPixelRef.h (right): https://codereview.chromium.org/374743003/diff/20001/include/core/SkPixelRef.h#newcode238 include/core/SkPixelRef.h:238: */ On 2014/07/10 12:47:20, robertphillips wrote: > SkISize sizes[3], ...
6 years, 5 months ago (2014-07-10 16:10:53 UTC) #8
reed1
https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h#newcode123 include/core/SkImageGenerator.h:123: * If planes[0] is not NULL, then it should ...
6 years, 5 months ago (2014-07-10 17:15:15 UTC) #9
sugoi1
https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h#newcode123 include/core/SkImageGenerator.h:123: * If planes[0] is not NULL, then it should ...
6 years, 5 months ago (2014-07-10 17:54:25 UTC) #10
reed1
On 2014/07/10 17:54:25, sugoi1 wrote: > https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h > File include/core/SkImageGenerator.h (right): > > https://codereview.chromium.org/374743003/diff/40001/include/core/SkImageGenerator.h#newcode123 > ...
6 years, 5 months ago (2014-07-10 18:16:46 UTC) #11
reed1
https://codereview.chromium.org/374743003/diff/60001/src/core/SkImageGenerator.cpp File src/core/SkImageGenerator.cpp (right): https://codereview.chromium.org/374743003/diff/60001/src/core/SkImageGenerator.cpp#newcode63 src/core/SkImageGenerator.cpp:63: ((NULL != planes[0]) && (NULL != planes[1]) && (NULL ...
6 years, 5 months ago (2014-07-10 18:21:40 UTC) #12
robertphillips
https://codereview.chromium.org/374743003/diff/60001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/374743003/diff/60001/src/gpu/SkGr.cpp#newcode212 src/gpu/SkGr.cpp:212: for (int i = 0; i < 3; ++i) ...
6 years, 5 months ago (2014-07-10 18:27:39 UTC) #13
robertphillips
https://codereview.chromium.org/374743003/diff/60001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/374743003/diff/60001/src/gpu/SkGr.cpp#newcode218 src/gpu/SkGr.cpp:218: planes[1] = (uint8_t*)planes[0] + sizes[0]; Forget this comment - ...
6 years, 5 months ago (2014-07-10 18:28:43 UTC) #14
bsalomon
sorry meant to send these comments earlier but forgot to publish! https://codereview.chromium.org/374743003/diff/40001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): ...
6 years, 5 months ago (2014-07-10 18:29:39 UTC) #15
sugoi1
https://codereview.chromium.org/374743003/diff/40001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/374743003/diff/40001/src/gpu/SkGr.cpp#newcode232 src/gpu/SkGr.cpp:232: GrTexture* tex = ctx->createUncachedTexture(yuvDesc, planes[i], rowBytes[i]); On 2014/07/10 18:29:39, ...
6 years, 5 months ago (2014-07-10 19:59:06 UTC) #16
sugoi1
https://codereview.chromium.org/374743003/diff/40001/src/gpu/SkGr.cpp File src/gpu/SkGr.cpp (right): https://codereview.chromium.org/374743003/diff/40001/src/gpu/SkGr.cpp#newcode261 src/gpu/SkGr.cpp:261: GrContext::AutoClip ac(ctx, r); On 2014/07/10 18:29:39, bsalomon wrote: > ...
6 years, 5 months ago (2014-07-11 18:46:15 UTC) #17
bsalomon
The Gr code lgtm
6 years, 5 months ago (2014-07-11 20:31:59 UTC) #18
reed1
Skia has a jpeg decoder. Can we modify it so we can test this on ...
6 years, 5 months ago (2014-07-12 11:15:17 UTC) #19
sugoi1
On 2014/07/12 11:15:17, reed1 wrote: > Skia has a jpeg decoder. Can we modify it ...
6 years, 5 months ago (2014-07-15 19:09:10 UTC) #20
sugoi1
PTAL! I ported some code from my local blink patch that enables YUV decoding into ...
6 years, 5 months ago (2014-07-16 20:50:04 UTC) #21
reed1
Not sure what the best way to expose this to ImageDecoder is, if we should ...
6 years, 5 months ago (2014-07-18 19:26:01 UTC) #22
reed1
6 years, 5 months ago (2014-07-18 19:27:40 UTC) #23
scroggo
https://codereview.chromium.org/374743003/diff/120001/include/core/SkImageDecoder.h File include/core/SkImageDecoder.h (right): https://codereview.chromium.org/374743003/diff/120001/include/core/SkImageDecoder.h#newcode52 include/core/SkImageDecoder.h:52: virtual bool getImageFormat(SkStream*, SkISize sizes[3]) { This name doesn't ...
6 years, 5 months ago (2014-07-18 21:52:41 UTC) #24
sugoi1
On 2014/07/18 19:26:01, reed1 wrote: > Not sure what the best way to expose this ...
6 years, 5 months ago (2014-07-21 14:35:18 UTC) #25
reed1
On 2014/07/21 14:35:18, sugoi1 wrote: > On 2014/07/18 19:26:01, reed1 wrote: > > Not sure ...
6 years, 5 months ago (2014-07-21 14:45:13 UTC) #26
scroggo
On 2014/07/21 14:45:13, reed1 wrote: > lgtm for #6 -- Leon is that CL ok ...
6 years, 5 months ago (2014-07-21 14:53:01 UTC) #27
sugoi1
https://codereview.chromium.org/374743003/diff/100001/include/core/SkPixelRef.h File include/core/SkPixelRef.h (right): https://codereview.chromium.org/374743003/diff/100001/include/core/SkPixelRef.h#newcode239 include/core/SkPixelRef.h:239: virtual bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) { ...
6 years, 5 months ago (2014-07-21 15:08:14 UTC) #28
scroggo
Please see my comments in patch set 7: https://codereview.chromium.org/374743003/diff/120001/include/core/SkImageGenerator.h#newcode120 , https://codereview.chromium.org/374743003/diff/120001/src/core/SkImageGenerator.cpp#newcode74 , https://codereview.chromium.org/374743003/diff/120001/src/images/SkDecodingImageGenerator.cpp#newcode227 , https://codereview.chromium.org/374743003/diff/120001/tests/ImageGeneratorTest.cpp#newcode8 ...
6 years, 5 months ago (2014-07-21 16:19:30 UTC) #29
sugoi1
https://codereview.chromium.org/374743003/diff/120001/include/core/SkImageGenerator.h File include/core/SkImageGenerator.h (right): https://codereview.chromium.org/374743003/diff/120001/include/core/SkImageGenerator.h#newcode120 include/core/SkImageGenerator.h:120: * If any planes or rowBytes is NULL, this ...
6 years, 5 months ago (2014-07-21 16:51:45 UTC) #30
scroggo
lgtm
6 years, 5 months ago (2014-07-21 17:01:14 UTC) #31
sugoi1
The CQ bit was checked by sugoi@chromium.org
6 years, 5 months ago (2014-07-21 17:08:33 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/sugoi@chromium.org/374743003/180001
6 years, 5 months ago (2014-07-21 17:09:02 UTC) #33
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia ...
6 years, 5 months ago (2014-07-21 17:21:34 UTC) #34
sugoi1
The CQ bit was unchecked by sugoi@chromium.org
6 years, 5 months ago (2014-07-21 17:29:02 UTC) #35
sugoi1
The CQ bit was checked by sugoi@chromium.org
6 years, 5 months ago (2014-07-21 18:26:26 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/sugoi@chromium.org/374743003/200001
6 years, 5 months ago (2014-07-21 18:27:15 UTC) #37
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 18:37:45 UTC) #38
Message was sent while issue was closed.
Change committed as 518d83dbc1c899e316e8c896af5defb58b83120f

Powered by Google App Engine
This is Rietveld 408576698