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

Issue 915707 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature


Participants' hotlists:
YUV-Decoding-Caching-GPU


Sign in to add a comment

Make DecodingImageGenerator::QueryYUVA8 return the correct colorspace based on image type

Project Member Reported by mbarow...@chromium.org, Dec 17

Issue description

Currently DecodingImageGenerator::QueryYUVA8 hardcodes the SkYUVColorSpace parameter to be kJPEG_SkYUVColorSpace, but it should choose based on image type.

With crbug.com/900264, there will be support for decoding and rendering WebP images from YUV. These images are converted to RGB by Skia in shaders.

However, WebP images that are eventually converted to RGB should use kRec601_SkYUVColorSpace, per the WebP container specification [1].

The solution right now is to hardcode this colorspace when calling SkImage::MakeFromYUVATextures from GpuImageDecodeCache::UploadImageIfNecessary, but it is much better style to have QueryYUVA8 determine the correct value based on image type (JPEG, WebP, or any future formats that support YUV decoding).

[1]: https://developers.google.com/speed/webp/docs/riff_container#simple_file_format_lossy
 
Status: Available (was: Assigned)

Sign in to add a comment