Topic: Very high CPU with 3.1.4 in 1080p

I don't recall seeing this in earlier versions, but in 3.1.4 I get near 100% CPU usage on all four cores when playing 1080p video. No problems with 720p.

Is there something I need to adjust? I'm using GPU acceleration throughout the chain.

Re: Very high CPU with 3.1.4 in 1080p

Update to above. This is only happening on a few 1080p videos, not all. I get an OSD message about high CPU usage, and to try adjusting the filter settings. What should I be adjusting?

3 (edited by %username% 20-02-2013 02:28:52)

Re: Very high CPU with 3.1.4 in 1080p

jkauff
and your sys.config is...

Re: Very high CPU with 3.1.4 in 1080p

Nothing is changed in 3.1.4 concerning performance so it should be something in that videos.

a few 1080p videos, not all

what kind of videos, why there're different?

Re: Very high CPU with 3.1.4 in 1080p

sys.config? Can't find one.

Re: Very high CPU with 3.1.4 in 1080p

Here's Mediainfo for one of the files:

Video
ID                                       : 1
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@High
Format settings, BVOP                    : No
Format settings, Matrix                  : Custom
Codec ID                                 : V_MPEG2
Codec ID/Info                            : MPEG 1 or 2 Video
Duration                                 : 2h 6mn
Bit rate mode                            : Variable
Bit rate                                 : 17.1 Mbps
Maximum bit rate                         : 80.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.276
Stream size                              : 15.1 GiB (96%)
Default                                  : Yes
Forced                                   : No

Re: Very high CPU with 3.1.4 in 1080p

Interlaced ?

Re: Very high CPU with 3.1.4 in 1080p

jkauff
Video

Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Frame rate                               : 29.970 fps
Scan type                                : Interlaced

You not need for SVP for such type of video. 29.97 fps after deinterlacing become 59.94 fps.
Use DXVA for this purpose or if you have NVIDIA card then you can use LAV CUVID decoder with HW deinterlacing.

Re: Very high CPU with 3.1.4 in 1080p

Thank you. I didn't even notice that it was interlaced. I'll check the other files, they're probably 1080i as well.

Re: Very high CPU with 3.1.4 in 1080p

I first wanted to start a new thread but it seems my results are similar, except that my files are progressive.

SVP 3.1.4, consumes 10% more GPU and additional 10% CPU with GPU acceleration enabled, when playing such a movie file: MPEG4 Video (H264) 1920x800 23.976fps. With a video of nonstandard dimensions: MPEG4 Video (H264) 1916x796 23.976fps, GPU acceleration consumes full GPU power and additional 23% CPU (which results in a slide show).

There are no such issues for 720p videos.

My system specification is: CPU Intel E5700, 2 cores @ 3GHz, 4 GB DDR3 @ 800 MHz, GPU Nvidia 9800GT, PCI Express reported by Nvidia Inspector: PCI-E 2.0 x 16 @ x 16 1.1. SVP configuration:

# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.

SetMemoryMax(1024)

global svp_scheduler=true
global threads=3
global svp_cache_fwd=threads+2

LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow2.dll")

SetMTMode(3,threads)
ffdShow_source()
SetMTMode(2)

global crop_params=""
global resize_string=""
global super_params="{pel:1,scale:{up:2},gpu:0,full:false,rc:true}"
global analyse_params="{vectors:2,block:{w:32,h:32,overlap:0},main:{search:{coarse:{distance:-10}}}}"
global smoothfps_params="{rate:{num:3,den:1},algo:1,scene:{blend:true}}"

global demo_mode=0
stereo_type=0

Re: Very high CPU with 3.1.4 in 1080p

qduaty
Did you try to turn off scaling for your 1916x796 video?

in MPC-HC menu View - Video Frame - Normal size

Re: Very high CPU with 3.1.4 in 1080p

I just tried it, GPU is still 88%.

Re: Very high CPU with 3.1.4 in 1080p

qduaty
When playing 1920x800 what is the GPU load?

Re: Very high CPU with 3.1.4 in 1080p

With GPU acceleration: around 40% on fullscreen, 20% in a window; without acceleration - 30% fullscreen, 10% window.

Re: Very high CPU with 3.1.4 in 1080p

qduaty
Then answer is your GPU-acceleration of decoding video.
When resolution is standard GPU-acceleration is worked.
When non standard (1916x796), GPU-acceleration is disabled and software decoding uses. It is hard task for your E5700.
Check it. You need to find GPU-accelerated decoder which works with this resolution.

Try LAV CUVID, CoreAVC CUDA. They are more universal for NVIDIA adapter than LAV DXVA copy-back.
http://www.svp-team.com/forum/misc.php?item=2226

Re: Very high CPU with 3.1.4 in 1080p

Nvidia inspector shows VPU load around 30%, so hardware decoding works well for any resolution. Also SVP works for this movie (without GPU acceleration), using 60-80% CPU. There is no excessive CPU load, which might suggest decoding of h.264 in software. And I already have CUVID in LAV settings.

I made some samples with Freemake, all with height=800 and different width: 1912, 1908, 1900 all worked well. The only problematic sample was that of width=1916.

Re: Very high CPU with 3.1.4 in 1080p

qduaty
It is strange. Can you find cause of high CPU Load on video with 1916 px width?
I mean: decoder / SVP / renderer. Change or disable them one-by-one.

18 (edited by qduaty 07-03-2013 10:40:06)

Re: Very high CPU with 3.1.4 in 1080p

I'm not talking about high CPU load. See:

With a video of nonstandard dimensions: MPEG4 Video (H264) 1916x796 23.976fps, GPU acceleration consumes full GPU power and additional 23% CPU

I'm attaching screenshots so you could see what's going on.

Post's attachments

1916x796withGPU.png 193.34 kb, 280 downloads since 2013-03-07 

1916x796withoutGPU.png 192.2 kb, 294 downloads since 2013-03-07 

1920x800withGPU.png 161.34 kb, 259 downloads since 2013-03-07 

Re: Very high CPU with 3.1.4 in 1080p

qduaty
I see 86% GPU and 88% CPU load. It is critical values. Both devices with that high load can lead to your "slide show".

To reduce CPU load you can change or reset profiles.
To reduce GPU load you can choose lighter SVP-shader and disable bicubic interpolation: remove // from line "smooth.cubic = 0;" and write value zero (0) in file override.js.

I think 1916 px width is real problem for madVR which loads not GPU separately but CPU too.

Re: Very high CPU with 3.1.4 in 1080p

qduaty
Thanks, that's cool  big_smile I've to make some investigations...

21 (edited by qduaty 12-03-2013 21:18:07)

Re: Very high CPU with 3.1.4 in 1080p

Another problematic resolution: 718x436. As in case of 1916x796, causes full GPU load in accelerated mode.

Edit. I worked around it by adding this code to MSmoothFPS.avs before "input=last":

last.Width == 1916 ? eval(""" AddBorders(4,0,0, 0) """) : 0
last.Width == 718 ? eval(""" AddBorders(2,0,0, 0) """) : 0

Seems to help, which means the bug is certainly in SVP.

Re: Very high CPU with 3.1.4 in 1080p

qduaty
Another problematic resolution: 718x436
Thank you again.

AddBorders(4,0,0, 0)
It is not good solution for frame interpolation task. Thin black line at the frame border causes annoying frame-borders artifacts when panning and zooming.

while Chainik makes some investigations......

I recommend you two another ways:
1. Crop in AVS-script.
Add code to MSmoothFPS.avs before "input=last":

mult=16
crop(0,0,int(width/mult)*mult,int(height/mult)*mult)

And ajust mult value. It can be 8, 16, 32.

2. Expand framesize in ffdShow to multiply of 16 (or 8, 32).
http://www.svp-team.com/forum/misc.php?item=2396

Post's attachments

ffdShow_ExpandMod16.png, 19.01 kb, 590 x 519
ffdShow_ExpandMod16.png 19.01 kb, 680 downloads since 2013-03-12 

Re: Very high CPU with 3.1.4 in 1080p

qduaty
Seems to help, which means the bug is certainly in SVP.

Well, 1916 is 2*2*479, and 718 is 2*359, and both 479 and 359 are prime numbers wink
I'll add a workaround for this issue in the future version.