1 (edited by Nintendo Maniac 64 23-07-2016 05:17:56)

Topic: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

So I have an interesting situation here... I've come into possession of a PC with an Nvidia NVS 3100M (basically the quadro version of the Geforce G210M).

What's interesting though is that the GPU is plenty fast for SVP & AVC H/W decoding at 960x540, but at 1280x720 I get better performance in SVP if I completely disable GPU acceleration.  But if I do that then my GPU is just sitting around practically idling at 10% utilization (from the AVC decoding).

Therefore, is there some way to only partly reduce the GPU from SVP's GPU acceleration?  Like maybe still use the GPU for things like the frame resizing and/or maybe only for the "SVP shader" but not the "interpolation mode".


tl;dr: If we assume that SVP by default splits its interpolation engine to 50% on the CPU and 50% on the GPU, then I want to know if I can make it be something like 65% on the CPU and 35% on the GPU without actually reducing my SVP profile settings.


And before anyone suggests using something like MadVR to eat up the rest of my GPU headroom, I'd like to point out that this PC's primary display is an HDTV, and said HDTV does great with 720p --to-> 1080p upscaling, so using MadVR for any sort of upscaling from 720p is quite redundant.

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Nintendo Maniac 64 wrote:

So I have an interesting situation here... I've come into possession of a PC with an Nvidia NVS 3100M (basically the quadro version of the Geforce G210M).

What's interesting though is that the GPU is plenty fast for SVP & AVC H/W decoding at 960x540, but at 1280x720 I get better performance in SVP if I completely disable GPU acceleration.  But if I do that then my GPU is just sitting around practically idling at 10% utilization (from the AVC decoding).

Therefore, is there some way to only partly reduce the GPU from SVP's GPU acceleration?  Like maybe still use the GPU for things like the frame resizing and/or maybe only for the "SVP shader" but not the "interpolation mode".


tl;dr: If we assume that SVP by default splits its interpolation engine to 50% on the CPU and 50% on the GPU, then I want to know if I can make it be something like 65% on the CPU and 35% on the GPU without actually reducing my SVP profile settings.


And before anyone suggests using something like MadVR to eat up the rest of my GPU headroom, I'd like to point out that this PC's primary display is an HDTV, and said HDTV does great with 720p --to-> 1080p upscaling, so using MadVR for any sort of upscaling from 720p is quite redundant.


Maybe you could throw in AdaptiveSharpen or SuperRes to load the GPU?

MadVR has both. If you want to squeeze a little more CPU efficiency out of SVP, MPV will do it to.

https://github.com/mpv-player/mpv/wiki/User-Scripts

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

I already said that my TV already has great 720p --to-> 1080p upscaling, so spending GPU resources on any sort of upscaling would be quite wasteful...

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

try this:

smooth.cubic = 0;
smooth.linear = false;

in the SVP 4/script/overrride.js

5 (edited by Nintendo Maniac 64 23-07-2016 14:21:36)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Chainik wrote:

try this:

smooth.cubic = 0;
smooth.linear = false;

in the SVP 4/script/overrride.js

Better, but still maxing out the GPU.

With this my SVP index is like 0.75x. For reference, when SVP is set to "CPU only", my SVP index is like 0.95x.

And to clarify, this is in fact being tested with a 1280x720 video.


One thing I'm concerned about is that doing this sort of thing will result in me having to reduce my SVP profile settings for 960x540 and lower resolution videos.  In particular, I can run pretty much run maxed out sane settings (read: not 8px or lower) for 960x540 videos (uniform + complicated + half pixel + 12 pixel...etc).

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

also limiting frc to x2 or setting interpolation mode to "1m" should help

7 (edited by brucethemoose 23-07-2016 16:06:22)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Nintendo Maniac 64 wrote:

I already said that my TV already has great 720p --to-> 1080p upscaling, so spending GPU resources on any sort of upscaling would be quite wasteful...

That's not upscaling, they're sharpening filters.


If you use MPC, and you can't get Svp to use it all, you should use MadVR anyway, even if you don't want use the super intensive scalers.

8 (edited by Nintendo Maniac 64 24-07-2016 03:28:12)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

brucethemoose wrote:

That's not upscaling, they're sharpening filters.

I'm not particularly interested in sharpening the image, but even then my TV does in fact have various sharpening settings as well (I have most of them turned off though).

brucethemoose wrote:

If you use MPC, and you can't get Svp to use it all, you should use MadVR anyway, even if you don't want use the super intensive scalers.

Well I do actually have MadVR installed and I plan to play around with it for lower resolution videos (particularly sub 720p).

9 (edited by Nintendo Maniac 64 25-07-2016 05:15:22)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Turns out that switching my LAVfilters decoder from DXVA2 (copy-back) to Nvidia CUVID gives better performance...but that alone isn't quite enough.

Chainik wrote:

also limiting frc to x2

Oh I'm an idiot; I know that x5 is quite a bit more GPU-intensive than x4, so I should have expected that x2.5 would be more demanding on the GPU than x2!  That makes 24 & 25fps content work great and I can crank up the settings to much higher levels (uniform + complicated + one pixel + 8px; half pixel is too CPU-intensive).

However, 720p 30fps AVC content seems to still be too demanding...but I've got something for that as well.


You see, to really determine if I was in fact GPU-limited, I had underclocked the GPU shaders and my SVP performance dropped accordingly...so I got thinking, since my temperatures are definitely cool enough (I've got a 120mm fan blowing directly onto the GPU and I even tested with furmark), what if I overclocked the GPU?

Sure enough, once I set the shader to around 1650MHz, 720p 30fps AVC "just worked" (sometimes as low as 1610MHz would work, but with my test video 1650MHz always worked).  Not only that, but it seems like the GPU is stable even up to above 1800MHz (maybe because it's a Quadro and therefore is binned higher?), so using something like 1700MHz should actually be quite within the stable range while still giving me a decent amount headroom.  Oh, and this is all without even altering the voltage (which cannot be changed anyway).



But there is still some bad news - 1080p 30fps downscaled to 720p is still too demanding.  For reference, using SVP to crop the video to 720p works perfectly fine, but downscaling does not.  Is there anyway to just do some light-and-fast CPU-based bilinear downscaling or something? (you know, similar to what MPC-HC's non-PS2.0 bilinear resizer)


Chainik wrote:

setting interpolation mode to "1m" should help

This doesn't seem to make a difference when using x2, or if it does then it's very minor (both uniform and 1m lagged at 1600MHz GPU shader but worked at 1650MHz), and using 1m + x2.5 interpolation is too slow even with my GPU shader overclocked to 1800MHz.

Since my display can't handle 48Hz but can handle 50Hz (and 60Hz), I may just look into using Reclock or similar to speed up 24fps content to 25fps.



Lastly, may I ask for more details on just what those two override.js settings you provided are doing?  In particular, if I comment out "smooth.linear = false;" the performance is still fine with my shader at 1650MHz, but if I instead comment out "smooth.cubic = 0;" then performance isn't good unless I use a shader clock of like 1775MHz (same goes for if I comment out both settings).

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

in fact smooth.linear option is probably turned off for your GPU since it depends on the performance measurement
smooth.cubic is always on by default

11 (edited by Nintendo Maniac 64 25-07-2016 11:32:11)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Chainik wrote:

smooth.cubic is always on by default

OK, but what does it actually do?  Like, what visual difference is there if it's disabled vs enabled?


Also, maybe you missed it in that massive post, but is there anyway to set SVP's resizer to be a very light-and-fast CPU-based algorithm? (much like MPC-HC's non-PS2.0 "bilinear").  Alternatively, what are my choices for lighter-on-the-GPU scaling algorithms in SVP?

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

> but what does it actually do?

more smooth interpolation of motion vectors and masks - bicubic vs. bilinear

> but is there anyway to set SVP's resizer to be a very light-and-fast CPU-based algorithm?

we can use any algorithm supported by Avisynth/Vapoursynth however it's not configurable now

13 (edited by Nintendo Maniac 64 25-07-2016 12:01:35)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Chainik wrote:

more smooth interpolation of motion vectors and masks - bicubic vs. bilinear

What about the "smooth.linear" setting?  What does it do?


Chainik wrote:

we can use any algorithm supported by Avisynth/Vapoursynth however it's not configurable now

Awww. sad  Thing is, using SVP for 1080p is completely out of the question for this PC as the performance is just nowhere even close to adequate.

14 (edited by Nintendo Maniac 64 05-08-2016 14:17:48)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Apologizes for the double-post so soon after the previous post, but I've just run into a pretty big issue.

It turns out that one of my real-world test videos has an annoying flicker-like artifact when "smooth.cubic = 0;" is set, but looks nearly flawless with that setting commented out.

Link to the video in question - see attachments in the following post:
http://www.svp-team.com/forum/viewtopic … 730#p60730

I've also attached a screenshot showing the flicker-like artifact as well as a screenshot showing the exact same frame but with cubic enabled and therefore without the flicker-like artifact.


EDIT: In an attempt to cover all my bases, I've also attached a screenshot of the SVP test settings I was using as well as the source frames just before and after the example flicker-inducing frame.

Normally I'd attach logs as well, but honestly they're like exactly the same between using cubic and not using cubic.


EDIT 2: I just did more testing and it turns out that 1775MHz is stable for SVP but not for the likes of Furmark - I have to use something like 1750MHz to be Furmark-stable (again, GPU temps are fine - they max out ~60c).


----------------------------------------------------------------


EDIT 3: All in all, I'd really like to know one thing - is there a way to specifically prevent this crazy flicker-like artifact while also having "smooth.cubic = 0;" active without reducing my SVP profile settings or disable GPU acceleration?  This is literally the final thing preventing my "new" HTPC from being fully functional.

Post's attachments

flicker - without cubic.png 1.03 mb, 278 downloads since 2016-07-25 

no flicker - cubic.png 1.06 mb, 240 downloads since 2016-07-25 

source frame after.png 1.13 mb, 298 downloads since 2016-07-25 

source frame before.png 1.14 mb, 264 downloads since 2016-07-25 

SVP test settings.png, 88.01 kb, 675 x 714
SVP test settings.png 88.01 kb, 594 downloads since 2016-07-25 

15 (edited by Nintendo Maniac 64 30-07-2016 22:59:32)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

I hate to triple post, but it's been nearly 5 days, my "new" HTPC is fully up and running, and there's been no response to my previous post... Maybe I'm simply asking the wrong question?


If that's the case, then let me ask this - is the massive visual difference in the interpolated frames for "cubic enabled" and "cubic disabled" the expected result?

In other words, is my so-called "issue" that I am running into actually not a problem at all and is in fact normal operation?

16 (edited by Nintendo Maniac 64 04-08-2016 21:42:47)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Apologies for the quadruple post, but I think I've finally figured it out!


When I put the 15fps AVC video stream into an MP4 container via Avidemux, the framerate was changed to this according to MediaInfo:

MediaInfo wrote:

Minimum frame rate             : 7.519 fps
Maximum frame rate             : 15.003 fps

This was also why just muxing it into an MKV doesn't fix the issue.  However, when muxing it into an MKV and specifying 15p as the framerate, MediaInfo showed the framerate as a constant 15.000 fps and everything worked perfectly in SVP.

Of course, the wacky thing is that with SVP disabled or when cubic interpolation is enabled, there's no issue at all...which itself is just strange.



ANYWAY...one last quick question - is there any way I can add the smooth.cubic setting via Application settings -> Additional options -> All settings -> User defined options like the override.js recommends one to do?

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

> is the massive visual difference in the interpolated frames for "cubic enabled" and "cubic disabled" the expected result?

not really hmm

> What about the "smooth.linear" setting?  What does it do?

does frame composition in "linear light"

> is there any way I can add the smooth.cubic setting

Post's attachments

svp4-custom-option.png, 14.39 kb, 599 x 408
svp4-custom-option.png 14.39 kb, 654 downloads since 2016-08-05 

18 (edited by Nintendo Maniac 64 05-08-2016 12:26:49)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Thanks, that GUI option is exactly what I was looking for since it lets me toggle it depending on the video resolution.


Also, I'm disappointed that you didn't respond until I essentially solved the issue. tongue ...though I guess I didn't really solve why variable framerate + non-cubic via GPU = seizures

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

> why variable framerate + non-cubic via GPU = seizures

seriously, I've no idea
the method of frame composition is not connected to vfr in any way

> I'm disappointed
I'll try harder to work better! big_smile

20 (edited by Nintendo Maniac 64 06-08-2016 06:04:27)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Chainik wrote:

the method of frame composition is not connected to vfr in any way

Well it's got to be connected in some way if not indirectly.

As I mentioned before, muxing the above-linked MP4 into an MKV via mkvtoolnix and doing nothing else still results in the seizures, but doing the same muxing process and specifying a framerate of 15p eliminates the seizures.


EDIT: Hmmm... it seems my above download link is broken.  Let me see if I can reupload or maybe even attach a copy...

Chainik wrote:

I'll try harder to work better! big_smile

It was just odd to me that I saw you replying to others and the like during that time period, so I started to think that maybe you were not able to replicate the problem and therefore simply ignored it as not being SVP-related.



EDIT 2: I have attached the video clips.  Oddly enough, muxing the attached MP4 via mkvtoolnix into a new MKV without even manually specifying the framerate still results in constant 15fps and therefore a good result.




EDIT 3: OK maybe you're right about it having nothing to do with variable framerate - I just found a case of it occurring on a video with a constant framerate and have attached it (even though the video length says 16+ minutes it's only about 10 seconds).

Perhaps it might just be a case that variable framerates reliably trigger the issue.



EDIT 4: Well isn't this interesting - after disabling "Use Direct3D 11 for presentation" in madVR, the attached constant bitrate VP9/WebM video seems to no longer gives me the juddery flicker issue (it's 2am here; I will test more in-depth later).  However, the attached MP4 still results in the issue, and the screen recording that I used in my bug report used EVR CP rather than madVR on a PC that had no traces of Nvidia graphics, so it's clearly not completely a madVR nor an Nvidia thing.

It's very possible that it was actually a case of two different issues resulting in similar symptoms.

Post's attachments

constant framerate.webm 1.78 mb, 586 downloads since 2016-08-05 

Problematic.mp4 1.9 mb, 509 downloads since 2016-08-05 

Works fine.mkv 1.9 mb, 565 downloads since 2016-08-05 

21 (edited by Nintendo Maniac 64 08-08-2016 06:07:42)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

I haven't found a foolproof solution to the flickering issue, but I have figured out a lot about what it's deal is.

Simply put, at least on the NVS 3100m, the flicker goes hand-in-hand with SVP using more GPU utilization than it should, and unfortunately this seems to occur almost randomly (seemingly triggered by specific video files or something that don't really always have anything in common).

I had a situation where the flicker was occurring on a specific video, I only changed SVP to "repeat frame", relaunched the video, and the flicker was gone; GPU utilization was around 50%.  I changed SVP back to "blend adjacent frames", relaunched the video, and the flicker was back; GPU utilization was around 85%.  So I set SVP to "repeat frame" again, launched the very same video one more time, and the flicker was still there; GPU utilization was still around 85%.


Normally I'm able to do x3 interpolation on 20fps videos...though definitely not with the flicker/high-GPU-load issue.  Now what was interesting is that, when the flicker/high-GPU-load issue was occurring, I was able to greatly reduce the flickering by setting SVP to do only x2 interpolation which, as we all now know, reduces the GPU utilization; sure enough, the resulting GPU utilization was only around 80% (was ~95% with the flicker issue @ x3, no idea what GPU load at x3 without the flicker issue is).  To add weight to this theory, reducing my GPU's shader clock not only increased the GPU load resulting from SVP but also increased the amount of flickering.


This makes me wonder if people with powerful GPUs never notice this issue of higher-than-normal GPU utilization because on something like a Fury X it could simply be the difference between 10% and 12% GPU utilization; this could very well explain why I seem to be on my own here even though I've ran into this issue on two very different combinations of PC hardware...though now that I think of it, both PCs have one thing in common - relatively weak GPUs.




EDIT: Haha, seemingly random is right.  The above-attached "problematic" MP4 that was always triggering the flicker issue when I made my previous post is working perfectly fine.  However I've now run into another video that keeps having the issue, but I think I've found a repeatable method of making it go away for at least a single video-playback session:

hit "stop" in MPC-HC, close MPC-HC; re-open the video - assuming resume is enabled, it should resume playing right where it was stopped but without any flickering and with normal GPU utilization.



EDIT 2: I think I may have finally solved the flicker issue once and for all, but before I say what it is that I did, I would prefer to give it a few days worth of testing before we jump to any final conclusions.

Nevertheless, I would recommend to any SVP devs to not bother spending any time on this issue and/or with my bug reports until after I can confirm/deny whether or not I have in fact finally figured out what solves it - otherwise you devs may very well just be wasting your time chasing a dead end.

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

sooo... looks like a bug in frames blending with cubic=off

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

try this (32-bit plugin)

Post's attachments

svpflow2.dll 655 kb, 574 downloads since 2016-08-08 

24 (edited by Nintendo Maniac 64 08-08-2016 20:06:08)

Re: Anyway to only partly reduce the GPU load from SVP's GPU acceleration?

Just an FYI, that previously-attached MP4 that I said was working perfectly in my previous post?  I think I was being dumb and it was using the wrong SVP profile (a CPU-only one) which would explain why it worked that one specific time and not every single other time (including just 30 minutes ago).


Anyway, yes, that plugin seems to solve the flicker/high-GPU-utilization issue.

...but that's strange because the solution I was alluding to in my previous post was using the newest MPC-HC SVN.


In other words:

old svpflow2.dll + MPC-HC 1.7.9 = flicker
old svpflow2.dll + MPC-HC SVN = perfect
new svpflow2.dll + MPC-HC 1.7.9 = perfect
new svpflow2.dll + MPC-HC SVN = perfect

Why would two completely unrelated items fix the same issue? O_o



In similar news, I couldn't help but notice that using GPU interpolation (whether cubic or not) results in more "boarder edge" artifacts than if I used CPU-only interpolation, especially with "complicated" + "half pixel".

EDIT: I've attached a video clip that has this issue as well as two screenshots showing the result with GPU interpolation and the other showing CPU-only interpolation.

I've also made a bug report for this issue.

Post's attachments

cpu only.png 676.12 kb, 268 downloads since 2016-08-08 

gpu accelerated.png 642.18 kb, 288 downloads since 2016-08-08 

SVP settings.png, 104.02 kb, 810 x 987
SVP settings.png 104.02 kb, 609 downloads since 2016-08-08 

video clip.mkv 1.88 mb, 592 downloads since 2016-08-08