Log in

View Full Version : Lagarith Versus MSU - speed comparison


DarkT
28th February 2007, 22:04
I did a small comparison of those two, here's what I got:

General information: 151 frames, Vdub + avisynth script, 1st pass = encoding d2v file into
a loseless codec, 2nd+3rd pass = encoding the loseless product into an x.264 mp4 file.




1st pass:

MSU, settings: Totally loseless/fastest Time spent: 4:49 Ram used: 170mb File Size: 9.27mb
Lagarith, settings: No special settings Time spent: 4:38 Ram Used: 150mb File Size: 13.2mb



2nd pass:

MSU, Time spent: 1:06
Lagarith, Time spent: 1:01



3rd pass:

MSU, Time spent: 1:08
Lagarith, Time spent: 1:03






MeGui logs follow for the 2nd and 3rd passes





MSU MeGUI log:



Starting job job1-1 at 9:37:11 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
--pass 1 --bitrate 1200 --stats "D:\FANSUBBING WORK\Fumoffu Episode 2\Copy of Loseless Codecs test msu.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 5 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --analyse all --8x8dct --pbratio 1.4 --vbv-maxrate 25000 --ratetol 2 --me esa --merange 25 --thread-input --progress --no-psnr --no-ssim --output NUL "D:\FANSUBBING WORK\Fumoffu Episode 2\Copy of Loseless Codecs test msu.avs"
successfully started encoding
Processing ended at 9:38:19 PM
----------------------------------------------------------------------------------------------------------

Log for job job1-1

avis [info]: 704x480 @ 23.98 fps (151 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: slice I:2 Avg QP:22.50 size: 32103
x264 [info]: slice P:66 Avg QP:18.86 size: 12809
x264 [info]: slice B:83 Avg QP:21.90 size: 2079
x264 [info]: mb I I16..4: 35.7% 22.3% 42.0%
x264 [info]: mb P I16..4: 15.5% 17.4% 7.9% P16..4: 22.3% 5.9% 2.0% 0.2% 0.1% skip:28.9%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.1% B16..8: 13.3% 0.6% 1.9% direct:10.2% skip:73.8%
x264 [info]: final ratefactor: 18.84
x264 [info]: 8x8 transform intra:41.1% inter:35.5%
x264 [info]: direct mvs spatial:97.6% temporal:2.4%
x264 [info]: ref P 77.3% 14.4% 4.6% 1.9% 1.8%
x264 [info]: ref B 85.0% 10.6% 2.3% 1.4% 0.7%
x264 [info]: kb/s:1374.6

encoded 151 frames, 2.26 fps, 1375.45 kb/s

----------------------------------------------------------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
Looking for job processor for job...
Processor found!
Starting job job1-2 at 9:38:19 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
--pass 2 --bitrate 1200 --stats "D:\FANSUBBING WORK\Fumoffu Episode 2\Copy of Loseless Codecs test msu.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 5 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --analyse all --8x8dct --pbratio 1.4 --vbv-maxrate 25000 --ratetol 2 --me esa --merange 25 --thread-input --progress --no-psnr --no-ssim --output "D:\FANSUBBING WORK\Fumoffu Episode 2\Copy of Loseless Codecs test msu.mp4" "D:\FANSUBBING WORK\Fumoffu Episode 2\Copy of Loseless Codecs test msu.avs"
successfully started encoding
Processing ended at 9:39:28 PM
----------------------------------------------------------------------------------------------------------

Log for job job1-2

avis [info]: 704x480 @ 23.98 fps (151 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
mp4 [info]: initial delay 2002 (scale 24000)
x264 [info]: slice I:2 Avg QP:21.00 size: 26849
x264 [info]: slice P:66 Avg QP:19.30 size: 11928
x264 [info]: slice B:83 Avg QP:21.55 size: 1882
x264 [info]: mb I I16..4: 39.7% 31.7% 28.6%
x264 [info]: mb P I16..4: 17.1% 16.9% 6.2% P16..4: 22.3% 5.9% 1.7% 0.2% 0.1% skip:29.6%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.1% B16..8: 17.5% 0.6% 1.9% direct: 9.5% skip:70.3%
x264 [info]: 8x8 transform intra:41.2% inter:38.3%
x264 [info]: direct mvs spatial:86.7% temporal:13.3%
x264 [info]: ref P 76.5% 14.7% 4.7% 2.1% 2.0%
x264 [info]: ref B 85.2% 10.8% 2.3% 1.1% 0.6%
x264 [info]: kb/s:1266.6

encoded 151 frames, 2.21 fps, 1267.55 kb/s

desired video bitrate of this job: 1200 kbit/s - obtained video bitrate (approximate): 1270 kbit/s





Lagarith MeGUI log:



Starting job job1-1 at 9:40:26 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
--pass 1 --bitrate 1200 --stats "D:\FANSUBBING WORK\Fumoffu Episode 2\Loseless Codecs test laga.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 5 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --analyse all --8x8dct --pbratio 1.4 --vbv-maxrate 25000 --ratetol 2 --me esa --merange 25 --thread-input --progress --no-psnr --no-ssim --output NUL "D:\FANSUBBING WORK\Fumoffu Episode 2\Loseless Codecs test laga.avs"
successfully started encoding
Processing ended at 9:41:27 PM
----------------------------------------------------------------------------------------------------------

Log for job job1-1

avis [info]: 704x480 @ 23.98 fps (151 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: slice I:2 Avg QP:22.50 size: 32103
x264 [info]: slice P:66 Avg QP:18.86 size: 12809
x264 [info]: slice B:83 Avg QP:21.90 size: 2079
x264 [info]: mb I I16..4: 35.7% 22.3% 42.0%
x264 [info]: mb P I16..4: 15.5% 17.4% 7.9% P16..4: 22.3% 5.9% 2.0% 0.2% 0.1% skip:28.9%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.1% B16..8: 13.3% 0.6% 1.9% direct:10.2% skip:73.8%
x264 [info]: final ratefactor: 18.84
x264 [info]: 8x8 transform intra:41.1% inter:35.5%
x264 [info]: direct mvs spatial:97.6% temporal:2.4%
x264 [info]: ref P 77.3% 14.4% 4.6% 1.9% 1.8%
x264 [info]: ref B 85.0% 10.6% 2.3% 1.4% 0.7%
x264 [info]: kb/s:1374.6

encoded 151 frames, 2.45 fps, 1375.45 kb/s

----------------------------------------------------------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
Looking for job processor for job...
Processor found!
Starting job job1-2 at 9:41:27 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
--pass 2 --bitrate 1200 --stats "D:\FANSUBBING WORK\Fumoffu Episode 2\Loseless Codecs test laga.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 5 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --analyse all --8x8dct --pbratio 1.4 --vbv-maxrate 25000 --ratetol 2 --me esa --merange 25 --thread-input --progress --no-psnr --no-ssim --output "D:\FANSUBBING WORK\Fumoffu Episode 2\Loseless Codecs test laga.mp4" "D:\FANSUBBING WORK\Fumoffu Episode 2\Loseless Codecs test laga.avs"
successfully started encoding
Processing ended at 9:42:31 PM
----------------------------------------------------------------------------------------------------------

Log for job job1-2

avis [info]: 704x480 @ 23.98 fps (151 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
mp4 [info]: initial delay 2002 (scale 24000)
x264 [info]: slice I:2 Avg QP:21.00 size: 26849
x264 [info]: slice P:66 Avg QP:19.30 size: 11928
x264 [info]: slice B:83 Avg QP:21.55 size: 1882
x264 [info]: mb I I16..4: 39.7% 31.7% 28.6%
x264 [info]: mb P I16..4: 17.1% 16.9% 6.2% P16..4: 22.3% 5.9% 1.7% 0.2% 0.1% skip:29.6%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.1% B16..8: 17.5% 0.6% 1.9% direct: 9.5% skip:70.3%
x264 [info]: 8x8 transform intra:41.2% inter:38.3%
x264 [info]: direct mvs spatial:86.7% temporal:13.3%
x264 [info]: ref P 76.5% 14.7% 4.7% 2.1% 2.0%
x264 [info]: ref B 85.2% 10.8% 2.3% 1.1% 0.6%
x264 [info]: kb/s:1266.6

encoded 151 frames, 2.37 fps, 1267.55 kb/s

desired video bitrate of this job: 1200 kbit/s - obtained video bitrate (approximate): 1270 kbit/s
----------------------------------------------------------------------------------------------------------










The actual script used for the 1st pass:



LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\Tivtc.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\EEDI2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\TDeint.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\vsfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\ColorMatrix.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\Vaguedenoiser.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\mfToon\WarpSharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\Tcomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\LimitedSharpen\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\HQDering\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\BiFrost.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\DFMDeRainbow\FluxSmooth.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\DFMDeRainbow\MSharpen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\DFMDeRainbow\Deen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\hqdn3d.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\EXTRA\degrainmedian.dll")
Import("C:\Program Files\AviSynth 2.5\EXTRA\DFMDeRainbow\DFMDeRainbow.avs")
Import("C:\Program Files\AviSynth 2.5\EXTRA\LimitedSharpen\LimitedSharpen.avs")
Import("C:\Program Files\AviSynth 2.5\EXTRA\vmtoon\vmtoon-v0.74.avs")

d2vpath = "D:\FANSUBBING WORK\Fumoffu Episode 2\VTS_03_1.d2v"
MPEG2Source(d2vpath,info=3,cpu=4)

ColorMatrix(interlaced=true)
BiFrost(interlaced=true)
Tcomb(mode=0,fthreshL=7,othreshL=10)
DeGrainMedian(interlaced=true, mode=2)
hqdn3d(5)
VagueDenoiser(threshold=1.5, method=1, nsteps=6, chromaT=2.0, interlaced=true)

interp = ASSUMETFF().separatefields().SelectEven().eedi2(field=-1,pp=3)
deint = tdeint(mode=0,Order=1,type=1,AP=55,edeint=interp,slow=2)
tfm(d2v=d2vpath,clip2=deint)
tdecimate(mode=1,denoise=true)

crop( 8, 0, -8, -0)
DFMDeRainbow()
Tweak(cont=1, sat=1.3,bright=-12, hue=-1)
LimitedSharpen(strength=41)
vmtoon(thinning=55, strength=14, ssw=2, ssh=2, xstren=75)
warpsharp(32)
TextSub("[Diti-Subs]Full_Metal_Panic_Fumoffu_E01.ass")
trim(0,150)



I took an actual script I am using for encoding, because
I figured that would provide more "actual world" related data.

System information: 512 800mhz ram, amd athlon (64) 3500+

Edit:

Lagarith version used: 1.3.12
MSU version used: 0.6.0

Funny fact: It took me ~32-44% of cpu usage to playback lagarith test file from the 1st pass, it took me ~69-96% of cpu usage to playback the MSU version of the same file - something I find strange since according to docs Lagarith is supposed to be twice as slow for De-Coding... I redid the tests just to make sure I wasn't confusing the files... Strange indeed.

Edit2:

I checked those two because me and a friend of mine who tips me here and there about encoding were discussing this, and so I wanted to see which is faster.

Also, the script used isn't too good with regard to the IVTC proccess, the flow will be chunky... It's the previous script I used before I found a solution to the interrupted unsmooth flow this one produced(solution=vfr).

Zarxrax
28th February 2007, 23:58
I don't think this kind of test is really useful for determining the speed of the two codecs because you have so many filters running on them. The filters use far more cpu time than the codecs themselves, so any difference in the actual codec speeds does not get represented well.

DarkT
1st March 2007, 01:30
True, we will not get from this the information about how much faster one codec is then the other... Because the PERCENTAGE of the time consumed by the codec is not known... But, having merely the times of the codecs on their own - to me atleast is useless... I don't really care if one codec is twice as fast as the other... I want to see an actual script ran on codec X and then on codec Y and THEN I want to see the time difference.

Basically, for me - a test where you seperate everything anr un JUST the thing in question - it's not "in real enviorment" - you know?

Ah well, anyway :).

foxyshadis
1st March 2007, 08:14
I'm not sure why comparing their speeds with just one single script, unless you use that script all the time, is any more real life than without a script. (After all, to figure out how fast they'll be with any given script, you just add the known codec speed to the script speed and you'll have your numbers.)

Testing encoding speed of lossless is pretty useless anyway, as far as I'm concerned. You encode once, but you might decode a half-dozen times or even constantly, in an NLE. The whole point of using lossless encoding is when your script is so incredibly slow that the length of the extra step is smaller than the speed gain; the difference in that one step will get lost in the length of the whole project. Even a fairly heavy x264 lossless encode with CAVLC might be a net gain if it decodes fast enough.

And MSU is very very slow, both encoding and decoding, making it useless for me. Same with CorePNG. MSU Screen is just the opposite, happily, and ffv1 is both smaller than MSU and faster, making it my preferred all-around archiver. Might as well have that 10-20% improvement over lag if you're keeping it around a while.

btw, Lagarith is half the speed of huffyuv, from the docs, not half the speed of MSU. ;)

Also, moved to codecs forum.

zambelli
6th March 2007, 08:14
And MSU is very very slow, both encoding and decoding, making it useless for me. Same with CorePNG. MSU Screen is just the opposite, happily, and ffv1 is both smaller than MSU and faster, making it my preferred all-around archiver. Might as well have that 10-20% improvement over lag if you're keeping it around a while.
Foxy, how does FFV1 compare to HuffYUV in terms of decoding speed?

foxyshadis
6th March 2007, 11:57
Way, waaaaaaaaaaaaaay slower. About the speed of xvid, or a little under 1/2 the speed of lagarith and between 1/3 and 1/2 the speed of huffyuv (depending on the version). Specifically, on this one source,
FFV1: 35 fps (100M)
Lags: 78 fps (122M)
Huff: 82-97 fps (130M)

FFV1 AC vs VLC doesn't make more than 1-2 fps difference.

This is on a dual-core, I know lagarith gains substantially from its MT code. The huffyuv versions less so, and ffdshow's isn't threaded.

zambelli
7th March 2007, 10:09
Way, waaaaaaaaaaaaaay slower. About the speed of xvid, or a little under 1/2 the speed of lagarith and between 1/3 and 1/2 the speed of huffyuv (depending on the version). Specifically, on this one source,
FFV1: 35 fps (100M)
Lags: 78 fps (122M)
Huff: 82-97 fps (130M)

Looks like HuffYUV is still the best choice for NLE and preprocessing. Were you using the original version or the ffdshow/libavcodec implementation?

foxyshadis
7th March 2007, 13:20
A few different variations. Current ffdshow, an old ffdshow, original, one of the squid_80 threaded versions (which came out to 330M...). Can't remember if there was a fifth. I think old ffdshow was fastest, by a hair.