Log in

View Full Version : MPC-HC tester builds for internal renderer fixes


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Hera
24th March 2012, 03:07
@Hera & RGold: I'll just try again...


The latest version is better, it is just 'not there' yet.
I am not able to get it to speed up it seems.

gilic
24th March 2012, 20:17
I want to update my bug report. If "subpictures to buffer" is 0 mpc-hc crashes, if it's 1 or 2 the moving text on top for that specific file isn't shown/flickering and if its 3 or up everything seems fine "allow animation" is disabled. I've always struggled to find the right combination of settings for subtitles. Everything I tried so far had issues with different files.

JanWillem32
24th March 2012, 22:07
For basic debugging: http://forum.doom9.org/showthread.php?p=1553934#post1553934 . Note that the DirectX debug runtimes are only used to debug the client-side of the graphics interfaces, these don't debug the program itself. To complete the text I linked; I use a very different debugger. The debugger in the compiler suite can hook the program being run and re-trace every instruction in the debug build. That's a bit 'deeper' than just executing it. This type of debugging is near-ideal, but I doubt many people here will have the compiler suite installed.

@fagoatse: Debug builds are the same as release builds, but really slow and full of extra data for error checking and tracing. There's no difference in the handling of player settings.

@Hera: That's at least something, although I don't know what part of the code fixes it (else I would add a comment to it to point out the issue). I'll try the debugger on my other machine tomorrow, maybe I'll find out some more.

@gilic: What I mostly was looking for, is a debug trace text segment, just before crashing.
If "subpictures to buffer" is 0 a different queue handler is used. I'll test that one tomorrow. I never knew it could be sensitive to this kind of thing. (The queue system doesn't create subtitles, it only stores finished subtitles for the video renderer to use.) Don't worry too much about setting the "subpictures to buffer" higher. I've re-written some of the memory functions for it. It's pretty fine now to use 12 (and maybe some more) for even the more extreme karaoke (as long as your video card has enough memory). The reference "Touhou - Bad Apple!!" sample seems to render better with more buffers than what the trunk build prefers.

gilic
24th March 2012, 23:22
Are there any negative side effects with a high subpicture buffer? Also would ollydebug be of any use for your purpose?

Hera
24th March 2012, 23:44
Sound sometimes stutters when MPC crashes (new IMO) / get stuck when seeking, offset also seems to be in 2x,xxx mark.
Seeking has less problems with smaller resolution files.

Uhm, using Haali Splitter, same behavior as seeking can be reproduced when Haali switches from one file (that is like Opening Song) to the main file (the episode itself). This doesn't happen with LAV Splitter because it still doesn't support having Opening / Ending in separate files.

Also switching to D3D FS seemed to attempt to switch instantly... and I had to kill it because it failed.

JanWillem32
25th March 2012, 00:51
@gilic: More subpictures means more video memory consumed. I've made the texture management render-size dependent. For a subtitle with data in every corner of the screen the memory consumption will be quite large.
Example, "Touhou - Bad Apple!!" sample on a 1080p screen: Aspect ratio correction will limit the base render area to 1440×1080. Because this sample renders in pretty much every corner, no further area reduction is used. (I should edit this to handle each piece of text separately, right now it can only blend one composed picture per video frame.) The pixel format is A8R8G8B8 (the color and alpha quality is actually even less than that). That means that there's about 1440×1080×32 bits (5.9326171875 megabyte) in each subtitle texture. That's quite a lot, but doesn't have to be a big problem if there's plenty of video memory left to buffer a bit. Normal subtitles use a smaller drawing area, and will therefore consume less memory.
If you know how to work with OllyDbg, go ahead and try. I haven't worked with it yet.

@Hera: Okay, I'll try to debug tomorrow with the Haali splitter active. I've also seen some problems with switching D3D mode on and off.

Hera
25th March 2012, 05:55
I think it just got stuck the same way as the seeking / haali-file-switching problem. I think... I am not a good tester :P

Also, on Windows 8, I do not get the seek bar in D3D FS mode when moving the mouse cursor down the screen. I can make it appear, by... well... selecting the video by clicking on the video a few times (clicking causes pauses)?
Mouse clicks seem to go through the video before getting the seek bar responding to the mouse - who to blame - bleep if I know

EDIT:
Another behavior I noticed - video stops playing, not during anything weird, just during normal playback.

EDIT:
Another behavior I noticed, after un-pausing, video plays, audio is no where to be found. Pausing and Un-pausing causes audio / video de-sync...

EDIT:
When going transitioning to OP/ED - sometimes the video goes back a 1/4 to 1/8 of a second. Then fast forwards to where it is supposed to be, and at that point gets stuck.

JanWillem32
29th March 2012, 08:33
I've re-written some memory management parts (which were hard to reconfigure, as the program shouldn't invoke the admin prompt of UAC). The biggest benefit was for memory allocation speed for the color management. (Which overall didn't really become much faster, but any optimization for it is a given.)
Various little bugs were squashed, but no real new features were added.
The biggest fix was for the internal MPEG2 decoder and its (badly implemented) subtitle part. I've added semi-native NV12 support for both (next to its native I420/IYUV fomat). MPEG2 videos and DVD menus should no longer be given as converted YUY2 or RGB32 to the mixer. This should solve all issues with wrong chroma coloring on DVD menus and the issue of reverting to the MS DVD video decoder. I don't have data on how my changes will affect the DXVA implementation for MPEG2, but it should be fine. I've also discarded the option for allowing planar formats. The NV12 output can handle interlaced video, but won't perform software deinterlacing (I'm really not going to add that feature). Enable "Set interlaced flag in output media type" for proper handling of interlaced NV12 output by the video renderer. If NV12 deinterlacing fails with any of the decent video renderers, please report it. For the x64 version, SSE2 math was updated (I couldn't get it into the x86 SSE2 build yet). If the x64 version specifically has visual artifact, memory or other problems, please report it. I've changed quite a lot of code to make this decoder work properly (for me, at least), some of the edited code may be less than perfect.
As a side-effect from fixing the bugs with switching D3D fullscreen mode, the worker thread feature for the filter graph has been disabled for the internal renderers. I'll analyze if it's worth it to fix (this feature was already disabled for when a video is started in D3D mode in the first place).
I've not found any bugs with the renderer's timing system yet. I'll have to do further analysis on that.

CruNcher
29th March 2012, 09:47
@Jan
This might be of help @ optimizing things http://software.intel.com/en-us/articles/vcsource-tools-intel-gpa/ i find it really usefull :) some functions are comparable to Nvidias tools though it's more Generic and seems to be usable on non Intel GFX Hardware too :) it can show a lot of DirectX information as well including the Shader Execution status and stall situations :)
You can analyze Realtime via a HUD (though they keep sensors restricted into Groups to keep the overhead down) or via recording and analyzing after (lower overhead)
It doesn't seem to work though with testers Fullscreen http://img835.imageshack.us/img835/5888/cpugpupoweranalyzedxva.png
but analyzing it with the Intel GPA System Analyzer in the background works also Realtime and that is really fast with minimal overhead updating @ record speed http://img69.imageshack.us/img69/5806/intelgpasystemanalyzer.png and more configurable also in sensor count on screen @ once see this Video Demo http://software.intel.com/en-us/videos/channel/visual-computing/intel-gpa-2012-demo-at-gdc-2012/1532811356001 :)
Btw don't be surprised by the Playback Speed in the Screenshots (no MPC-HC Performance issue) the Video is VFR and the FPS is the actual 3D Engine Render speed @ recording time ;)

Really nice http://img252.imageshack.us/img252/879/latencynice.png you can see in realtime here what caused the Power to go up in the Frame it is the Rendering of the Meteor drive by and it's Shader Effects :)

fagoatse
29th March 2012, 12:06
Thanks Jan, will give it a try today or tomorrow.
I can confirm that 4170i has improved things a bit, although the issues described by Hera are still present.

btw, I think you should stop offering SSE builds, every CPU out there supports SSE2 and above so it's no big deal. Legacy CPUs that can only handle SSE are too slow for playback these days anyway.


@Hera
Which of your setups are you testing on?
We're having similar issues, so I presume it's the ATI one with LAV filters and haali in x86 using SSE2 builds and EVR-CP+DXVA. Perhaps there's some connection between these components. Although it doesnt happen in potplayer so i guess it's either the renderer or pausing/seeking/playing functionality being broken to some extent?

Hera
29th March 2012, 15:40
@Hera
Which of your setups are you testing on?
We're having similar issues, so I presume it's the ATI one with LAV filters and haali in x86 using SSE2 builds and EVR-CP+DXVA. Perhaps there's some connection between these components. Although it doesnt happen in potplayer so i guess it's either the renderer or pausing/seeking/playing functionality being broken to some extent?
Post #909 (the one before this one) was tested on my NVIDIA ION netbook (AMD 4250M rig also exhibits same symptoms, but I don't video much). I finished Clannad ~After Story~ (1080p BDRip w. Animated Subtitles) in two days on it. I get similar problems on both computers. On both computers I am using LAV for Video (Native DXVA enabled) and Audio. I have tried LAV splitter, but it doesn't support external OP/ED and thus I reverted back to Haali Splitter. I have not tried whether or not Haali Renderer works (w. LAV CUDA ofc).

I have yet to try 4210i - but judging from the description, I am not optimistic.

I have not tried the post-breakage MPC tester builds on the Athlon XP rig yet.

fagoatse
29th March 2012, 18:54
Post #909 (the one before this one) was tested on my NVIDIA ION netbook (AMD 4250M rig also exhibits same symptoms, but I don't video much). I finished Clannad ~After Story~ (1080p BDRip w. Animated Subtitles) in two days on it. I get similar problems on both computers. On both computers I am using LAV for Video (Native DXVA enabled) and Audio. I have tried LAV splitter, but it doesn't support external OP/ED and thus I reverted back to Haali Splitter. I have not tried whether or not Haali Renderer works (w. LAV CUDA ofc).

I have yet to try 4210i - but judging from the description, I am not optimistic.

I have not tried the post-breakage MPC tester builds on the Athlon XP rig yet.

I tried 4210i and while performance is really impressive I can confirm two bugs you'd reported earlier, namely:

Another behavior I noticed - video stops playing, not during anything weird, just during normal playback.

Another behavior I noticed, after un-pausing, video plays, audio is no where to be found. Pausing and Un-pausing causes audio / video de-sync...

And of course the issue I mentioned about a week ago regarding video stall caused by heavy karaoke subs with animations(tested using Doki's release of toradora BD in 10bit). I'm pretty sure it's ISR's fault. In potplayer or regular mpchc when the CPU hits the wall and the video decoder cannot keep up it starts dropping frames, but in this case it just freezes, though audio is still being decoded. Well, basically any video decoding and rendering is dead and cpu sits at ~0%(just audio being processed but thats not very taxing). It seems to only happen on low-end CPUs(1.6 GHz dual core in this case). I've also noticed that after updating to 4120i and LAV filters to 0.50 the hang happens a few seconds later than it always used to(it's 100% reproducible at exactly the same moment).

Hera
29th March 2012, 19:50
And of course the issue I mentioned about a week ago regarding video stall caused by heavy karaoke subs with animations(tested using Doki's release of toradora BD in 10bit). I'm pretty sure it's ISR's fault. In potplayer or regular mpchc when the CPU hits the wall and the video decoder cannot keep up it starts dropping frames, but in this case it just freezes, though audio is still being decoded. Well, basically any video decoding and rendering is dead and cpu sits at ~0%(just audio being processed but thats not very taxing). It seems to only happen on low-end CPUs(1.6 GHz dual core in this case). I've also noticed that after updating to 4120i and LAV filters to 0.50 the hang happens a few seconds later than it always used to(it's 100% reproducible at exactly the same moment).
I noticed video just getting stuck not during heavy subtitles - just normal speech subtitles (DXVA).

But, yet seeking getting stuck IS related to CPU power IMO: smaller video sizes do get stuck LESS when seeking. Some thread probably times out because it is not getting enough CPU time.

fagoatse
29th March 2012, 22:04
I noticed video just getting stuck not during heavy subtitles - just normal speech subtitles (DXVA).

But, yet seeking getting stuck IS related to CPU power IMO: smaller video sizes do get stuck LESS when seeking. Some thread probably times out because it is not getting enough CPU time.

Yeah, although im not getting any hangs while playing 8bit stuff in dxva2 native. TBH HD6310 is okay with anything I throw at it, thanks to UVD3 I guess.
I've had quite a few random freezes in HW mode as well, but the hangs I've described above occur every time in SW mode when playing demanding 10bit content. It's probably as you're saying, not enough cpu time and inability to recover from it as it should - frame dropping. I can bear with occasional frame drops but not with being forced to restart playback.

CruNcher
30th March 2012, 18:07
I experience a reproducible crash it's not their with dfr4170i i'll look more into it later, it happens with specific files on EVR could be maybe the Resolution crash Problem regressed back in ?

RGold
3rd April 2012, 20:20
Using latest build, player will freeze as follows:

1. Playback will end and and the player will exit full screen.
2. Drag and drop another video file into the player window.
3. Player will freeze with white window.

JanWillem32
5th April 2012, 16:34
@CruNcher: That's indeed a very nice HUD (and a few other tools), thanks for the links.
What exactly do you mean by "Resolution crash Problem"?

@fagoatse: Unfortunately, the trunk x86 build is set at an SSE level, so I can't drop testing and legacy support for those parts.

For the little discussion in between: it's indeed the subtitle renderer. When seeking, the subtitle renderer's queue is emptied. After that, the subtitle rendering thread starts to render new frames. In doing so, it blocks other parts of the player until the subtitle picture queue is full again. I've been re-writing the queue handler, with some success. It's just very hard to get it "just right" that it will work nicely for even low-power systems, while still being capable of rendering a subtitle frame for every video frame on faster systems. (I can post a build here, but I'm not 100% sure it's stable enough for general usage. It performs pretty well, though.)

@RGold: Is it with specific settings, or the defaults? I can't seem to replicate the issue. Do automatic transitions of the playlist work properly? Does the same thing happen in bordered windowed and fullscreen exclusive modes?

Hera
6th April 2012, 02:52
I also noticed the video get stuck after a resume from sleep.

[heavy voice]
JanWillem32 is credit to team!
[/heavy voice]

RGold
6th April 2012, 03:22
@RGold: Is it with specific settings, or the defaults? I can't seem to replicate the issue. Do automatic transitions of the playlist work properly? Does the same thing happen in bordered windowed and fullscreen exclusive modes?

1. For 24Hz video material, using autocahnge fullscreen monitor mode for 23.981 @ 1600X1200.
2. Default render settings with Aero is disabled.
3. It's only happening in bordered windowed mode.
4. Does not happen with the trunk version.

burfadel
16th April 2012, 12:48
Current build of this is 200 builds behind the mainstream MPC-HC...

Not that the current version doesn't work great, just keen for an update!

JanWillem32
16th April 2012, 21:24
I actually had a lot of unexpected problems due to the recent updates. Anyway, I've added the experimental resizer derived from EVR for EVR CP, It's mostly incompatible with any other destination surface format other than 8-bit RGB, I didn't have time to fully equip the renderer with functions that allow parameter changes for switching from and to this resizer, it often distorts if the window or video rectangle changes in size and may fail connecting if down-sizing of the video is requested. The resizer is set temporarily in the "nearest neighbor" slot. This feature will have to be improved and evaluated if it is to be integrated.
The subtitle renderer queue function has been edited, I'd like some reports about how much it has improved on low-end systems. I've also disabled the queue thread for when no subtitle source is active.
I might need to edit the frame time schedulers a bit again, the rules for timing when seeking and such are a bit strict right now.

burfadel
16th April 2012, 22:17
Thanks for the update! :) however it doesn't work...

On the same settings as the 4210 build, it simply displayed a couple of frames then froze, the sound kept playing but the whole player froze up (requiring task manager to kill it). I reset the renderer settings back to default (so no D3D etc), and this time this error came up:
compiling initial pass pixel shader 2 failed
(I don't have any pixel shaders selected nor have it enabled).

This is the same with the SSE, SSE2, and x64 builds.

CruNcher
16th April 2012, 23:16
I actually had a lot of unexpected problems due to the recent updates. Anyway, I've added the experimental resizer derived from EVR for EVR CP, It's mostly incompatible with any other destination surface format other than 8-bit RGB, I didn't have time to fully equip the renderer with functions that allow parameter changes for switching from and to this resizer, it often distorts if the window or video rectangle changes in size and may fail connecting if down-sizing of the video is requested. The resizer is set temporarily in the "nearest neighbor" slot. This feature will have to be improved and evaluated if it is to be integrated.
The subtitle renderer queue function has been edited, I'd like some reports about how much it has improved on low-end systems. I've also disabled the queue thread for when no subtitle source is active.
I might need to edit the frame time schedulers a bit again, the rules for timing when seeking and such are a bit strict right now.

x86 SSE: http://www.mediafire.com/download.php?2foy7ed1a25ob2f
x86 SSE2: http://www.mediafire.com/download.php?v210al0560a5tbd
x64: http://www.mediafire.com/download.php?mu9jo5jcn7ddw3o

Great news Jan, i tried it out it doesn't seem to work though input was 720x576 NV12 tried also RGB32,YUY2,YV12 no difference (DXVA,Software decoding) 8 Bit integer as Rendering.

Evr Custom nearest neighbor

http://desmond.imageshack.us/Himg827/scaled.php?server=827&filename=mpchctestevrcustomnativ.png&res=landing


Evr Custom Bicubic 1.00 PS 2

http://img16.imageshack.us/img16/9692/mpchctestevrcustombicub.png

Default EVR (Intel Hardware Scaling)

http://img856.imageshack.us/img856/9329/mpchctestdefaultevr.png

burfadel
16th April 2012, 23:57
hmmm, no matter what I try, I can't get the new one to play...

Hera
17th April 2012, 00:04
Seems to work (bilinear). But hey, seems to work based on 1 minute of testing.
If I have the time, I will add more detail.

CruNcher
17th April 2012, 00:08
burfadel i had mix ups in the past when trying different MPC-HC versions and Tester in terms of Pixelshaders it seems it can screw up the settings somehow (i guess registry conflicts) so be sure to check the shader tab is disabled and look if your shader list is correct also the Evr Custom Shader box likes to mix up with perlin smooth step in tester when used MPC-HC trunk before ;).

Hera
17th April 2012, 00:11
How much ram is normal for MPC to be using BTW?

CruNcher
17th April 2012, 00:30
after 1 execution it should be as low as possible which currently for tester and trunk is somewhere around 8 MB you can lower that disabling the GUI same as CPU usage though dunno where that CPU usage drain is coming from when the GUI is active.
Though everything after that can vary per system due to the way also directshow precaches stuff and holds it loaded and how much and why (auto connection triggering).

Hera
17th April 2012, 01:08
after 1 execution it should be as low as possible which currently for tester and trunk is somewhere around 8 MB you can lower that disabling the GUI same as CPU usage though dunno where that CPU usage drain is coming from when the GUI is active.
Though everything after that can vary per system due to the way also directshow precaches stuff and holds it loaded and how much and why (auto connection triggering).

I meant when playing video... :P

CruNcher
17th April 2012, 02:13
Yep as i said that can vary per system and configuration used filters ect

Gelatinous
17th April 2012, 02:26
I'm having issues with the latest build (SSE2 version) as well:

1) madVR does not load at all if it is selected as the video renderer. The only way to get it to load is to set it as preferred in the external filters AND change the renderer to a non-madVR option.

2) The internal subtitle renderer only shows up on EVR.

Previous build (r4210) works fine

Thanks for giving a new build though; I much prefer your subtitle renderer to VSfilter.

burfadel
17th April 2012, 08:06
burfadel i had mix ups in the past when trying different MPC-HC versions and Tester in terms of Pixelshaders it seems it can screw up the settings somehow (i guess registry conflicts) so be sure to check the shader tab is disabled and look if your shader list is correct also the Evr Custom Shader box likes to mix up with perlin smooth step in tester when used MPC-HC trunk before ;).

Yes, pixel shader tab disabeld and no shaders selected (I even tried enabling it in 4210 and selecting shaders and then trying 4406. I tried internal an external decoder filters, different video renderers etc. Nothing worked!

CruNcher
17th April 2012, 13:26
urgh did you update your Drivers Recently ?

burfadel
17th April 2012, 13:33
Not for a couple of weeks. Either way, 4210 works, 4406 doesn't... if it is a driver etc issue doesn't explain why one works and the other doesn't!

CruNcher
17th April 2012, 16:35
it seems to be a shader compile issue so it's pretty possible i guess the driver is responsible failing here with some of the shader based setups, does overlay mixer work also look in Renderer Settings if you have anything enabled that makes use of shader.

HoP
17th April 2012, 16:45
when a file playing and i drag&drop another file into the mpc ,i get this error (but not crash.i click 'OK' two times and file play)

http://upit.cc/i/9db2fbea.png

burfadel
17th April 2012, 23:36
I also tried build 4406, 4410 and 4420 from http://henry.fushizen.eu/builds/MPC-HC/

Every one worked as they should. Its only this MPC-HC 4406 that doesn't work, 4210 does.

burfadel
19th April 2012, 15:03
New version works perfectly :) no issues like with 4406.

Thanks! :)

Just a side note (and I noticed it is 4210 as well), how does the alternative scheduler work out its timing? If I change the HPET timer resolution to 0.5MS (instead of default 15.6MS), the sound and video seems to have sync issues. Obviously I could simply not do this, but it may mean others with different timer resolutions set (such as 1.0 MS or other resolutions) may have issues with the alternative scheduler. To change I use the program Timerresolution. I use it, like others, for improvements in gameplay (albeit small as they are).

Hera
20th April 2012, 23:56
Three things that should not happen,
1. Audio cuts out when video cannot keep up. A much better behavior is to let video stutter and audio play smoothly.
2. Audio starts before video as of last two builds (it syncs a fraction of a second later).
3. Seek bar in fullscreen non-exclusive mode resizes video. This is completely worthless and annoying.

Nya_Su
21st April 2012, 11:14
Hello,

I don't have OSD (like when changing volume) when the video renderer is madVR, is that normal ?

Thanks.

JanWillem32
21st April 2012, 14:26
@CruNcher: The EVR-inherited resizer will need some work before I'll standardize it. I've edited it a bit to handle window sizes better, but it's hard to get the positioning just right.

@Gelatinous: I've edited the code responsible for external filters this time. I didn't have the time to give it a full check, though.

@HoP: I'm very familiar with that one. When the renderer's initialization fails (usually because other components are still quitting), the graph builder will just try again. Note that it may revert silently to VMR-7 w. after a renderer failure.

@burfadel: I've made every DirectX 9Ex device request its frame time data from IDirect3DSwapChain9Ex::GetPresentStatistics. The organization for the statistics and coordinating frame time syncs is handled on the system side.
Coordination for the internal graph timers partially depends on whether HPET timers are available, but older multimedia timers are always used in some parts.
The HPET timer can't be altered. (Except in some systems where it's linked to the CPU clock frequency, and has problems with the power management.) The multimedia timers can be changed in resolution. To set them to the maximum allowed precision, we first call timeGetDevCaps() to see what values are allowed. It may very well be that the 0.5 ms setting is illegal on your system. The renderer thread will always set the highest precision allowed for the multimedia timers on initialization. This is a system global setting. The highest precision setting set by any program is always used, until the thread releases it.

@Hera: 1. Is it when the CPU or when the GPU hits 100% usage?
I've tried to simulate the issue by clocking my GPU very low, and I only got both audio and video cutting out when the graph desynchronization limit hits (it's half a second).
The schedulers can drop frames to prevent this. The original schedulers can drop at least 1 in 4 frames, the alternative scheduler can drop about 1 in 8 frames. Both can schedule frames to drop in advance, for example when playing back a 25 fps video on a 24 Hz screen. The constant frame interpolator scheduler can't really drop frames at all.
When the hardware can't keep up, even with the schedulers dropping frames, desynchronization is inevitable. Editing the frame dropping code for the schedulers isn't easy. Dropping multiple frames in quick succession distorts the global view on frame time statistics (as no statistics are generated on dropped frames). It's hard to correct that to a situation where the renderer can use its usual presenting scheme again after dropping frames.
2. I've noticed that, too. I wonder what's causing it. I didn't change the schedulers at all for the previous two builds.
3. I agree. It should be re-programmed to not resize the video window. I've tried to edit it earlier, but it didn't help.

@Nya_Su: I messed up the handlers for the external filters a bit last time. I think the OSD should be fine now.

Other changes:
-the alternative scheduler can now work in bordered windowed mode (the green jitter graph will still look different than in fullscreen, though)
-I've set the default queue size for the subtitle renderer to 6 (for those with more GPU memory, higher values are pretty okay as well)

Nya_Su
21st April 2012, 15:04
@Nya_Su: I messed up the handlers for the external filters a bit last time. I think the OSD should be fine now.


Indeed, now it works. Thanks a lot!

Hera
21st April 2012, 18:00
The sound cutting out was when the CPU was saturated (I use basic settings, so GPU should not have a lot to do). I will try this again, might have been a fluke. :) Sound must not cut out, video on the other hand can stutter. I don't know what Haali does differently, but it doesn't cut out audio (atl. in not horribly-bad cases). I think I managed to make it play a 1080p file with it just rendering 19 out of 24 frames a second. If you could manage to incorporate Haali Render's tricks, that would make it the ultimate thing in performance (You are very close!).

Also I installed and reset MPC on XP (SSE) rig, player exited (crashed) when telling it to open the next file (DVD). That is, after opening a file, opening another one seemed to cause a crash. (Common)

Possible due to CPU saturation (netbook), opened a video and it played without sound until seeking. (Once)

Gelatinous
21st April 2012, 21:42
@CruNcher: The EVR-inherited resizer will need some work before I'll standardize it. I've edited it a bit to handle window sizes better, but it's hard to get the positioning just right.

@Gelatinous: I've edited the code responsible for external filters this time. I didn't have the time to give it a full check, though.

@HoP: I'm very familiar with that one. When the renderer's initialization fails (usually because other components are still quitting), the graph builder will just try again. Note that it may revert silently to VMR-7 w. after a renderer failure.

@burfadel: I've made every DirectX 9Ex device request its frame time data from IDirect3DSwapChain9Ex::GetPresentStatistics. The organization for the statistics and coordinating frame time syncs is handled on the system side.
Coordination for the internal graph timers partially depends on whether HPET timers are available, but older multimedia timers are always used in some parts.
The HPET timer can't be altered. (Except in some systems where it's linked to the CPU clock frequency, and has problems with the power management.) The multimedia timers can be changed in resolution. To set them to the maximum allowed precision, we first call timeGetDevCaps() to see what values are allowed. It may very well be that the 0.5 ms setting is illegal on your system. The renderer thread will always set the highest precision allowed for the multimedia timers on initialization. This is a system global setting. The highest precision setting set by any program is always used, until the thread releases it.

@Hera: 1. Is it when the CPU or when the GPU hits 100% usage?
I've tried to simulate the issue by clocking my GPU very low, and I only got both audio and video cutting out when the graph desynchronization limit hits (it's half a second).
The schedulers can drop frames to prevent this. The original schedulers can drop at least 1 in 4 frames, the alternative scheduler can drop about 1 in 8 frames. Both can schedule frames to drop in advance, for example when playing back a 25 fps video on a 24 Hz screen. The constant frame interpolator scheduler can't really drop frames at all.
When the hardware can't keep up, even with the schedulers dropping frames, desynchronization is inevitable. Editing the frame dropping code for the schedulers isn't easy. Dropping multiple frames in quick succession distorts the global view on frame time statistics (as no statistics are generated on dropped frames). It's hard to correct that to a situation where the renderer can use its usual presenting scheme again after dropping frames.
2. I've noticed that, too. I wonder what's causing it. I didn't change the schedulers at all for the previous two builds.
3. I agree. It should be re-programmed to not resize the video window. I've tried to edit it earlier, but it didn't help.

@Nya_Su: I messed up the handlers for the external filters a bit last time. I think the OSD should be fine now.

Other changes:
-the alternative scheduler can now work in bordered windowed mode (the green jitter graph will still look different than in fullscreen, though)
-I've set the default queue size for the subtitle renderer to 6 (for those with more GPU memory, higher values are pretty okay as well)

x64: http://www.mediafire.com/download.php?ocqi4swgblga41n
x86 SSE2: http://www.mediafire.com/download.php?2wc9c682wu3wpyp
x86 SSE: http://www.mediafire.com/download.php?05j9yr8ao5xlvmo

This build and the last build work perfect for me, thanks. I was having a similar issue with the madVR OSD and its fixed now as well.

Hera
22nd April 2012, 06:18
Testing the x86_64 build, I think you borked the fix you did about minimzation. Audio stops and video does funny things when player is in background again.

Also access is denied error when switching files DX9AllocatorPresenter

JanWillem32
24th April 2012, 14:46
The sound cutting out was when the CPU was saturated (I use basic settings, so GPU should not have a lot to do). I will try this again, might have been a fluke. :) Sound must not cut out, video on the other hand can stutter. I don't know what Haali does differently, but it doesn't cut out audio (atl. in not horribly-bad cases). I think I managed to make it play a 1080p file with it just rendering 19 out of 24 frames a second. If you could manage to incorporate Haali Render's tricks, that would make it the ultimate thing in performance (You are very close!).Okay, I'll try. One item has been updated, at least.Also I installed and reset MPC on XP (SSE) rig, player exited (crashed) when telling it to open the next file (DVD). That is, after opening a file, opening another one seemed to cause a crash. (Common)If that was with the standard DVD navigator, I'm not surprised. I've had many issues from both in- and outside the renderers. e.g.: http://sourceforge.net/apps/trac/mpc-hc/ticket/1724 . If it's with the regular playlist as well, let's take a look at debugging the problem.Possible due to CPU saturation (netbook), opened a video and it played without sound until seeking. (Once)I've had that quite a few times as well (debug builds more often). It happens with the reference builds as well. (The global timer has multi-threading issues, I believe.)

I've added a window handler for the FlipEx presenting mode (Win 7&8, windowed modes with Aero enabled). It should clear the stuck images after closing a video and allow easier re-initialization, such as with the drag and drop of a video on the player.
I'm having severe issues with the handling functions that mess with the initialization of the video renderer. As a precaution, the 'hot' initialization function is disabled for now. When starting playback, the video will desynchronize (and usually drop a lot of frames) because of this. In case of severe desynchronization after opening a file, rewind a few seconds. I'll see what I can do to address this nasty reoccurring issue.
I've made the alternative scheduler better at dropping frames. It's unlikely that I'll be able to improve it any more on the scheduling side. The other option would be the mixer side, but the mixer calls the graph and resets the global timer. This halts normal playback of audio and video to resynchronize in full, so I can't really work with that. An approach like with the Haali renderer (custom mixer and presenter) would be better at controlling an issue like this. I can't control a whole lot from the renderer side, dropping a frame of the external VMR-9 or EVR mixers, or of the external decoder is pretty difficult with the current renderers.

Hera
24th April 2012, 21:25
Crashing while switching files is not related to .VOB - any format makes the player silently exit on my XP system after switching files 1 to 3 times.

Nya_Su
24th April 2012, 21:26
@JanWillem32: This build gives me quite a few dropped frames -don't know why-, so I went back to the previous one (which doesn't have this problem).

Hera
24th April 2012, 21:43
From some basic tests, it doesn't feel like I am getting smooth video anymore. IMO, just stick to fixing bugs so you could get your work added to trunk. :)

Again XP, D3D Err Device Lost when trying to play video in D3D fullscreen, D3D9 allocator failed. Result is no subs in fullscreen,

JanWillem32
26th April 2012, 00:16
The "video without subs" situation is caused by the "feature" that when any video renderer fails, the player may silently revert to VMR-7. I have no idea who thought that was a good idea. Not honoring settings set by the end user (such as the video renderer option) is such a bad practice. I'd prefer showing the error in a messagebox and closing the graph instead.

-I fixed a crash condition of the subtitle renderer
-I did extensive legacy mode debugging (that really needed a lot of work)
-I optimized the device creation and reset sequences
-I optimized and corrected the window geometry code (used by all video renderers)
-I fixed the timing issues for (re-)initialization
-I've done a lot and now I'm really in need of my beauty sleep :D