Bug 54559 - [chromium] Fix green pixels at edge of certain GPU-accelerated videos
Summary: [chromium] Fix green pixels at edge of certain GPU-accelerated videos
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 54484
  Show dependency treegraph
Reported: 2011-02-16 08:28 PST by Victoria Kirst
Modified: 2011-02-16 20:44 PST (History)
6 users (show)

See Also:

Patch (11.07 KB, patch)
2011-02-16 08:31 PST, Victoria Kirst
no flags Details | Formatted Diff | Diff
Patch (16.36 KB, patch)
2011-02-16 13:55 PST, Victoria Kirst
no flags Details | Formatted Diff | Diff
Patch (16.36 KB, patch)
2011-02-16 16:26 PST, Victoria Kirst
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victoria Kirst 2011-02-16 08:28:59 PST
[chromium] Fix green pixels at edge of certain GPU-accelerated videos
Comment 1 Victoria Kirst 2011-02-16 08:31:53 PST
Created attachment 82643 [details]
Comment 2 Andrew Scherkus 2011-02-16 09:35:44 PST
Comment on attachment 82643 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=82643&action=review

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:316
> +            float deadPixelsPerRow = planeTextureSize.width() - frameWidth;

does this need to be float?  I think planeTextureSize and frameWidth are both ints

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:394
> +    // Artibitrarily take the u sizes because u and v dimensions are identical.

Artibitrarily -> Arbitrarily
Comment 3 Victoria Kirst 2011-02-16 13:55:51 PST
Created attachment 82687 [details]
Comment 4 Victoria Kirst 2011-02-16 14:01:41 PST
Updated patch to reflect Andrew's suggested changes, and subtracts 2 from Y plane's width instead of 1 in YV12 case.

Also moved some of the logic to VideoFrameChromium and did some refactoring there for a cleaner solution.
Comment 5 Kenneth Russell 2011-02-16 14:06:17 PST
Comment on attachment 82687 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=82687&action=review

I'll be happy to r+ this once a member of the video stack team signs off on it. One minor stylistic comment.

> Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp:313
> +                frameWidth--;

Prefer predecrement in WebKit. (i.e., --frameWidth)
Comment 6 Andrew Scherkus 2011-02-16 16:19:31 PST
I ran some tests using a static YUV test image and this patch is good to go!

On width==stride videos we have pixel-accurate scaling as expected.

On width<stride videos we _do_ end up scaling the video horizontally by one pixel (i.e., right-most pixel line is gone!) but Y and UV planes are still in sync which is the important part.
Comment 7 Victoria Kirst 2011-02-16 16:26:17 PST
Created attachment 82719 [details]
Comment 8 Victoria Kirst 2011-02-16 16:33:50 PST
Thanks for all the help with the bug and for writing a way to test it, Andrew!

kbr: Thanks for reviewing! I fixed the nit in my latest uploaded patch. (Also made a minor adjustment to the CL description; otherwise kept the same.)
Comment 9 Kenneth Russell 2011-02-16 17:10:27 PST
Comment on attachment 82719 [details]

Sounds good. r=me
Comment 10 WebKit Commit Bot 2011-02-16 20:42:00 PST
The commit-queue encountered the following flaky tests while processing attachment 82719 [details]:

http/tests/websocket/tests/multiple-connections.html bug 53825 (author: abarth@webkit.org)
The commit-queue is continuing to process your patch.
Comment 11 WebKit Commit Bot 2011-02-16 20:44:47 PST
Comment on attachment 82719 [details]

Clearing flags on attachment: 82719

Committed r78787: <http://trac.webkit.org/changeset/78787>
Comment 12 WebKit Commit Bot 2011-02-16 20:44:52 PST
All reviewed patches have been landed.  Closing bug.