Posts: 110
Joined: Apr 2012
Reputation:
8
Shine
Senior Member
Posts: 110
2014-02-04, 21:04
(This post was last modified: 2014-02-04, 21:37 by Shine.)
After looking at the code... the black screen has (almost) nothing to do with the hardware and should affect every Hi10P playback on any GPU when DXVA or DXVA-HD is selected as renderer, as long as the GPU supports D3DFMT_L16 (although I'm unsure why this is used for the check, since as far as I figured out, this is a monochrome format).
The code for both DXVA Renderers - for DXVA2 see CProcessor::Add() in DXVA.cpp and for DXVA-HD see CProcessorHD::Add() in DXVAHD.cpp - accepts only YV12 input (converts it to NV12) and errors out on any other color format.
So I guess the above patch is the proper fix for now.
Posts: 2,745
Joined: Oct 2003
Reputation:
1
WiSo
Team-Kodi Developer
Posts: 2,745
2014-02-04, 22:17
(This post was last modified: 2014-02-05, 15:19 by WiSo.)
Thanks for looking into it. Unfortunately we don't have any active DXVA dev in the team anymore so its unlikely that you get any feedback here. You could try to create a pull request at github and we link in some peeps who helped in the past with stuff like that.
Posts: 423
Joined: Sep 2010
Reputation:
12
a11599
Team-Kodi Member
Posts: 423
The observation is corrrect and the patch looks good. Mind setting up a PR?
(For the long term the proper solution would be to use sws_scale color conversion instead of the current implementation in DXVA renderers.)
Posts: 414
Joined: Apr 2010
Reputation:
5
Voyager
Retired Team-Kodi Member
Posts: 414
2014-02-06, 08:40
(This post was last modified: 2014-02-06, 09:53 by Voyager.)
I confirm the issue on nVidia (and also AMD) with hi10p material. I'll do some testing and let you know. Thanks for the contribution!
Posts: 110
Joined: Apr 2012
Reputation:
8
Shine
Senior Member
Posts: 110
Sorry, closed PR by accident. Re-opened.
Posts: 414
Joined: Apr 2010
Reputation:
5
Voyager
Retired Team-Kodi Member
Posts: 414
Just tested the patch and works fine.
Posts: 110
Joined: Apr 2012
Reputation:
8
Shine
Senior Member
Posts: 110
Thanks for reopening the PR and sorry for the mess - still getting the hang of working with remote repos...
I've been using this patch in similar flavors since pre-Frodo times already, so it's thoroughly tested - I just never bothered to post it here since I had no possibility to verify the behavior on other systems than mine.
Posts: 2,745
Joined: Oct 2003
Reputation:
1
WiSo
Team-Kodi Developer
Posts: 2,745
np and thanks for the contribution. Keep up and help us improving the DXVA path.
Posts: 2,745
Joined: Oct 2003
Reputation:
1
WiSo
Team-Kodi Developer
Posts: 2,745
Take your time and make a proper PR after the weekend then others can test as well.
Posts: 31,445
Joined: Jan 2011
I hope this gets merged. From the discussion I see there's a lot of frustration going on.
Here's my take on it. Elupus says "It's a bug if it doesn't check the parameters it's given.", and I think everyone else is saying "yes, it is a bug, but right now we don't know how to do a better fix, and the alternative is a black screen and nothing played".
There seems to be this bad habit with XBMC where if the fix isn't perfect then the improvement isn't accepted, and the end result is being worse off.
At least form a non-programmer's perspective.