Log in

View Full Version : [req] higher quality at max quality,..


Selur
16th December 2002, 10:19
This is ment to be a little question about higher quality,..

I just did a little comparison of DivX5, Xvid and 3ivX and despite the fact that the 3ivX encode was abouth twice the size of the Xvid encode (about 10% larger than DivX5) I had to admit that it definatly won in regard of quality.

I just did a 3CD Matrix 3ivX encode and the quality is amazing, can't see the difference to the DVD.

So is it possible to tweak Xvid that it'll produce better quality at max bitrates ?

Cu Selur

Ps.: There's no visible ringing with 3ivX at max bitrate, with Xvid there is. So plz don't take this wrong I really love Xvid, it's just a little request for the programmers to have a look at, if they find the time.

Gaia
16th December 2002, 10:58
Member of Flaskmpeg.info? Do you still use Flaskmpeg? If you do you can't compare anything.

What do you mean better quality at max bitrate? I can't understand what you are talking about.

It's again matter of taste what you think is best quality. Doing 3cd encode of Matrix is not a good way of testing. I personally like crispier, sharper more detailed picture, i don't care about few blocks here and were.

What program you used for encoding? What kind of settings for Xvid and Divx? What kind of Avisynth script you used? I have done some testing with 3ivx and got totally different results.

Basicly give more details.

kilg0r3
16th December 2002, 11:02
Xvid@Q1 + Qpel + Chroma Motion :D

zulu
16th December 2002, 11:44
What do you mean better quality at max bitrate? I can't understand what you are talking about.

i think he means that even if you set the bitrate to maximum you won't reach the quality of the dvd source. don't know how 3ivx performs at the maximum bitrate, but this seems to be a problem of mpeg4 in general.
have a look at this (http://forum.doom9.org/showthread.php?s=&threadid=21694&highlight=professional+studio+quality) thread.

mikeson
16th December 2002, 15:05
http://forum.doom9.org/showthread.php?s=&threadid=39976&pagenumber=2

Selur
16th December 2002, 15:31
"i think he means that even if you set the bitrate to maximum you won't reach the quality of the dvd source. "
Yup, that's what I ment,..
The main thing that bugs me, is that u still got rinning&co with yout encodes, even if u set the codec to max quality or the file turns out to be undersized (if u aim for a 2 CD rip, which I normaly do).

The thing is 3ivX produces a bigger file at max quality than xvid, but it also kills ringing, color/wall_movement,...

Cu Selur

Ps.: about the flaskmpeg thing:
1st I'm an admin of the flaskmpeg.info/baord (german)
2nd flask isn't so bad, atleast the newest version
3rd I used GordianKnot to create the avs file and Virtual Dub Mod for encoding,...
4th I'm also a mod at the doom9.de forum; so may be I'm not a total noob ;)

mikeson
16th December 2002, 15:32
The thing is 3ivX produces a bigger file at max quality than xvid, but it also kills ringing, color/wall_movement,...

I disagree with that, just follow my prevoius post.

Selur
16th December 2002, 15:35
I did,.. :)
And I just tested another movie and had to realise that not all the movement is gone, but it's a lot less visible than with xvid.

Cu Selur

kilg0r3
16th December 2002, 15:41
Has anybody already made a test with xvid at quant 1?
Are we talking max bitrates or not?

Didée
16th December 2002, 16:30
I haven't used quant 1 for a pretty long time ...

In the past, speak some months ago, I found quant 1 to be buggy sometimes, for no obvious reason. And since I saw no need for the resulting extreme bitrate, I didn't investigate since then.

Are the quant1's bugfree now?

Selur
16th December 2002, 16:38
I just selected,. quality = 100%, so it could be that xvid will still use quant 2,.. will test taht tomorrow (when I get home)

"Are the quant1's bugfree now?"
Thought it just produced an unresonable amount of data,...

Cu Selur

drebel
16th December 2002, 16:39
...just wait for H.264 implementation....:)

regards,
george

mfluder
16th December 2002, 19:11
@Selur

I read your results in other thread and your mistake was that you used new modulated quantization which is actually only h.263 when used with quantizers lower than 4 (which is most likely the case in your tests) and h.263 quantization is known to keep less details. You also used bframes which are also known to have less details than without it but you get lower filesizes. If you want the highest quality possible with XviD just use constant quantizer encoding with quant 2 and MPEG quantization (chroma motion is also nice) and I guarantee you that you wont be able to tell a difference between XviD and DVD and there also wouldn't be any ringing. If that is not enough for you and you want higher quality but also higher filesizes you should use custom quantizer matrices. You can find some good matrices here (http://forum.doom9.org/showthread.php?threadid=33499) and here (http://forum.doom9.org/showthread.php?threadid=34493). Some of them are for lower bitrates and some of them are for higher bitrates. I suggest you try that HVS matrix which is attached on first post in this (http://forum.doom9.org/showthread.php?threadid=33499) thread.

mfluder

Selur
16th December 2002, 22:49
Hmm,.. I did also test mpeg & all features of, and there was still some ringing around the cable at Morpheus head (where Morpheus is 'questioned' by Agent Smith).

Thx for the info about the different matrixes, totaly forgot them,.. (tested them a while back, but never at max quality)

Cu Selur

/edit:
just did some test, and I really like the hvs-best-picture matrix it helped a bit, but the real quality boos came with doing a 1pass-quantizer=1 encode, earlier I did a 1pass-quality = 100% encode and so I had to realize that quality=100% isn't the same as quantizer=1 (which I thought), it matches quantizer=1)

So the next question is? Is quantizer 1 buggy, and if not why isn't it used to prevend undersized files? If it is buggy, could someone plz fix it?
edit/

/edit2:
mfluder you are my man of the day, I finally found a way to produce the quality I like:
hvs-best-picture + 1pass-quantizer=1 + bframes(3/150/100)+ chroma motion + qpel + dynamic hpel/qpel; at least for the scene where morpheus is questionend (matrix chapter 28), this really is how I like it,.. :D
edit2/

sam_b
17th December 2002, 01:45
@Selur
I think the reason why quant 1 is not considered is that using quant2 and a larger image will give better quality and a smaller filesize. Not relavent to all uses, but for DVD conversion and capture archiving it is. Can I assume that you have tried post-processing on XviD?

mfluder
17th December 2002, 03:08
@Selur
IMO it's an overkill to use quant 1. You'll get much much bigger filesize which is not worth the quality improvement. Also, there is a problem of a CPU usage. It's much higher when decoding a file encoded with quant 1. And most important thing is that quant 1 is buggy with current builds due to TOOSMALL_LIMIT set to 1. This will be resolved when new API is finished by setting TOOSMALL_LIMIT to higher value for quant=1 and to 1 for quantizers higher than 1. I suggest that you use quant 2 and try to find a matrix that fits your needs. If you can't find one than try making one yourself. That way you'll also learn some things about quantization.

mfluder

Kramerica
17th December 2002, 09:34
I have found b-frames to lower the quality of the encode quite a bit (for instance, your setting of 3-150-100)...you might want to remove the b-frames and go w/ quant. 2...this might produce better quality...just a suggestion

Gaia
17th December 2002, 09:41
Originally posted by Kramerica
I have found b-frames to lower the quality of the encode quite a bit (for instance, your setting of 3-150-100)...you might want to remove the b-frames and go w/ quant. 2...this might produce better quality...just a suggestion

I don't agree with you at all. B-frames have improved all my encodes a lot but then again i haven't tried max quality. Example Matrix is ultimate b-frame movie, even with very high bitrates all my Matrix encodes(without b-frames) looked really bad but 1CD rip with b-frames and quality is simply amazing. And yes i use only 2-pass mode.

Selur
17th December 2002, 10:26
"using quant2 and a larger image will give better quality and a smaller filesize"
have to disagree with that, with quant 1 ringing&co are not visible, with quant 2 they are

"Can I assume that you have tried post-processing on XviD?"
yup, tried wit and without postprocessing (used ffdshow and nics decoder for testing), but I still would votefor quant 1 if it's a quality matter.

"and most important thing is that quant 1 is buggy with current builds due to TOOSMALL_LIMIT set to 1. This will be resolved when new API is finished by setting TOOSMALL_LIMIT to higher value for quant=1 and to 1 for quantizers higher than 1. I suggest that you use quant 2 and try to find a matrix that fits your needs. If you can't find one than try making one yourself. That way you'll also learn some things about quantization."
Thx, didn't know for sure quant 1 was buggy, so I'll go to quant 2 and try to generate my own the quantmatrix.

Cu Selur

soujir0u
17th December 2002, 10:38
There are still some scenes (very few though) which look bad with Quant 2. For these, I use Quant 1 with the credits function, it looks really much better. I think B-frames helps a lot for low bitrate encodes, but for high bitrate, no B-frames will look better.

Selur
17th December 2002, 12:26
"There are still some scenes (very few though) which look bad with Quant 2."
yes, same opinion here

"I think B-frames helps a lot for low bitrate encodes, but for high bitrate, no B-frames will look better."
I sometime prefer b-frames instead of using a smoother ;)

Cu Selur

Kramerica
18th December 2002, 00:14
Gaia, I am speaking about first pass with versus without b-frames. The first pass without will look better than first pass with. But, when you are trying to compress a movie down a lot, for the second pass, b-frames can more often than not, create higher quality than without.

ookzDVD
19th December 2002, 06:04
@Selur,

is that 3ivx support YV12 ?

Thank you.

Stux
19th December 2002, 12:38
3ivx does support YV12 as an input format, but due to an error which was made shortly before the PR2 release its currently broken.

It'll be fixed in the next update

Selur
19th December 2002, 16:23
"and most important thing is that quant 1 is buggy with current builds due to TOOSMALL_LIMIT set to 1. ..."

by sysKIn:
"Really, it's been fixed for months now. "

see:
http://www.xvid.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=893

Cu Selur

kilg0r3
19th December 2002, 16:50
so, let's start two pass encodes with max/min quant settings like those below.

iframe min 2
iframe max 4
pframe min 1
pframe max 7

personally, i wouldn't allow q1 iframes cause i think they will huge. i am very curious if this q1 thing works in two pass mode?

mikeson
19th December 2002, 16:57
@kilg0r3:

AFAIK P-frames are "based" on I-frames, so I think you gain nothing but bigger file setting min I-frame to 2 and P-frame to 1 IMHO. Instead you should consider setting I-frame to 1 also...

mfluder
19th December 2002, 20:10
Selur,
You should really be aware, that if it comes to projects like xvid, the statement "will be fixed by [solution]" should be read as "I have a solution, fixing it in a few moments".... ;D

Really, it's been fixed for months now.

Radek



Hi Radek,

I'm not registered at xvid.org forums so I'll answer here. Do you remember the time (it was august I think) when you suggested to introduce coefficient thresholding to eliminate the danger of zero IDCT at quant 1. You suggested to set TOOSMALL_LIMIT to 3 as it also gives higher PSNR in your tests. And then some guy said that such a high threshold removes too much details (btw I was that guy ;)). Then there was quite a discussion on how to solve this and gruel and Isibaar agreed that solution which I mentioned in my last post in this thread and which was quoted by Selur on xvid.org forums was the most convenient. Also, TOOSMALL_LIMIT was lowered to 2 (it also removes details) in dev-api-3 branch and stayed like that for months until you changed it to 1. Here is the quote from changelog:

9.11.2002 13:40:
U xvidcore/src/utils/mbtransquant.c (rev.1.11.) syskin:
- TOOSMALL_LIMIT = 1

I said great, it's been fixed. And then here is what Isibaar said three days later. Also a quote from changelog:

12.11.2002 16:20:
U xvidcore/src/utils/mbtransquant.c (rev.1.11.) Isibaar:
- Remember: TOOSMALL_LIMIT of 1 introduces artifacts at quant = 1


Please forgive me if this is really fixed and if I'm talking something that is not true. I know some things about MPEG-4 but not as much as I would like to know. I haven't looked at the sources but I assumed that it's not fixed yet because of what Isibaar said. Please correct me if I'm wrong.

Regards,
mfluder

Selur
19th December 2002, 21:29
posted a little message at xvid.org for sysKIn to please have a look at this thread,.. hopefully he can clear this,... :)

Cu Selur

sysKin
21st December 2002, 15:49
Originally posted by mfluder
[B]I haven't looked at the sources but I assumed that it's not fixed yet because of what Isibaar said. Please correct me if I'm wrong.
You can get the difference between version 1.11.2.4 and 1.11.2.5 (Isibaar's fix) at
http://cvs.xvid.org/horde/chora/diff.php/xvidcore/src/utils/mbtransquant.c?login=2&r1=1.11.2.4&r2=1.11.2.5&ty=u

Here's a quote (well the important part of it)
+ uint32_t increase_limit = (iQuant == 1) ? 1 : 0;

- if ((sum >= TOOSMALL_LIMIT) || [etc...]
+ if ((sum >= TOOSMALL_LIMIT + increase_limit) [etc...]

So TOOSMALL_LIMIT is 1 + (iQuant == 1) ? 1 : 0; (to less c-oriented readers : 1 plus (1 if quant is 1, 0 otherwise).

That's exactly the fix :D

Radek

PS: did I write "for months now"? Well, it was on 12/11/2002 so it's a bit over a month ;p. Close enough.

mfluder
21st December 2002, 18:33
Thanks Radek for explaining this. I guess it's always a good idea to read the latest sources first and then make a comment :) So Selur after all it's safe to use quant 1. Sorry for the inconvenience.

mfluder

Selur
21st December 2002, 18:57
No problem, so at least know I know for certain :)

Cu Selur

Ps.: thx to sysKin for replying ;)

trbarry
22nd December 2002, 18:02
Apologies for not knowing what the too small limits,etc. are above but is there a max size problem, and was it fixed?

It seems that if on 2 pass (internal) if I specified a large file size I should at least be able to get close to the first pass size but that doesn't seem to be anywhere close at all, always much smaller.

- Tom

edit: Sorry, brain dead mistake. I'd gotten my min P-frame quant set to 3 somehow.

Satlover
18th March 2003, 10:56
Originally posted by Selur
This is ment to be a little question about higher quality,..

I just did a little comparison of DivX5, Xvid and 3ivX and despite the fact that the 3ivX encode was abouth twice the size of the Xvid encode (about 10% larger than DivX5) I had to admit that it definatly won in regard of quality.


Hi, Selur I am really interested in Max quality for 1 movie or 2 movies on to DVD-r with UDF filesystem. Do you have any advice on settings, I will use Avisyth and VirtualDubmod for the encoding. Maybe there should be a new forum on 3ivX.

Selur
19th March 2003, 12:28
Atm I'm not too sure what's better:
Xvid with VHQ(1) (no other feature activated)
or 3ivX at 100% quality :)

Got no real time for testing atm :(

kilg0r3
3rd April 2003, 20:00
@selur
are talking about q2 or q1?
btw, have you tried one of those fancy custom matrices floating around?

Selur
4th April 2003, 08:24
"are talking about q2 or q1?"
In my last post, I used quant 2+VHQ(1), now I would still use quant 2 but with VHQ(1 or 4), qpel, chroma motion&optimizer turned on ;)

"btw, have you tried one of those fancy custom matrices floating around?"
Yeah, also played aorund with it myself, but in the end it didn't bring much good. It's possible to optimize a matrix for a special movie or better scenetype, but for general use I decided to stick with the normal h263&mpeg matrices :)

Waiting for the next 3ivX release, as Stux posted in the 3ivX board that the next version should support 2pass encoding. If the new version is out I'll do some more comparissons between 3ivX&Xvid. ;)

Atm, I prefer Xvid with the settings mentioned before, it's a lot slower than 3ivX but sharper in most cases.

Cu Selur

Ps.: I know it's kind of wrong to ask here, but did anyone test the new EKG (or was it ECF) feature of DivX5.0.4, is it any good ?