• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 14
[PATCH] Hardware deinterlacing for both software and DXVA2 decoded material
djon:
I'm not very experienced with git, but I suggest you to forget about TortoiseGit and all stuff like that and start to use the command line... Right-click on your xbmc folder, select "Git Bash Here" and then apply the .diff using command line like:
diff -p1 <../[path_to].diff

Maybe the merging will not be clean, but you will see it failing for some points. In this case you will have *.rej files containing the merges which have been rejected. Then you will need to manually fix the source code. Depending on the age of the source code you are applying the patch this might turn out to be a tricky job. Smile
Reply
a11599 probably meant to write:
patch -p1 <../[path_to].diff

I completely agree about forgetting TortoiseGit. It is useless.
Reply
a11599 Wrote:@isidrogar:
Yes that is the check. Your explanation is right, however it's exactly the blt which fails here. I discovered this when testing background video play using an ISO on a network share. When the blt was trying to render a non-existing frame (or a frame which did not had all the required references) XBMC GUI either froze immediately or at the end of playback. Maybe this is only with some hardware/driver combinations but nevertheless if it failed here it could fail elsewhere. Smile

Thanks a11599!

I think you are right and it's better not to allow blt fail. My only concern is the check can be packed and clearly expressed like:

if ((time > m_time) || (m_time - time >= (m_size - m_caps.NumBackwardRefSamples - m_caps.NumForwardRefSamples) * 2))
{ ... }

as you split REFERENCE_TIME "items" from buffer time in comparison thus avoiding negative results with substractions (types are unsigned and this is bad).
Reply
Thanks WhiningKhan for correcting my stupid mistake. Smile

@isidrogar: yep, that's right, I will correct in my patch. Thanks for spotting that.
Reply
Thanks for the patches, they solved most of my problems with interlaced TV captures, except a few 1080i30 files.

The problem is this: When I resume playback of a 1080i30 file, it plays correctly for a couple of seconds (file read as 29.97fps, screen at 59Hz) but then the screen flickers and switches to 23Hz (file read as 23.976fps, screen at 23.976Hz). The file plays fine when I play it from the beginning. Files at 1080i25 play fine.

I use this build.

Debug log
File info
Reply
I have seen similar issues the opposite way where display switches to 60 Hz when seeking in 24p files. This cured itself after a while automatically and the screen switched back to 24p. I think the framerate counter goes crazy in these cases. What happens if you let the playback continue? Will the display switch back to 60 Hz after a while?

EDIT: This is not a debug log. Please turn on debug logging and paste a new log please.
Reply
a11599 Wrote:I have seen similar issues the opposite way where display switches to 60 Hz when seeking in 24p files. This cured itself after a while automatically and the screen switched back to 24p. I think the framerate counter goes crazy in these cases. What happens if you let the playback continue? Will the display switch back to 60 Hz after a while?

EDIT: This is not a debug log. Please turn on debug logging and paste a new log please.

Sorry about the wrong log, here is a new one

My problem doesn't have anything to do with seeking, it happens when I start the video by selecting the "Resume from xx.xx" option. I let it play but it never recovered the normal fps, it just kept dropping frames, about 1000 per minute.

And I have another question, this one is easy to answer Big Grin
Does this patch need a powerful GPU? I have an ATI HD5450 and the framerates stay in the 45-55 range when I play 1080i30 material (and the aforementioned problem doesn't appear)

Thanks for your time.
Reply
It is obviously the framerate calculator that goes crazy here:
Code:
15:43:29 T:1612 M:1177411584   DEBUG: CDVDPlayerVideo::CalcFrameRate framerate was:29.970030 calculated:23.976024

Maybe it is telecined video (24p video converted to 30i) and that confuses the framerate calculator? I can't really help here but this could be a trace that might be investigated further.

The deinterlacing feature itself does not require a powerful GPU, but advanced deinterlacing like vector adaptive with 1080i material might require something better than the 5450 (also in the case of XBMC keep in mind the GPU will also need to render XBMC's overlays, OSD and GUI). For real interlaced 1080i30 videos you should have 60 fps after deinterlacing (not sure about telecined videos, I live in PAL land), if you get less it indicates your card cannot handle the load. First please try with deinterlacing set to Bob to see if your output framerate can reach 60 fps. In this case, your card is certainly lacking the power to do HQ deinterlacing (you can still restrict it to bob for 1080i via advancedsettings.xml, but Bob kind of sucks).

From my previous readings the 5450 is just capable of vector-adaptive deinterlacing, but then there is not much left for other tasks (rendering XBMC overlays for example). The 5450 cannot do any post processing (edge enhancement, noise reduction, etc.) with vector-adaptive deinterlacing @1080. So please also make sure you disable these in CCC.
Reply
a11599 Wrote:It is obviously the framerate calculator that goes crazy here:
Code:
15:43:29 T:1612 M:1177411584   DEBUG: CDVDPlayerVideo::CalcFrameRate framerate was:29.970030 calculated:23.976024

Maybe it is telecined video (24p video converted to 30i) and that confuses the framerate calculator? I can't really help here but this could be a trace that might be investigated further.

The deinterlacing feature itself does not require a powerful GPU, but advanced deinterlacing like vector adaptive with 1080i material might require something better than the 5450 (also in the case of XBMC keep in mind the GPU will also need to render XBMC's overlays, OSD and GUI). For real interlaced 1080i30 videos you should have 60 fps after deinterlacing (not sure about telecined videos, I live in PAL land), if you get less it indicates your card cannot handle the load. First please try with deinterlacing set to Bob to see if your output framerate can reach 60 fps. In this case, your card is certainly lacking the power to do HQ deinterlacing (you can still restrict it to bob for 1080i via advancedsettings.xml, but Bob kind of sucks).

From my previous readings the 5450 is just capable of vector-adaptive deinterlacing, but then there is not much left for other tasks (rendering XBMC overlays for example). The 5450 cannot do any post processing (edge enhancement, noise reduction, etc.) with vector-adaptive deinterlacing @1080. So please also make sure you disable these in CCC.

Thank you for your very informative reply.
I think I found the problem with the low frame rate: the files I'm trying to play are MPEG2 files and my ATI doesn't use DXVA with them. I think it is a limitation of the low-spec ATI cards. In fact, I think they added MPEG2 hardware acceleration in the last Catalyst driver but only for the 6xxx cards.

The problem with the wrong calculated frame rate still exists though.
Reply
Hi,

I installed your latest installer (XBMCSetup-20110628-aad63df-dx.exe) and de-interlacing seems to work very good. (Sometimes when panning there are some hick-ups but definitely better than without de-interlacing)

When watching different things the last few days i noticed that the color and brightness of the screen changed quite often. Since i was able to capture this effect it has to be a software related problem.

In these pictures you can see the effect:
Image
Image
Image

The effect is best visible on the curtain and the wood. Both have a yellowish look in the first and the last picture. The second picture is how it should look.
(It's best to download the pictures in picture viewer to compare them)

Afterwards i installed he latest nightly build (XBMCSetup-20110710-594a2d5-master.exe) and there the effect is not visible. That is why i think it has something to do with the applied patches. (I'm not saying it has to do anything with the interlaced patch). What is even stranger is that i noticed the effects on progressive mkv's. (The screenshots are from a progressive mkv).
Oh, and even with your patched version i don't see the effect on another pc that has no dxva.

Is there anybody else who has noticed this effect?

My video card is a NVIDEA GF210.
Reply
The.Bartman Wrote:Is there anybody else who has noticed this effect?

Me too, with an 8400GS and a GT220. I also noticed it with the current pull request.
Reply
What do you mean by changing quite often? Is this a pulsating effect? Was the source software or hardware decoded?
Reply
Hi! I tried this patched version on my MSI E350IA-E45 mobo (AMD Fusion E-350 Zacate with HD6310), but have dropped frames even on SD content with Bob deinterlace...
Reply
a11599 Wrote:What do you mean by changing quite often? Is this a pulsating effect? Was the source software or hardware decoded?

Yes, a random pulsating effect. It happens with or without DXVA enabled but only with your patch applied.

This sample clearly shows it.
Reply
a11599 Wrote:What do you mean by changing quite often? Is this a pulsating effect? Was the source software or hardware decoded?

Definetly not pulsating for me. I occurs usually when something in the picture changes. For instance a change of subtitle, in this example, when the lady moved her arm acros the screen, then suddenly the curtain turns yellowish.

I once noticed a pulsating effect, but this was when the info about the video and audio on top of the screen was activited. (With the transparency skin). But i think that if subtitles changed as quickly as this info, then they would cause some pulsating effect too.

It is definitely not a flicker of 25 or 50 hz. It is not a flicker that happens every image. (Again, I don't see any relation to the deinterlacing, except that it is only in your build.)
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 14

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