Log in

View Full Version : XviD1.0... does not like Avisynth denoisers - test conclusion


Kb_cruncher
26th December 2003, 13:11
I am backing up 12monkeys(PAL) and have not been able to get a good result after attempting it four times already so i started over with a short 1000frame first pass test(keeping the avi).After having found the best bframe settings to use by taking screen shots of the xvid stats window and analizing the min/max/average bits/frame i still was not happy with the result.
I tried everything i could think of, increasing and decreasing the resolution, using sharpening, increasing and decreasing bframe settings, using mpeg and h263, some results where better than others and i kept the xvid setting from the best looking one.Now!! by default i always use c3d and undot in my script to improve compressability and as a last resort i took them out and to my supprise the quality was almost perfect...i couldn't believe it so i took screen shots of the stats woindow from the test with and without the filters and this is how they read.

=================
TEST WITH FILTERS
=================
[EDIT]The spacing in the data did not keep so they are a bit messy(i am no good at formating text)

=====================================================================
-------------Frames--------Quant-------Frame Size(Bytes)-------------
--------------------------min--max-----min----max----avg-----total(k)
.
I-VOP-----------13---------2----2-----20679--38394--27581-----350
.
P-VOP----------411---------2----2------4189--21567--10255----4116
.
B-VOP----------576---------3----3-------246---8053---2189----1261
.
Total---------1000---------2----3-------246--38394---5834----5698
.
Avg Bitrate(kbps)---1166
=====================================================================



====================
TEST WITHOUT FILTERS
====================
=====================================================================
--------------Frames-------Quant-------Frame Size(Bytes)-------------
--------------------------min max----min --- max -- avg -- total(k)

I-VOP-----------13---------2----2-----22323--40812--29286-----371

P-VOP----------420---------2----2------4163--22676--10928-----4482

B-VOP----------567---------3----3-------297---8454---2314-----1281

Total---------1000---------2----3-------297--40812---6282-----6135

Avg Bitrate(kbps)---1256
=====================================================================

You will notice that the number of P-Frames increased while the number of B-Frames decreased.I would have thought this would be reversed by xvid to compensate for the decreased compressability, instead choosing to give more bits to the P-Frames@Quant2.I would say this is where the jump in quality comes from and it was a HUGE jump in quality compared to the jump in average bitrate.So i am not too sure what to make of it, does this show that using prefilters to increase compressability is not always(if ever)a good idea or is it just a one off scenerio ?? i will do a full first pass of each to see wether the results are the same in relation to the smaller tests and try the same thing with another source and see wether the result can be duplicated.

I will take some screenshots of the frames and post them as links here so you can see for your self the large jump in quality as it is hard to really comprehend it from a description.

The B-Frame settings i used for the tests where - 2 / 1.50 / 0.75
Its also intersting to note that going from - 2 / 1.50 / 1.00(default) to - 2 / 1.50 / 0.75 the B-Frame Quant used went from Quant4 to Quant3.I used this setting in 4 other previous tests before deciding to remove the filters so i know that removing the filters and not the change in B-Frame quant was the reason for the quality gain.

I have been using the latest Gamrdev built for a while now.This build does not use Chroma Motion, AdQuant or Trellis in the first pass even if they are checked so these setting did not have a baring on my tests.

Hopefully this is a new finding and not something that has been known for a while:)

Teegedeck
26th December 2003, 13:23
Perhaps this will make some more people realize that filtering does more harm than good.

Don't use noise-filters unless the original looks really shabby.

Koepi
26th December 2003, 13:37
You should use bframes at default settings with xvid-1.0-beta 1-3 because we apply a "reverse quant formula" in bitrate scaling. Now the defaults will look fine (unless you really have plenty bits to spend).

Regards
Koepi

Kb_cruncher
26th December 2003, 15:04
(unless you really have plenty bits to spend).

I do:D

I store my backups on HD and playback with my xbox, although i try and keep to an average of 1050mb i don't strictly adhere to it and i like the quality that those bframes setting give.I have not tried default Bframe setting with beta3 as of yet though.

Didée
26th December 2003, 15:27
Koepi:

Does that mean the default B-frame settings are the only one doing a correct bitrate scaling? Hopefully not!


Teegedeck:

Veto! - But perhaps it makes people realize that you can't simply throw your favorite denoiser at all sources, and be done with that all the time . Sometimes it's more like "finding the needle in the haystack" (German proverb, translated).


Kb_cruncher:

Firstly: using the {code} {/code} tags helps a lot in table formatting, really ;)

Second: 12 Monkeys belongs to the hard ones. The picture is soft, unstable, and has much noise. When I did that movie, I did _not even try_ Convolution3d, because I was sure that it would not be able to cope with that particular sort of noise in a satisfying way.

Lastly: Sorry, but it is not intersting at all that going from 2/1.50/1.00 to 2/1.50/0.75 drops B-quants from q4 to q3. It's the expected behaviour. Take the B-frame-formular, and do the simple math.


- Didée,

(still trying to get awake today)

Koepi
26th December 2003, 15:38
Didee:
no, it doesn't mean that. It just means that birate scaling is smoother now and bframes don't "kick in so hard" as they did in dev-api-3.

Regards
Koepi

Angrychair
26th December 2003, 21:39
Actually I've found that the specific settings you're advocating (which I recall some other people advocating, 2,1.5,.75) have actually increased size on many sources I've tested as well as decreasing quality.

If you really think those settings are good you might want to try not using b-frames at all. You'll probably be pleased wit the results.

Originally posted by Kb_cruncher
I do:D

I store my backups on HD and playback with my xbox, although i try and keep to an average of 1050mb i don't strictly adhere to it and i like the quality that those bframes setting give.I have not tried default Bframe setting with beta3 as of yet though.

Kb_cruncher
27th December 2003, 11:46
12 Monkeys belongs to the hard ones. The picture is soft, unstable, and has much noise.

Yes it certainly is one of the hardest movies that i have done so far, i think the soft picture has been done that way purposly to give the movie a certain atmosphere.I know terry gilliam had difficulty making it and it did not turn out quite has he expected it would but it still rates as one of my all time favorites.

Sorry, but it is not intersting at all that going from 2/1.50/1.00 to 2/1.50/0.75 drops B-quants from q4 to q3. It's the expected behaviour. Take the B-frame-formular, and do the simple math.

Oh well, it was intersting for me to find this out for my self.Math is not a strong point of mine and i have no idea how the math is formulated for bframes.I have since started using beta3 and on Koepi's advice now use default bframes.12monkys came out very nice in the end(no filters used)Thanks koepi:) and everyone else for there good advice.

LigH
28th December 2003, 14:12
As far as I understood, the basic B frame math is very simple:

B-frame-quant = Integer(I/P-frame-quant * B-frame-factor + B-frame-offset)

Examples (minimum I/P-frame quantizer shall be 2):

a) B-frame-factor = 1.5, B-frame-offset = 1.0: 2 * 1.5 + 1.0 = 4.0

b) B-frame-factor = 1.5, B-frame-offset = 0.75: 2 * 1.5 + 0.75 = 3.75

Kb_cruncher
28th December 2003, 14:33
Thanks for the easy to understand explanation LigH, i did not think it would be quite that simple.
I have since done backups of both my Matrix and Leon_The_Proffessional DVD's using both default bframe settings and 2~1.75~1.25 and in both cases the latter setting gave noticably better quality, This setting uses more q5, less q4 and gave a boost to q2 for I/P frames.