Log in

View Full Version : AutoGK quality differences between XviD & DivX


Data
16th March 2004, 23:24
Hi,

after encoding several files with AutoGK and comparing them I've noticed that DivX seems to have better results in terms of quality.

Here's an example:
XviD 1.0 RC3 / DivX 5.1.1
http://mitglied.lycos.de/datasoong/xvid_2_small.jpghttp://mitglied.lycos.de/datasoong/DivX511_2_small.jpg
The XviD version has a lot of grain, while the DivX detected and corrected that seamlessly. (best example, the red uniform).

Higher resolution images where one can better see the differences are available here:
http://mitglied.lycos.de/datasoong/tng2.html

Now I'm wondering if that's a result of AutoGK encoding settings fed to XviD, or if it's really a codec superiority?

Thanks in advance.

PS: I'd love to user AutoGK in DivX mode, but unless I use maximum quality, unlimited filesize I get errors in the encoded files, as reported here http://forum.doom9.org/showthread.php?s=&threadid=72543 :(

PS/2: Sorry for providing only Star Trek TNG examples, but that is my current personal encoding project ;)

jggimi
17th March 2004, 00:04
Have you read Doom9's codec comparisons (http://www.doom9.org/codec-comparisons.htm)?

Data
17th March 2004, 00:23
Hi jggimi,

thanks for the link :) So it's a codec issue then, current DivX simply deals better with grain in movies than XviD currently does (and there's nothing one can do about it right now) Is that correct?

[in most movies that would make DivX preferable, but in others (i.e. Saving Private Ryan, where they artificially added grain) that advantage can also turn to a disadvantage.]

KpeX
17th March 2004, 00:30
"Deals Better with grain" is subjective. Many of us who prefer XviD use it because of its ability to preserve detail and grain. If you prefer to smooth out this grain, either use a smoothing filter in AviSynth or use a more smoothing codec such as DivX or RV9/10 without EHQ.

Edit: you could also try 'cartoon mode' with xvid (I don't remember if AutoGK supports it, if not you'll have to change this manually.)

Data
17th March 2004, 00:39
Originally posted by KpeX
"Deals Better with grain" is subjective.You're right of course :)If you prefer to smooth out this grain, either use a smoothing filter in AviSynth
Is that also possible using AutoGK? (full GK is still a bit too complex for me, I don't have that much experience with video encoding, and all the possible settings thereto)

Thx again.

manono
17th March 2004, 06:07
Hi-

I'm with KpeX. The pictures you provided are proof to me that XviD is superior. In your hi-res pics, you may notice how DivX smoothed away the details of Picard's face to a degree. However, XviD is also more configurable (although not through AutoGK). If you want the smoothed look that DivX provides, but using XviD, then you have only to switch to the H.263 matrix.

The Quality Modes and the Maximum Quality use the sharper HVS_Best Matrix. If you were able to use the Predetermined Size Modes that use 2-pass encoding methods, when the results of the compression test are low, it'll switch to the HVS_Better Matrix which will also give results similar to your DivX pic.

But I know neither the cause of nor the solution to your problem. Sorry.

Sharktooth
19th March 2004, 15:06
Originally posted by Data
Hi,

after encoding several files with AutoGK and comparing them I've noticed that DivX seems to have better results in terms of quality.

Here's an example:
XviD 1.0 RC3 / DivX 5.1.1
http://mitglied.lycos.de/datasoong/xvid_2_small.jpghttp://mitglied.lycos.de/datasoong/DivX511_2_small.jpg
The XviD version has a lot of grain, while the DivX detected and corrected that seamlessly. (best example, the red uniform).

Higher resolution images where one can better see the differences are available here:
http://mitglied.lycos.de/datasoong/tng2.html

Now I'm wondering if that's a result of AutoGK encoding settings fed to XviD, or if it's really a codec superiority?

Thanks in advance.

PS: I'd love to user AutoGK in DivX mode, but unless I use maximum quality, unlimited filesize I get errors in the encoded files, as reported here http://forum.doom9.org/showthread.php?s=&threadid=72543 :(

PS/2: Sorry for providing only Star Trek TNG examples, but that is my current personal encoding project ;)
My personal preference is the XVID pic.
As manono said there are more details on the Picard's face and also in the background.
However your question just reflects why i suggested to add a Sharpness/Smoothness slidebar to autogk. That sliderbar could "control" which avisynth filters to use, their parameters and even quantization matrixes used by the codec (only for Xvid).

Wilbert
19th March 2004, 15:39
I'm with KpeX. The pictures you provided are proof to me that XviD is superior. In your hi-res pics, you may notice how DivX smoothed away the details of Picard's face to a degree.
Question: Did you leave DivX's pre and post processing enabled during the encoding (resp. playback)? If so, could you disable both of them, and compare them again?

Data
19th March 2004, 15:50
I have no idea, if AutoGK enables such settings during encoding (I've added the encoding log), but they were not active during playback (as the screens are directly ripped out of the avi using VirtualDubMod [using frame to png export])

Isn't post procesing something that only happens during playback (and not during encoding)?

Here's the log:
[15.03.2004 04:38:06] Input dir: D:\EU_109551\VIDEO_TS
[15.03.2004 04:38:06] Output file: D:\TNG\TNG_1x01.avi
[15.03.2004 04:38:06] Audio: English
[15.03.2004 04:38:06] Subtitles: English : Normal
[15.03.2004 04:38:06] Subtitles 2: Deutsch : Normal
[15.03.2004 04:38:06] Codec: DivX
[15.03.2004 04:38:06] Target quality: 100%
[15.03.2004 04:38:06] Custom audio settings: AC3
[15.03.2004 04:38:06] Started encoding.
[15.03.2004 04:38:06] Demuxing and indexing.
[15.03.2004 04:45:48] Analyzing source.
[15.03.2004 04:45:48] Writing the following script to D:\TNG\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("D:\\TNG\\gk_tmp\\_.avs",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("D:\\TNG\\gk_tmp\\_.avi");
===========================================================
[15.03.2004 05:08:54] Source has percentage of interlacing in motion areas: 43,67
[15.03.2004 05:08:54] Source is considered to be interlaced.
[15.03.2004 05:08:54] Analyzing PAL source with different field order.
[15.03.2004 05:08:54] Writing the following script to D:\TNG\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("D:\\TNG\\gk_tmp\\_.avs",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("D:\\TNG\\gk_tmp\\_.avi");
===========================================================
[15.03.2004 05:31:45] Source has percentage of interlacing in motion areas: 43,78
[15.03.2004 05:31:45] Source is considered to be interlaced.
[15.03.2004 05:31:45] Found 130897 frames
[15.03.2004 05:31:45] Indexing subtitles.
[15.03.2004 05:31:45] Writing the following script to D:\TNG\gk_tmp\vobsub.params
===========================================================
D:\EU_109551\VIDEO_TS\VTS_01_0.ifo
D:\TNG\gk_tmp\TNG_1x01
1
0
9 1 cc
CLOSE
===========================================================
[15.03.2004 05:35:42] Compressing subtitles.
[15.03.2004 05:36:00] Running single pass encoding.
[15.03.2004 05:36:00] Writing the following script to D:\TNG\gk_tmp\TNG_1x01_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\filters\mpeg2dec3dg.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\undot.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\kerneldeint.dll")

function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
return order }

movie = mpeg2source("D:\TNG\gk_tmp\TNG_1x01.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=35)
c_width = width(cropclip)
c_height = round(height(cropclip) / 1.09401709401709)
input_par = float(c_width)/float(c_height)
fixed_aspect = input_par > 1.4 ? 1.09401709401709 : 1.06666666666667
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=35)
KernelDeInt(order=getOrder(movie),sharp=true)
Undot()
LanczosResize(out_width,out_height)
===========================================================
[15.03.2004 05:36:01] Writing the following script to D:\TNG\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("D:\\TNG\\gk_tmp\\TNG_1x01_movie.avs",0,0);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.SetCompData(405,"OAEAAAAAAAABAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAA+gAAADIAAAAgEWoAAAAwAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamZmZmZnJP5qZmZmZmck/AAAAAAAAAAAAAAAAgAIAAOABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAABkAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA/////wIAAAABAAAAAAAAAAEAAAACAAAARDpcVE5HXGdrX3RtcFxUTkdfMXgwMV9jb2RlYy5sb2cAYzpcXHRlc3QuZGl2eABEOlxUTkdcZ2tfdG1wXFROR18xeDAxX2NvZGVjLm12AGM6XFxuZXdyYy50eHQA");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("D:\\TNG\\gk_tmp\\TNG_1X01 AC3 T02 3_2ch 448Kbps DELAY 0ms.ac3",0x00000203,0);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,2,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.SaveAVI("D:\\TNG\\TNG_1x01.avi");
===========================================================
[15.03.2004 12:08:36] Duration was: 6 hours 32 minutes 35 seconds
[15.03.2004 12:08:36] Speed was: 5,56 fps.
[15.03.2004 12:08:36] Job finished.

Sharktooth
19th March 2004, 16:27
Post processing happens only during playback.
but since vdub uses the vfw decoder you have to disable it manually editing the registry as described by DigitAl56K in THIS THREAD (http://forum.doom9.org/showthread.php?s=&threadid=71706).
While using AutoGK you have no control over pre processing.

Data
19th March 2004, 16:33
Then post processing was off in the above pictures, as my registry exactly reads:

HKEY_CURRENT_USER\Software\DivXNetworks\DivX4Windows
Postprocessing: 0

I've also just tried this too: disabling the post-processing in the global decoder properties - makes no difference whatsoever in the extracted png files.

Sharktooth
19th March 2004, 16:44
Good. i still like the xvid pic more and more:)

Data
19th March 2004, 16:50
I'm starting to agree ;) The DivX has lost a little too much of the detail. Something in between would be nice ;) Such a suggested slider would certainly be a great thing ;)

manono
20th March 2004, 03:32
Hi-

This is a difficult question, and I hope you don't think that we were trying to browbeat you into submission on this issue. I hate noise and film grain myself, partly because I hate to see all those little black dots floating around the screen, and partly because it makes the video more difficult to compress. I can certainly understand your (earlier) point of view that the video is improved by getting rid of the stuff.

But getting rid of it without damage to the video is tricky, if not impossible. If you use a soft Matrix (such as the DivX H.263), or a spatial smoother, then you can remove detail from the video along with the noise. Some people don't mind, because a video without noise is worth more to them than a very lightly smoothed video. If you use a light temporal smoother, like GKnot's Little Noise (Temporalsoften(2,3,3,mode=2,scenechange=6)), then it'll remove some of the stuff. But temporal smoothers at settings strong enough to really do anything, like GKnot's Medium Noise (Temporalsoften(3,5,5,mode=2,scenechange=10)), run the risk of leaving obvious artifacts.

When you first compared the pics, you though something like, "Good, no more noise with DivX." When I first saw them, I thought something like, "Where'd Picard's facial texture and wrinkles go?" A lot of it is just personal preference. But thanks for providing the pics. They serve as a nice basis for discussion.

Wilbert
23rd March 2004, 16:20
Isn't post procesing something that only happens during playback (and not during encoding)?
True. But DivX5.11 has also pre-processing which is enabled by default (which is done during encoding). You can disable that in the settings of DivX5.11.

Sharktooth
23rd March 2004, 17:13
Originally posted by Wilbert
True. But DivX5.11 has also pre-processing which is enabled by default (which is done during encoding). You can disable that in the settings of DivX5.11.
NEGATIVE! At least if he's using AutoGK.