Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 23rd June 2011, 21:37   #17561  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
Quote:
Originally Posted by clsid View Post
Buffer option works now. But animation option still broken.
Problem found, I was not reading the same key I was writing in the registry so the saved value was not reloaded ... I hope it is ok now : VSFilter_v3.7z !

Last edited by Underground78; 24th June 2011 at 06:08. Reason: link fixed
Underground78 is offline  
Old 23rd June 2011, 22:39   #17562  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,385
Quote:
Originally Posted by Underground78 View Post
Problem found, I was not reading the same key I was writing in the registry so the saved value was not reloaded ... I hope it is ok now : VSFilter_v3.7z !
httpwww.mediafire.comoukb4ur3rk0fxzy cannot be OK
Midzuki is offline  
Old 24th June 2011, 02:21   #17563  |  Link
namaiki
Registered User
 
Join Date: Sep 2009
Location: Sydney, Australia
Posts: 1,073
http://www.mediafire.com/?oukb4ur3rk0fxzy

Regarding the "allow animation when buffering" checkbox-

In v3: Tick means animation is disabled when buffering, unticked means buffer with animation.

So, you could either reverse the function of the checkbox or reverse the displayed name/action of the checkbox. To disable buffering, user can change 'sub pictures to buffer' to '0'.

Last edited by namaiki; 24th June 2011 at 02:53.
namaiki is offline  
Old 24th June 2011, 04:58   #17564  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,385
@namaiki: Thanx
Midzuki is offline  
Old 24th June 2011, 06:19   #17565  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
Sorry for the link, I still don't understand how this happened ...

Quote:
Originally Posted by namaiki View Post
In v3: Tick means animation is disabled when buffering, unticked means buffer with animation.

So, you could either reverse the function of the checkbox or reverse the displayed name/action of the checkbox.
I have kept the same name than in MPC-HC and reversed the action of the checkbox: VSFilter_v4.7z.

Quote:
Originally Posted by namaiki View Post
To disable buffering, user can change 'sub pictures to buffer' to '0'.
Is that ok ? It was done like that in MPC-HC so I have kept it the same way.
Underground78 is offline  
Old 24th June 2011, 06:31   #17566  |  Link
namaiki
Registered User
 
Join Date: Sep 2009
Location: Sydney, Australia
Posts: 1,073
Quote:
Originally Posted by Underground78 View Post
I have kept the same name than in MPC-HC and reversed the action of the checkbox: VSFilter_v4.7z.
Everything seems to work as it should. Awesome work!

Quote:
Originally Posted by Underground78 View Post
Is that ok ? It was done like that in MPC-HC so I have kept it the same way.
I think it should be fine as long as animation is enabled by default. Also, I might recommend buffer set to 4 subpictures by default due to flickering subtitles on 3 when there is more than a single subtitle line on the screen.

Last edited by namaiki; 24th June 2011 at 07:06.
namaiki is offline  
Old 24th June 2011, 10:53   #17567  |  Link
clsid
Registered User
 
Join Date: Feb 2005
Posts: 4,623
Working OK now, so time to commit.
Changing buffer size to 4 should be fine. Please change it in MPC as well. The old default in VSFilter was 10, but I don't know if a larger buffer than 4 has much real benefit.

I did notice a crash when changing the settings during playback. Perhaps that can be solved by reading the setting into two vars, one for usage during playback, and one purely for the GUI. So no real-time update of the setting.

I did some basic benchmarks to test the performance of subs. These numbers were gathered with ProcessExplorer and from just one run per test, so take results with a grain of salt.
I measured the total CPU time used by MPC while playing a 720x480 H.264 clip with subtitles that have karaoke effects. Clip duration 1m46s.

Without subs
6.74 seconds

New VSFilter, Buffer = 0
12.38

VSFilter 2.39, Buffer = 0
13.09

New VSFilter, Buffer = 4
10.54

New VSFilter, Buffer = 4, Animation on
13.81

New VSFilter, Buffer = 10
11.01

New VSFilter, Buffer = 10, Animation on
13.76

VSFilter 2.39, Buffer = 10
10.78

Conclusions:
- Heavy subtitles can have a big performance impact. Up to 50% of the total CPU usage.
- Animation with buffering uses the most CPU time. Followed by Animation without buffers. Buffering without animation uses the least CPU time.
- Animation can use up to 80% more CPU time than no animation.
- New VSFilter is not much faster than the old one. I expected a bigger difference with the recently added performance tweaks. Perhaps the VSFilterMod additions have some negative effect on performance.

I might do another test with basic SRT subs later to measure performance in case of a non-animated sub.
clsid is offline  
Old 24th June 2011, 14:00   #17568  |  Link
tetsuo55
MPC-HC Project Manager
 
Join Date: Mar 2007
Posts: 2,317
That is kind of disappointing.

please do the basic SRT test.
__________________
MPC-HC, an open source project everyone can improve. Want to help? Test Nightly Builds, submit patches or bugs and chat on IRC
tetsuo55 is offline  
Old 24th June 2011, 14:43   #17569  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 509
Well, unfortunately VSFilter has been and will continue to be slow. No real news there. And I kind of expected there to be not much of real performance-up, although the "multithreaded VSFilter" guy is relatively enthusiastic, which is a good thing.

Anyways, if we want real speed-ups, someone needs to make fontconfig less awful on Windows so we can use libass instead :3
__________________
[I'm human, no debug | Unofficial x264 Builds]
JEEB is offline  
Old 24th June 2011, 15:03   #17570  |  Link
clsid
Registered User
 
Join Date: Feb 2005
Posts: 4,623
With a quickly manually created SRT I get results between 7,5 and 7,9 seconds. So those differences are small.
Btw, all the above tests were done with the standard EVR renderer.

EVR CP has a very nasty 'bug' that makes it consume CPU cycles even when paused or when playback has stopped. Hopefully that can be given some priority to fix.

I also tried with the internal sub renderer (and EVR CP instead of EVR), but I got weird results. Both SSA and SRT have same CPU time of 17.0s (buffer 4 + anim), no subs gave 14.4. The measurement method might be inaccurate.
clsid is offline  
Old 24th June 2011, 15:16   #17571  |  Link
namaiki
Registered User
 
Join Date: Sep 2009
Location: Sydney, Australia
Posts: 1,073
Quote:
Originally Posted by clsid View Post
EVR CP has a very nasty 'bug' that makes it consume CPU cycles even when paused or when playback has stopped. Hopefully that can be given some priority to fix.
I believe it's because it's continually scanning the screen's refresh rate.


Quote:
Originally Posted by clsid View Post
I did notice a crash when changing the settings during playback. Perhaps that can be solved by reading the setting into two vars, one for usage during playback, and one purely for the GUI. So no real-time update of the setting.
There is the 'Apply changes immediately' checkbox in the 'Misc' tab. I suppose that could be disabled by default. (please don't get rid of it)

Last edited by namaiki; 24th June 2011 at 15:40.
namaiki is offline  
Old 24th June 2011, 17:49   #17572  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
So everybody agrees with that:
Quote:
Originally Posted by namaiki View Post
I think it should be fine as long as animation is enabled by default. Also, I might recommend buffer set to 4 subpictures by default due to flickering subtitles on 3 when there is more than a single subtitle line on the screen.
Quote:
Originally Posted by namaiki View Post
There is the 'Apply changes immediately' checkbox in the 'Misc' tab. I suppose that could be disabled by default. (please don't get rid of it)
If everybody does, I will commit the changes and also update default settings for MPC-HC.

Edit : Here what MPC-HC does to choose if it enables or not animation when buffering :

Code:
		bool bAllowAnimationWhenBuffering = true;
		SYSTEM_INFO SysInfo;
		GetSystemInfo(&SysInfo);
		if (SysInfo.dwNumberOfProcessors < 3) {
			bAllowAnimationWhenBuffering = false;
		}
Maybe I should keep something like that ? Although I am not sure it is really useful to check the number of processors if VSFilter is not multithreaded ?

Last edited by Underground78; 24th June 2011 at 17:54.
Underground78 is offline  
Old 24th June 2011, 18:14   #17573  |  Link
fastplayer
Registered User
 
Join Date: Nov 2006
Posts: 799
Assuming that the code is actually not multithreaded, this sure looks like a lazy man's performance categorization. It is pure nonsense IMO.
fastplayer is offline  
Old 24th June 2011, 18:23   #17574  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
Quote:
Originally Posted by fastplayer View Post
Assuming that the code is actually not multithreaded, this sure looks like a lazy man's performance categorization. It is pure nonsense IMO.
Yeah but I need to be sure the code is not multithreaded at all.
Underground78 is offline  
Old 24th June 2011, 18:27   #17575  |  Link
fastplayer
Registered User
 
Join Date: Nov 2006
Posts: 799
Quote:
Originally Posted by Underground78 View Post
Yeah but I need to be sure the code is not multithreaded at all.
Even if it was, it wouldn't be dependent on this setting at all. There's no variable that saves the number of cores and uses it subsequently throughout the code.
We had similar nonsense in ffdshow that Stargazer removed when he cleaned up the colorspace conversion code.
fastplayer is offline  
Old 24th June 2011, 18:42   #17576  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
Quote:
Originally Posted by fastplayer View Post
Even if it was, it wouldn't be dependent on this setting at all. There's no variable that saves the number of cores and uses it subsequently throughout the code.
We had similar nonsense in ffdshow that Stargazer removed when he cleaned up the colorspace conversion code.
I am not sure to understand, it is just an hint for the user I guess so why would you need a variable to save the number of core ? However I am quite sure it was wrongly chosen and I will probably delete it.
Underground78 is offline  
Old 24th June 2011, 18:47   #17577  |  Link
fastplayer
Registered User
 
Join Date: Nov 2006
Posts: 799
Quote:
Originally Posted by Underground78 View Post
I am not sure to understand, it is just an hint for the user I guess so why would you need a variable to save the number of core ? However I am quite sure it was wrongly chosen and I will probably delete it.
The code basically says that anything with less than 3 cores is not suitable of running sub animations which is total nonsense of course. Especially considering that the code itself is not multithreaded at all.

My suggestion:
Code:
bool bAllowAnimationWhenBuffering = true;
SYSTEM_INFO SysInfo;
GetSystemInfo(&SysInfo);
	if (SysInfo.dwNumberOfProcessors < 3) {
                bAllowAnimationWhenBuffering = false;
}
 	
r.fSPCAllowAnimationWhenBuffering = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), bAllowAnimationWhenBuffering);
replace with
Code:
r.fSPCAllowAnimationWhenBuffering = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), true);
fastplayer is offline  
Old 24th June 2011, 18:50   #17578  |  Link
clsid
Registered User
 
Join Date: Feb 2005
Posts: 4,623
Quote:
There is the 'Apply changes immediately' checkbox in the 'Misc' tab. I suppose that could be disabled by default. (please don't get rid of it)
Disabling that option is not a good idea. It is useful for seeing effects of font and size changes.
The crash only happens with the two new settings. Just do not apply those changes directly.

The rationale behind the number of processors check is that a CPU with multiple cores is usually a reasonably fast one.

Quote:
I believe it's because it's continually scanning the screen's refresh rate.
That could be made conditional based on the playback state. Maybe the scan interval can be increased as well to lower CPU usage. Isn't the refresh rate typically a constant value? Except maybe at the start if rate changing is enabled.
clsid is offline  
Old 24th June 2011, 20:25   #17579  |  Link
Underground78
Registered User
 
Underground78's Avatar
 
Join Date: Oct 2004
Location: France
Posts: 539
Quote:
Originally Posted by clsid View Post
Disabling that option is not a good idea. It is useful for seeing effects of font and size changes.
The crash only happens with the two new settings. Just do not apply those changes directly.
I've changed the code so that those two settings are not applied immediately : VSFilter_v5.7z. I have also change the default to 4 and true but I can still change this.

Quote:
Originally Posted by clsid View Post
The rationale behind the number of processors check is that a CPU with multiple cores is usually a reasonably fast one.
This is how I understood it at first that's why I am not sure what to do. Even if it is a test for lazy, we may not want to always enable this setting.
Underground78 is offline  
Old 24th June 2011, 23:08   #17580  |  Link
clsid
Registered User
 
Join Date: Feb 2005
Posts: 4,623
Working fine now.

The core detection code is only used for the default setting. It is only used if the value was not yet set in the Registry/INI.
clsid is offline  
Closed Thread

Tags
dxva, h264, home cinema, media player classic, mpc-hc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:27.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.