Bug 109646 - New video compositor compute shader render glitches mpv
Summary: New video compositor compute shader render glitches mpv
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 19:30 UTC by bmilreu
Modified: 2019-03-29 20:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for blur issue fix (999 bytes, patch)
2019-03-29 20:04 UTC, jamesz@amd.com
Details | Splinter Review
patch for blank issue fix (1.40 KB, patch)
2019-03-29 20:05 UTC, jamesz@amd.com
Details | Splinter Review

Description bmilreu 2019-02-15 19:30:10 UTC
If I play a video with mpv --vo=vaapi OR --vo=vdpau after this commit https://gitlab.freedesktop.org/mesa/mesa/commit/f6ac0b5d7187ebb6839fc884e1dbfa8f1dd21eac I get a few problems:
1. Press i to show mpv info and it will show black rectangles instead. 
2. Going fullscreen fails silently sometimes.
3. Video looks really jaggy when downsized, more than the usual with those --vo backends.
4. Places where the UI should be transparent are black instead (related to first issue?).
Comment 1 leoxsliu 2019-02-15 19:50:14 UTC
Thanks for the testing. We'll have a look.
Comment 2 jamesz@amd.com 2019-02-15 20:19:03 UTC
bmilreu@gmail.com: 
Problem 1,4: the blend implementation seems incomplete with compute shader.
Problem 3: could you provide the clip and the screen capture? I want to check on my bench.
Problem 2: So far I didn't see on my bench. I will try to reproduce here.
Comment 3 bmilreu 2019-02-15 20:52:42 UTC
(In reply to jamesz@amd.com from comment #2)
> bmilreu@gmail.com: 
> Problem 1,4: the blend implementation seems incomplete with compute shader.
> Problem 3: could you provide the clip and the screen capture? I want to
> check on my bench.
> Problem 2: So far I didn't see on my bench. I will try to reproduce here.

Also found an extra problem with this test case. Both vaapi and vdpau are dropping lots of frames on it.

Could you try:
mpv --vo=vaapi --hwdec=vaapi https://www.youtube.com/watch?v=LXb3EKWsInQ
mpv --vo=vdpau --hwdec=vdpau https://www.youtube.com/watch?v=LXb3EKWsInQ

Then resize down the window.
This reproduces the jagginess and also introduces constant stuttering.

Let me know if you can reproduce, I'm at work now but I can provide captures and logs when I come home if needed.
Comment 4 bmilreu 2019-02-15 21:52:19 UTC
Ok, some updates:

1. The stutter/framedrop was related to the codec, not your patches. Switching to dav1d improved it.
2. The last patch you posted fixed the black UI issues.
3. Got a comparison shot of how the jagginess looks between mesa before and after your implementation: https://i.imgur.com/A6ko6ap.png
Comment 5 jamesz@amd.com 2019-02-19 14:05:20 UTC
Thanks so much! By the way, can you provide me the source to reproduce the jagginess issue at my side?
James
Comment 6 jamesz@amd.com 2019-02-19 14:07:54 UTC
Sorry,  https://www.youtube.com/watch?v=LXb3EKWsInQ is the clip. James
Comment 7 jamesz@amd.com 2019-03-29 20:04:44 UTC
Created attachment 143809 [details] [review]
patch for blur issue fix
Comment 8 jamesz@amd.com 2019-03-29 20:05:40 UTC
Created attachment 143810 [details] [review]
patch for blank issue fix
Comment 9 jamesz@amd.com 2019-03-29 20:08:09 UTC
Hi Bruno,

Please help verify the two new patches to address the issues that you found during Chromium hardware acceleration enabled playback.

Thanks!
James Zhu
Comment 10 bmilreu 2019-03-29 20:23:58 UTC
(In reply to jamesz@amd.com from comment #9)
> Hi Bruno,
> 
> Please help verify the two new patches to address the issues that you found
> during Chromium hardware acceleration enabled playback.
> 
> Thanks!
> James Zhu

Done, those two issues are fixed with the patch. I'll close this as resolved and open another ticket if I find more issues but the two main va-api applications I use are working fine (mpv and chrome/ium).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.