• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 14
[PATCH] Hardware deinterlacing for both software and DXVA2 decoded material
#61
Hey isidrogar, you did an awesome job - black screen issue fixed: check!
DXVA Deinterlacing on interlaced stuff works like a charme!

I noticed a problem with different file/container formats:

Bluray filestructure encoded in AVC: heavy artifacts, dxva2 enabled & working
Bluray filestructure encoded in VC-1: no artifacts, dxva2 enabled & working

Bluray filestructure encoded in AVC: no artifacts, dxva2 disabled
Bluray filestructure encoded in VC-1: no artifacts, dxva2 disabled

Bluray Remux encoded in AVC: heavy artifacts, dxva2 enabled & working
Bluray Remux encoded in VC-1: no artifacts, dxva2 enabled & working

Bluray Remux encoded in AVC: no artifacts, dxva2 disabled
Bluray Remux encoded in VC-1: no artifacts, dxva2 disabled

Any other stuff (mkv,....) works as it should with dxva2 enabled and showing no artifacts.

Does it have to do something with this ffmpeg thing thespecialist is working on at the moment? Or should it have to be fixed already with your ATI artifacts patch?

Maybe you have a solution to this.

Please let me know if you need further information, for example mediainfo files or else.

Keep up the good work!!

*edit*

@topsyturvy

DXVA Deinterlacing is really usefull when it comes to live-tv or recorded tv stuff (interlaced).
But in fact only if you want to build up a very economical htpc cause software deinterlacing uses quite a lot of cpu power.
If you're not really interested in economy and how much power your htpc consumes, you should'nt care.
On the other hand, hardware deinterlacers do an acceptable job by now, so why not use it.
Reply
#62
sw4y Wrote:@topsyturvy

DXVA Deinterlacing is really usefull when it comes to live-tv or recorded tv stuff (interlaced).
But in fact only if you want to build up a very economical htpc cause software deinterlacing uses quite a lot of cpu power.
If you're not really interested in economy and how much power your htpc consumes, you should'nt care.
On the other hand, hardware deinterlacers do an acceptable job by now, so why not use it.

Indeed dxva deinterlacing is really useful when playing dxva decoded live-tv (hdtv). That is exactly what is done by a11599's patch.

If I understand correctly, isidrogar's patch allows dxva interlacing to be ALSO used for software decoded content. Normally software decoded content isn't high definition e.g. DVD ISO's. I have an ION system and it easily plays and deinterlaced DVD ISOs using software. I don't think CPUs get any weaker than Atom cpus. (On the other hand I absolutely need a11599's patch to play interlaced high defination tv stuff)

A lot of people seem really excited about this patch, I'm just trying to understand why :-)
Reply
#63
sw4y Wrote:Hey isidrogar, you did an awesome job - black screen issue fixed: check!
DXVA Deinterlacing on interlaced stuff works like a charme!

I noticed a problem with different file/container formats:

Bluray filestructure encoded in AVC: heavy artifacts, dxva2 enabled & working
Bluray filestructure encoded in VC-1: no artifacts, dxva2 enabled & working

Bluray filestructure encoded in AVC: no artifacts, dxva2 disabled
Bluray filestructure encoded in VC-1: no artifacts, dxva2 disabled

Bluray Remux encoded in AVC: heavy artifacts, dxva2 enabled & working
Bluray Remux encoded in VC-1: no artifacts, dxva2 enabled & working

Bluray Remux encoded in AVC: no artifacts, dxva2 disabled
Bluray Remux encoded in VC-1: no artifacts, dxva2 disabled

Any other stuff (mkv,....) works as it should with dxva2 enabled and showing no artifacts.

Does it have to do something with this ffmpeg thing thespecialist is working on at the moment? Or should it have to be fixed already with your ATI artifacts patch?

Maybe you have a solution to this.

Please let me know if you need further information, for example mediainfo files or else.

Keep up the good work!!

I did another try with a11599's patch and the problem seems to be gone.
Hardware deinterlacing on interlaced files works as the AVC stuff does as well.
On a11599's thread you said, you implemented a11599's patch in your version of the patch so this maybe helps to find the "error"?

Anyway, you do all do an amazing job! I would never be able to to that... I'm just that guy in front of the PC... Big Grin
Reply
#64
topsyturvy Wrote:Indeed dxva deinterlacing is really useful when playing dxva decoded live-tv (hdtv). That is exactly what is done by a11599's patch.

If I understand correctly, isidrogar's patch allows dxva interlacing to be ALSO used for software decoded content. Normally software decoded content isn't high definition e.g. DVD ISO's. I have an ION system and it easily plays and deinterlaced DVD ISOs using software. I don't think CPUs get any weaker than Atom cpus. (On the other hand I absolutely need a11599's patch to play interlaced high defination tv stuff)

A lot of people seem really excited about this patch, I'm just trying to understand why :-)

I don't know for sure, but I got the impression that the old software deinterlacing in xbmc was either broken or at least the 'auto' mode didn't always work. This has now been changed in the latest nightlies (introduction of YADIF avfilter) and guess what, the Atom doesn't handle it anymore... (>10% frame drops). More than ever it gets interesting to have the hardware do the deinterlacing.
Reply
#65
Voyager-xbmc Wrote:I don't know for sure, but I got the impression that the old software deinterlacing in xbmc was either broken or at least the 'auto' mode didn't always work. This has now been changed in the latest nightlies (introduction of YADIF avfilter) and guess what, the Atom doesn't handle it anymore... (>10% frame drops). More than ever it gets interesting to have the hardware do the deinterlacing.

very interesting, thanks for the info.

the auto-mode software deinterlacer worked for me as far as I know. However I didnt really pay attention to the quality of the deinterlacing ...
Reply
#66
topsyturvy Wrote:very interesting, thanks for the info.

the auto-mode software deinterlacer worked for me as far as I know. However I didnt really pay attention to the quality of the deinterlacing ...

You haven't watched interlaced sources much if you haven't noticed it. The motion quality of the old 25fps blend method is horrible. Watching true 50fps interlaced source material (e.g. sports broadcasts) is torture with it.

And the hardware deinterlacers are actually very good quality-wise, software deinterlacing can't match it. Implementing vector adaptive algorithms requires huge amounts of CPU power if done on software.
Reply
#67
isidrogar:
Do I see correctly that you enable ATI h.264 ffmpeg bugfix by checking for ATI vendor ID? Is that correct? The workaround is only needed for old UVD decoder block cards. CDecoder::IsL41LimitedATI() checks exactly that. Perhaps you should use this to check if the workaround is needed. This might explain the decoding errors seen by sw4y.

EDIT

The issue appears to be DXVA.cpp @line 635.

The code says:
Code:
#ifdef FF_BUG_DXVA2_ATI
  D3DADAPTER_IDENTIFIER9 identifier = g_Windowing.GetAIdentifier();
  if (identifier.VendorId == PCIV_ATI) {
    avctx->workaround_bugs |= FF_BUG_DXVA2_ATI;
  }
#endif

I think this should be:
Code:
#ifdef FF_BUG_DXVA2_ATI
  if (IsL41LimitedATI()) {
    avctx->workaround_bugs |= FF_BUG_DXVA2_ATI;
  }
#endif
Reply
#68
for those interested: I managed to create a build that includes both software (YADIF avfilter) and hardware based deinterlacing. The auto method prefers hardware if available (using same fallback order best -> bob -> progressive).
There is also the "avfilter auto"-method which only turns on YADIF if the source is flagged as interlaced.

My git is located here, if you want to review the commits (especially the latest one - bec0d77...): https://github.com/Voyager-xbmc/xbmc

A working build here: http://www.multiupload.com/4T1T8NZM0D

Any comments welcome!
Reply
#69
sw4y Wrote:Does it have to do something with this ffmpeg thing thespecialist is working on at the moment?
No. My patch only was for VC-1. The newer patch is for MPEG2, but that doesn't affect AVC either. For the MPEG2 patch to have any negative side effects is pretty much impossible. It just increases the framebuffer size. The VC-1 patch in theory might have negative side effects but I consider this to be highly unlikely, since I followed all specs as laid out by Microsoft and I limited the patch to only work on the subset of VC-1 video's that were problematic in the first place.

Isidrogar changed some things in AVC/h264, which might have caused it. Please post a cut part of the video.
Reply
#70
thespecialist Wrote:Isidrogar changed some things in AVC/h264, which might have caused it. Please post a cut part of the video.

Hey, I made a sample of one file, that did not work properly. I hope 10s should be ok.

http://www.multiupload.com/N6Z0LNSWYF

*edit*

a11599, the code can not be changed in an installed version of xbmc right? It has to be changed before compiling a new version/installer I guess?
Reply
#71
Yes, you need to do this in the source code.
Reply
#72
a11599 Wrote:Yes, you need to do this in the source code.

Ok, then it's nothing I could do... Laugh
Reply
#73
sw4y Wrote:Hey, I made a sample of one file, that did not work properly. I hope 10s should be ok.

http://www.multiupload.com/N6Z0LNSWYF

Ok, will look at it later today (got some other stuff to do first) but since this is H264, it seems only logical that the problem is caused by Isidrogar's H264 patch.
Reply
#74
thespecialist Wrote:Ok, will look at it later today (got some other stuff to do first) but since this is H264, it seems only logical that the problem is caused by Isidrogar's H264 patch.

Thanks for your work. I made a second sample, that does not show any artifacts when playing back with isidrogars patch. Maybe this helps to solve the problem.

http://www.multiupload.com/RGFH4BO1NQ
Reply
#75
I just compiled the official Dharma 10.1 release with both my VC1 and MPEG2 patches includes, for the rest just official 10.1 release files. As expected, your files play perfectly fine, so it's Isidrogar's code that must cause it. I haven't looked into his H264 patch myself ...

@Isidrogar: did you look at that video ?
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 14

Logout Mark Read Team Forum Stats Members Help
[PATCH] Hardware deinterlacing for both software and DXVA2 decoded material0