[PATCH] Hardware deinterlacing for both software and DXVA2 decoded material
Voyager
Team-XBMC Member Joined: Apr 2010 Reputation: 4 Location: Belgium |
2011-06-17 16:21
Post: #11
@isidrogar: I have a DVD that starts with a still menu (actually there's quite a few like that). The still is displayed in BLACK with your patch. Reverting back to a11559 commit everything is OK. I'm investigating the root cause.
|
| find quote |
Voyager
Team-XBMC Member Joined: Apr 2010 Reputation: 4 Location: Belgium |
2011-06-18 08:34
Post: #12
@isidrogar
I have found a quick and dirty fix to the 'black still image' problem. Apparently the issue is that the still is only one frame and that it doesn't have enough data to actually deinterlace. So the dirty trick is to add the frame a second time, if pts==0 (case of still image). I don't understand the code enough but I was hoping you could be the judge of this or any better fix. Summary, change the method signature to take pts, and at the end check if pts==0 and if so add the surface again. Code: bool CProcessor::ProcessPicture(DVDVideoPicture* picture, double pts) |
| find quote |
isidrogar
Member Posts: 59 Joined: Jun 2011 Reputation: 1 Location: Spain |
2011-06-18 23:08
Post: #13
@Voyager-xbmc
Thanks for your comments. Yes, the problem about "black still image" is generated because the processor must have enough forward and backward reference frames to render the image. My code differs from a11559's in that the Render method verifies it has all the frames. Obiously this may cause problems in case there is only one frame to show. Your workaround about adding the same surface is a good idea but the problem it only will work in case only one backward refererence frame is needed. I have updated the code with a more generic solution where the Add method do all the work: Code: do { |
| find quote |
isidrogar
Member Posts: 59 Joined: Jun 2011 Reputation: 1 Location: Spain |
2011-06-18 23:27
Post: #14
thespecialist Wrote:isidrogar, @thespecialist Your patch is a great job! Thank you for sharing. I have uploaded a new installer version with all the fixes for bugs found in previous posts and also including your patch for VC-1 and mine for H264.
|
| find quote |
Swifty
Fan Posts: 484 Joined: Nov 2008 Reputation: 1 |
2011-06-19 00:24
Post: #15
@isidrogar
You mentioned in your first post that you are following the PVR branch of XBMC - are your installers based on the PVR branch ? I quickly took a look at one earlier today but it didn't appear to have any LiveTV option ![]() Cheers! |
| find quote |
thespecialist
Senior Member Posts: 126 Joined: Mar 2007 Reputation: 0 |
2011-06-19 00:25
Post: #16
isidrogar Wrote:I have uploaded a new installer version with all the fixes for bugs found in previous posts and also including your patch for VC-1 and mine for H264.Cool, thanks for compiling this, must be the ultimate XBMC package for people who are dependent on DXVA2
|
| find quote |
thespecialist
Senior Member Posts: 126 Joined: Mar 2007 Reputation: 0 |
2011-06-19 01:05
Post: #17
isidrogar Wrote:@Voyager-xbmc Hmmm... I just installed your installer and it still has the problem: black screen after playing an interlaced ISO. It happened only with the 3rd interlaced video I tried though... Video played fine with a11559's patch. If you need any more info or anything at all, just let me know. |
| find quote |
Voyager
Team-XBMC Member Joined: Apr 2010 Reputation: 4 Location: Belgium |
2011-06-19 08:43
Post: #18
thespecialist Wrote:Hmmm... I just installed your installer and it still has the problem: black screen after playing an interlaced ISO. It happened only with the 3rd interlaced video I tried though... Video played fine with a11559's patch. If you need any more info or anything at all, just let me know. could it be that there is a stream change right before the still, and that therefore the m_samples array ISN'T empty, so that the fix doesn't work? I've compiled a version of the code that has this in it: download here Code: if (pts==0) {Upon pts==0, it will clear the samples array to avoid any black still after black video.
(This post was last modified: 2011-06-19 09:20 by Voyager.)
|
| find quote |
isidrogar
Member Posts: 59 Joined: Jun 2011 Reputation: 1 Location: Spain |
2011-06-19 14:57
Post: #19
Swifty Wrote:@isidrogar Hi Swifty, Yes I'm following PVR branch but the installer is only compiled againt master HEAD. I want to fix all the bugs before merging it with PVR. When the patch become stable I will create a new PVR branch in my GIT and its installer with all things together .
|
| find quote |
isidrogar
Member Posts: 59 Joined: Jun 2011 Reputation: 1 Location: Spain |
2011-06-19 15:16
Post: #20
@Voyager-xbmc, @thespecialist:
Thank you for your help here. It seems the problem is more complicated. I have tested a DVD with a still menu image and when you navigate into DVD menu pages the background is mixed with last and new page. This is because the processor is trying to deinterlace with totally different backward reference frames. The same occurs in your videos but in that case the "last page" doesn't exit and a black image is shown. With this information any solution based in pts==0 will not always work. The a11559's patch is probably working because it defaults to "none" deinterlacing method or you have this selected. Can you please confirm the framerate is not doubled pressing "O" in still menu? Can you also confirm a11559's behavior with a forced deinterlacing method to "Best available" (you must have double framerate in this case)? To avoid the problem in my code for now you can select "Auto" deinterlacing method as it will properly deinterlace when needed. Anyway I will keep working in a solution for the case you have forced deinterlacing. |
| find quote |




Search
Help