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

Issue 660368 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit 21 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 156422
issue 615325



Sign in to add a comment

YUVVideoDrawQuad's drawing result of UV plane is smoother than other renderers.

Project Member Reported by dongseon...@intel.com, Oct 28 2016

Issue description

YUVVideoDrawQuad's drawing result of UV plane is smoother than other renderers.
I'm trying to fix it in https://codereview.chromium.org/2400033004/ and hubbe is reviewing.

Here's test
http://browsertests.herokuapp.com/media/sharpness3.html

See attached media_bilinear_comment.png
Current chrome (i.e. YUVVideoDrawQuad path) only has blurry rendering, while Firefox and VLC have similar rendering. After the above CL, "prototype for this issue" is the new result of chrome.

It's because gpu default bilinear filter mix pixels of sub-sampling U and V plane.
chrome_issue.png shows what's differnt between other renderer and current chrome. The figure is from https://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios

I want to listen to other reviewer's opinion. *Does the current result is desirable or we need to fix it?*

About spec,
* well known YUV420 to RGB conversion explains only point sampling.
https://en.wikipedia.org/wiki/YUV#Y.E2.80.B2UV420p_.28and_Y.E2.80.B2V12_or_YV12.29_to_RGB888_conversion
* JPEG spec explains point sampling and slightly mention chroma plane might be sub-sampled using anti-aliasing filter.
https://www.w3.org/Graphics/JPEG/jfif3.pdf
* VP8 don't mention how to convert YUV to RGB. It implies point sampling, in which current libvpx implementation works.
https://tools.ietf.org/html/rfc6386
* MPEG spec is not free, so I cannot check.
* Only Microsoft explain how to sub-sample chroma plane. It's quite complicated algorithm and different to bilinear filter. It's recommendation.
https://msdn.microsoft.com/de-de/library/windows/desktop/dd206750(v=vs.85).aspx
* EXT_image_dma_buf_import doesn't explain clearly how to sub-sample chroma plane.
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt

The test video is made of this canvas case; http://browsertests.herokuapp.com/canvas/canvas_small_text.html
 
media_bilinear_comment.png
1.3 MB View Download
chrome_issue.png
17.2 KB View Download
What are we doing with chroma siting currently? That could probably be fixed somewhat by offsetting those shader texture coordinates, and we wouldn't need a completely new shader for that.

Comment 2 by hubbe@chromium.org, Nov 7 2016

We are doing nothing with chroma siting unfortunately.

Sign in to add a comment