Kodi Community Forum
Initial native support for DXVA2 in SVN - Time to say goodbye to your firstborns - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: Initial native support for DXVA2 in SVN - Time to say goodbye to your firstborns (/showthread.php?tid=69306)



- elupus - 2010-06-28

CrystalHD, no reorg should be needed for using postproc asfar as I know.. The code already works if it selects a processor that needs future and historic ref frames.. Any future ref frames should cause it to output frames with delay. Just not tested it.

I'm not sure how much the flags are required, but adding support for setting them shouldn't be to hard.


- elupus - 2010-06-28

I just reread what you said.. Postproc of non DXVA stuff. Yea that will be abit trickier to support.


- WhiningKhan - 2010-06-29

CrystalP Wrote:WhiningKhan, agreed. DXVA deinterlacing shouldn't be too hard since we can get field flags from the renderer. If you have some code lying around, please create a trac ticket and share.

Literally, all I did in my hack was forcing the interlace flag on in video description and checking the capabilities of the processor device for DXVA2_DeinterlaceTech_PixelAdaptive when opening the processor, and selecting that processor instead of the progressive device. It seems that if the video description has interlace flag set when you query for processors, you don't even get offered with the progressive device (at least on my HD3200 and HD3650).

I think the GUI selection of deinterlace method should be extended with things like DXVA Pixel Adaptive, DXVA Bob and DXVA Motion Steered (corresponding to the device cap flags), and use that when picking the processor device. But at least ATI parts have numerous Pixel Adaptive methods, I don't know if they can be distinguished from each other on code level. Or it may be that the driver actually exposes only the method that user has selected from driver settings. Well, we'll find out if we start testing this.

CrystalP Wrote:I have DXVA post proc for non-DXVA decode in the back of my mind and it seems technically doable but requires some reorg of the renderer (which I happen to be working on for other reasons). Running the HQ upscalers on DXVA decodes should be doable too, with similar renderer changes.

Great! I was eyeing the code yesterday, it looked to me that just the opening and initialization of the processor needs to be somehow re-done, but I've probably overlooked something, being unfamiliar with the code.

CrystalP Wrote:What's more difficult (and not as efficient) is DXVA decode then software processing. That requires a copy from GPU to system memory (similar to VLC's approach) and doesn't work on ATI at the moment.

Since decoding assistance from HW is generally for just the material that should be already pretty high quality, that would not seem too feasible anyway (also given that CPU does not have enough power to do much on HD material).


- Carlos ze Dwarf - 2010-06-29

By the way, isn't the 4th generation of purevideo (VP4) supposed to have an high quality scaler? Or does DXVA automatically uses it?

I see that its use has been implemented in the linux version (vdpau) but it seems there hasn't been any talk about that yet between us windows users.

(having an answer would also be helpful as i see nice prices on the non-deluxe AT3IONT-I) Wink


- WhiningKhan - 2010-06-29

Carlos ze Dwarf Wrote:By the way, isn't the 4th generation of purevideo (VP4) supposed to have an high quality scaler? Or does DXVA automatically uses it?

I guess that would be using DXVA-HD, which AFAIU is supported under Win7 only.

EDIT: I stress the part 'I guess' here, don't know really - the HQ scaling might be used by default even without DXVA-HD. DXVA-HD just provides additional interface options for stuff like this.


- SantaFox - 2010-06-29

Hi, when I play a movie that activated DXVA2 acceleration, a lot of errors like this:
ERROR: DXVA - failed executing m_process->VideoProcessBlt(target, &blt, samp.get(), valid, NULL) at line 959 with error 80070057

are posted to error log, but video plays flawlessly. SVN31495. Is it some kind of my local problem like hardware or Windows error, or it's an unsolved problem in release?


- SlaveUnit - 2010-06-29

Santa..post the whole debug log.


- SantaFox - 2010-06-30

I can not post attachments, so this is the link: http://rapidshare.com/files/403957786/xbmc.old.log.html


- tiben20 - 2010-06-30

SantaFox Wrote:I can not post attachments, so this is the link: http://rapidshare.com/files/403957786/xbmc.old.log.html
pastebin.com


- SantaFox - 2010-06-30

tiben20 Wrote:pastebin.com

http://pastebin.com/KPyYbg2y


- CrystalP - 2010-06-30

SantaFox, a debug log please. Activate the debug option and restart XBMC.


- SantaFox - 2010-06-30

Thanks, CrystalP. Here you are: http://pastebin.com/1VbXpYzT


- CrystalP - 2010-07-01

It doesn't look like a DXVA issue. Is it a playback of the same file?


- joshuass - 2010-07-02

Hey guys. Did a bit of testing on the files that still give me trouble. I noticed in my log that when I play back an offending video, I get a bunch of lines telling me that DXVA returns a decoder problem of status 1 with 255. Are these numbers something the dev's have in place for troubleshooting or is this a code that's coming from Microsoft or ffmpeg?

Log:
http://pastebin.com/w8LSj4BT


EDIT:

Ah, just found out where its generated in code (dxva.cpp). Looks to not be a code specific to XBMC. So I guess my next question is what would a status code 1 be? And a buffer type of 255? Tongue

EDIT 2:

So, further research shows that with a status of 1, the problem is minor. Explains why the screen isn't outright completely black/green. However, having a bBufType of 255 just seems weird. Just a cursory check in some documentation and the dxva.h header shows nothing that matches. I'm not really well versed in C++ programming so what I am talking about may certainly be way-off base heh.


- CrystalP - 2010-07-02

joshuass, that's good but can you post a debug log. That was a regular log. Don't forget to restart XBMC after setting the option.
Please also update your DX SDK - there's a message in the log.

You don't clearly say if this happens for one file, all files, files of a certain type/source, ...