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

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
isidrogar Offline
Member
Posts: 59
Joined: Jun 2011
Reputation: 1
Location: Spain
Post: #41
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.
find quote
isidrogar Offline
Member
Posts: 59
Joined: Jun 2011
Reputation: 1
Location: Spain
Post: #42
loggio Wrote:isidrogar,

I've tested Margro's last two pre-eden builds of his PVR branch located here - http://www.scintilla.utwente.nl/~mar...ld.html#master

They contain a11599's De-interlace patch.

De-interlace is working great with pvr... However i noticed an issue that when watching live tv and pushing 'C' to bring up the channel list, the video stutters and drops a lot of frames... I'm not sure if this is a problem with the Confluence skin or his patch.

But i'm willing to bet that the problem is probably the same when using your patch.

I realise these are pre-releases and are buggy, but i can confirm that the problem only exists when De-interlacing is enabled, if you changed video de-interlace settings to 'none' the problem goes away... This leads me to believe it's not a skin related issue.
So it's worth addressing.

Just thought maybe you could test your patch with Margro's git source and have a look to see if the issue is skin related, or a bug with the patch?

Cheers,
Loggio.

Hi Loggio,

I'm planning to create a pvr branch in my git with deinterlacing patches and opdenkamp's fork. I will post the installer for testing when ready. We then can check if this problem appears here.
find quote
a11599 Offline
Team-XBMC Member
Posts: 254
Joined: Sep 2010
Reputation: 2
Location: Budapest, Hungary
Post: #43
Wow, quite a lot of movement here. Smile

Loggio:
What are your hardware specs? I recently realized that low-end hardware like the ION just don't cut with advanced video processing like deinterlacing or advanced scalers. XBMC also renders its own GUI and I have seen stutterings on ION with some more advanced processing when subtitle/OSD is to be rendered besides the video (@1920x1080).

With DXVA deinterlacing your video will become 2x its original framerate which means XBMC will also render its OSD at 2x framerate. This is 50 Hz for PAL or ~60 Hz for NTSC. Simply your hardware might not be able to render the GUI at this framerate. If you press "O" during playback you should see the playback framerate not being able to keep up with the video, hence you are seeing dropped frames.

It's not necessarily the GPU power, in my case for example OC'ing RAM of my ION system (DDR2-800 dual channel) mitigated the issue, so the ION is clearly starving for memory bandwidth - at least with DDR2 boards.

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
loggio Offline
Fan
Posts: 562
Joined: May 2010
Reputation: 6
Post: #44
A1159,

I'm not sure this is the problem... I forgot to mention that I can bring up ANY other osd with deinterlace enabled and I get no drops what so ever, it's only when I bring up the channel list... (which isn't any different to other OSD's)

I can even exit full screen mode and browse xbmc with little to none frame drops.

If I disable dxva and watch tv and enable de-interlacing, then bring up the channel list it works fine with no frame drops.

dxva deinterlacing using your patch, drops frames if your refresh rate is set below 50hz. I had mine set at a cutom 47.956hz with modified timings, I found this achieved smooth 1080p playback with 23.976fps mkv's

However after applying your patch i couldnt use this refresh rate, as i would get frame drops. So I moved back to 60hz and tv playback worked great with no frame drops.

As I said, it's only this channel list that's causing mass frame drops... Maybe confluemce isnt applying it as 'background' loading or something... I have no idea.

I just need someone to look at it! Hehe

Cheers,
Loggio.
(This post was last modified: 2011-06-20 22:25 by loggio.)
find quote
Voyager Offline
Team-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
Location: Belgium
Post: #45
@isidrogar: as mentioned in the other thread, we have noticed that Zoom does not work anymore above 1.0x. Some older "widescreen" dvds which were actually recorded as 4:3 with black bars cannot be zoomed to fit screen. Above 1x they turn "all black" and only the overlays continue to appear.

EDIT: this appears to happen only if scaling method = DXVA. As a matter of fact this is the only scaling method that reasonbly works ok on my ION, with the deinterlacing going on we are reaching the limits of the hardware due to the double framerate (even on Automatic). Would it be possible to use DXVA deinterlacing in combination with DXVA HQ scalers from a11559 patch?

EDIT2: Actually I'm already using the DXVA hq scalers and they are turned on. I'm not sure whether they actually work or not. Now if they are working, it could also be that the combination of BOTH DXVA deinterlacing and DXVA scaling is to heavy on the ION chip? I will try to deactivate the HQ scaler and just try software scaling instead. One other thing I noticed : I don't have the bi-linear scaling option anymore, which was the "lightest" one of all.
(This post was last modified: 2011-06-21 09:21 by Voyager.)
find quote
margro Offline
Fan
Posts: 530
Joined: Oct 2009
Reputation: 16
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 (Dharma, Eden and Frodo).
http://www.scintilla.utwente.nl/~marcelg/xbmc
find quote
a11599 Offline
Team-XBMC Member
Posts: 254
Joined: Sep 2010
Reputation: 2
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-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
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: 562
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
Post Reply