[PATCH] Hardware deinterlacing for both software and DXVA2 decoded material

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
margro Offline
Fan
Posts: 654
Joined: Oct 2009
Reputation: 21
Location: The Netherlands
Post: #46
@loggio:
The PVR channel list dialog "DialogPVRChannelsOSD.xml" has still 2x the following check: !pvr.IsPlayingRadio. It seems to me that the implementation of this check inside XBMC is too slow. Try removing the 2 lines with this check.
My guess is that you won't see the framedrop anymore.

Developer of the MediaPortal PVR addon and the Argus-TV PVR-addon. Unofficial XBMC Windows builds with PVR.
http://www.scintilla.utwente.nl/~marcelg/xbmc
find quote
a11599 Offline
Team-Kodi Member
Posts: 320
Joined: Sep 2010
Reputation: 3
Location: Budapest, Hungary
Post: #47
The ION is certainly too weak for deinterlacing + HQ PS based scalers. With HQ scaling you will see heavy stutter as the ION cannot do more than ~25-30 fps with PS based scalers.

If you select DXVA scaling method, HQ scalers are not activated. This should provide smooth playback. If zoom > 1 is broken only with DXVA scaling, then this might be because of the changes made to the DXVA video processor code (I still had no time to look at it Sad).

My patches (source code) :: Windows installer builds
These builds are unofficial! If you find a bug, make sure it is also present in a recent official build and you can reproduce it before filing a ticket.
find quote
Voyager Offline
Team-Kodi Member
Posts: 378
Joined: Apr 2010
Reputation: 5
Location: Belgium
Post: #48
a11599 Wrote:If you select DXVA scaling method, HQ scalers are not activated. This should provide smooth playback. If zoom > 1 is broken only with DXVA scaling, then this might be because of the changes made to the DXVA video processor code (I still had no time to look at it Sad).

It certainly looks that way with my build using the DXVA deinterlacing turned on: normal DXVA scaling means smooth playback but no zoom - any other scaling (which probably means HQ scaling) stutters heavily but you can zoom :-)
find quote
loggio Offline
Fan
Posts: 593
Joined: May 2010
Reputation: 6
Post: #49
margro Wrote:@loggio:
The PVR channel list dialog "DialogPVRChannelsOSD.xml" has still 2x the following check: !pvr.IsPlayingRadio. It seems to me that the implementation of this check inside XBMC is too slow. Try removing the 2 lines with this check.
My guess is that you won't see the framedrop anymore.



Spot on Margro, just tested it... deleted both instances and it worked great.Cool

don't forget to put that fix in your next release Nod hehe
find quote
veggy Offline
Junior Member
Posts: 2
Joined: Jun 2011
Reputation: 0
Post: #50
loggio Wrote:Spot on Margro, just tested it... deleted both instances and it worked great.Cool

don't forget to put that fix in your next release Nod hehe

I have experienced the same problems with dropping frames, when bringing up the channel list.

Would you be able to share this build with an installer?

I've just started compiling my own builds, but I'm struggling with applying patches at the moment.


regards,
Veggy
find quote
loggio Offline
Fan
Posts: 593
Joined: May 2010
Reputation: 6
Post: #51
Veggy.

Margros pvr builds are on his website:
http://www.scintilla.utwente.nl/~marcelg/xbmc

If you want stability, get the 10.1 build.

If you want to test bleeding edge stuff, deinterlace etc... get the master builds.

Keep in mind that the master builds are very buggy.
find quote
Voyager Offline
Team-Kodi Member
Posts: 378
Joined: Apr 2010
Reputation: 5
Location: Belgium
Post: #52
hi all - elupus seems to have included yadif deinterlacing filter as part of ffmpeg decoding. While this is software, it may be interesting to see how this can be used in conjunction with this patch (I even wonder whether it still makes sense, since I assume everything coming out of ffmpeg now to be deinterlaced).Confused
find quote
veggy Offline
Junior Member
Posts: 2
Joined: Jun 2011
Reputation: 0
Post: #53
loggio Wrote:Veggy.

Margros pvr builds are on his website:
http://www.scintilla.utwente.nl/~marcelg/xbmc

If you want stability, get the 10.1 build.

If you want to test bleeding edge stuff, deinterlace etc... get the master builds.

Keep in mind that the master builds are very buggy.

Thanks, I did a master build and removed the 2 lines, but I still get loads of framedrops when i bring up any GUI menus, even the debug screen makes the video drop loads of frames.

I have reverted back to the 10.1 build that Margro has and it works nice and smooth but no de-interlace unfortunately.
find quote
ashlar Offline
Donor
Posts: 2,159
Joined: Mar 2006
Reputation: 27
Post: #54
Voyager-xbmc Wrote:hi all - elupus seems to have included yadif deinterlacing filter as part of ffmpeg decoding. While this is software, it may be interesting to see how this can be used in conjunction with this patch (I even wonder whether it still makes sense, since I assume everything coming out of ffmpeg now to be deinterlaced).Confused
I can't find trace of this yadif inclusion in TRAC. When did it happen?

For troubleshooting and bug reporting please make sure you read this first.
find quote
Voyager Offline
Team-Kodi Member
Posts: 378
Joined: Apr 2010
Reputation: 5
Location: Belgium
Post: #55
ashlar Wrote:I can't find trace of this yadif inclusion in TRAC. When did it happen?

yesterday June 21, commit ad392e9fbf169611b226
find quote
sw4y Offline
Member
Posts: 77
Joined: Apr 2011
Reputation: 0
Post: #56
isidrogar Wrote:After many tests I have found the best way to fix "black/mixed screen" problem with a generic solution.

It is based on detecting when a still image is presented cheking if there is repeated presentation time, and in this case set SampleFormat of the samples to DXVA2_SampleProgressiveFrame. The processor then renders the frame using only the last (correct) surface.

I'm at work now, but I'll post a compiled version soon for getting your feedback.

Hey, thank you all for your amazing work to make xbmc essential for almost any htpc out there!

Any news about the "black screen" fixing?
Would be nice Wink

Best wishes and thanks again for making all this possible!

*edit*

I just noticed that xbmc does not save the setting for Deinterlacing (e.g. Best available) at exit.
But I guess it must have something to do with the Black Screen Thing?

Greetz!
(This post was last modified: 2011-06-22 16:24 by sw4y.)
find quote
Voyager Offline
Team-Kodi Member
Posts: 378
Joined: Apr 2010
Reputation: 5
Location: Belgium
Post: #57
a11599 Wrote:If you select DXVA scaling method, HQ scalers are not activated. This should provide smooth playback. If zoom > 1 is broken only with DXVA scaling, then this might be because of the changes made to the DXVA video processor code (I still had no time to look at it Sad).

Any idea how to fix the "dxva" scaling method to accept zoom > 1??
find quote
isidrogar Offline
Member
Posts: 59
Joined: Jun 2011
Reputation: 1
Location: Spain
Post: #58
Hi all,

Finally, the long awaited installer including fix for "black screen" problem and DXVA scaling zoom is here! Smile

Everybody curious about the changes can check my git, but as summary:

For "black screen" problem I have created a new method in CProcessor named StillFrame that fills all the VideoSample array buffer with the same surface and is called when CDVDPlayerVideo detects a still frame. This was done this way because setting SampleFormat to DXVA2_SampleProgressiveFrame as said in my post before was working wrong with paused video.

Regarding DXVA zoom the fault was an incorrect target rectangle in DXVA2_VideoProcessBltParams structure used in Render method for VideoProcessBlt.

I will appreciate all the feedback for these changes before posting a new patch release in trac.

I'm a little busy this week but I will try to merge opdenkamp's pvr to a new branch in my git for including the patch and upload an installer soon, probably the weekend.
find quote
Voyager Offline
Team-Kodi Member
Posts: 378
Joined: Apr 2010
Reputation: 5
Location: Belgium
Post: #59
isidrogar Wrote:I will appreciate all the feedback for these changes before posting a new patch release in trac.

hola isidrogar - nice work!! I've pulled your latest commit into my build and the black screen issue + dxva zoom are indeed resolved. Thanks a lot! Also, I've rebased to the latest xbmc/master and disabled yadif software deinterlacing to happen so that I can benefit from dxva deinterlacing :-)
find quote
topsyturvy Offline
Member
Posts: 87
Joined: Jul 2010
Reputation: 0
Post: #60
For clarification, can someone comment on why we would like to use dxva deinterlacing for software decoded content?

Is software deinterlacing very resource intensive?

In terms of quality, my understanding is that software implimation of decoding/deinterlacing are NORMALLY superior to hardware implimented ones.

thanks and looking forward to your comments.
find quote
Post Reply