Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Display Modes
Old 3rd June 2004, 02:50   #1  |  Link
Blue_MiSfit
fit 10 in 5
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Santa Clara, CA
Posts: 3,417
question regarding p and b frame quantization

Okay, from my understanding, B frames can theoretically look as good as P frames with higher quantization values. Example: A Q5 B frame could look theoretically as good as a Q3 or Q4 P frame. Thus, XviD would assign B frames higher quantization values than P frames, correct?

This has always been the case in my encodes, the P frames end up getting mostly q2-4 and the bframes get 3-6 or so. However, in a recent encode I tried setting bframes to 8/1/0, thinking this would set the minimum b frame quantizer to 2. However, in the second pass, I am getting strange quantization values, have a look at this screenshot:



As you can see, the average P frame quants are higher than the average B frame quants. Isn't this supposed to be the other way arround to achieve highest quality? I also don't like the spread of I frame quants, I like I frames to stay very low... 2-4 at the most. Am I just doing something very stupid, or is there a bug here?

[edit] Also, doesnt an average quant value of 5.96 seem way too high for a 1.1GB target filesize if the movie is about 90 minutes long?
Here are my settings:

Source: A Bug's Life DVD NTSC 4:3
"CG-Animation" CQ Matrix
Qpel
GMC
Adaptive Quant
Bvops @ 8/1/0
Bvop sensitivity 80
Packed Mode
Turbo
Chroma Motion & Optimizer
Trellis
MSP 6 & VHQ4
All quants 2-31

I am using Gamr's May 27th XviD build.

AVS consisted of only crop and undot
[/edit]

comments/suggestions/input welcome as usual.

Thanks
~misfit
__________________
I require bits. More bits!

Last edited by Blue_MiSfit; 3rd June 2004 at 03:38.
Blue_MiSfit is offline   Reply With Quote
Old 3rd June 2004, 03:45   #2  |  Link
sysKin
Registered User
 
sysKin's Avatar
 
Join Date: Jun 2002
Location: Adelaide, Australia
Posts: 1,166
Since p-frames and b-frames scale differnetly in 2nd pass, you can't really assume that their average quant will be identical (or even close) just because ratio is 1, offset 0 (well in fact, from the explaination, you should... but it's not really that easy to achive all that in the code).

So, bframes and pframes have a different quant.. and that's what you got, right? It's similar, like you asked, but differnet.

You always have to be careful when you try crazy settings like that. Here, the result is simply horrible, and that's just because of a small scalling difference...

Have fun trying your crazy settings,
Radek
__________________
Visit #xvid or #x264 at irc.freenode.net
sysKin is offline   Reply With Quote
Old 3rd June 2004, 10:41   #3  |  Link
Blue_MiSfit
fit 10 in 5
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Santa Clara, CA
Posts: 3,417
righto. surprisingly the result didnt look terrible, but it definatley wasnt up to par with what a 1.1 gig rip of 90 mins of CG video should look like.

I am re encoding with bvops @ 2/1/1 and sensitivity @ 5.

Perhaps this will make something more sensible.

~misfit
__________________
I require bits. More bits!
Blue_MiSfit is offline   Reply With Quote
Old 4th June 2004, 13:15   #4  |  Link
lordadmira
Registered User
 
lordadmira's Avatar
 
Join Date: Mar 2004
Location: Zinzinnati
Posts: 281
Actually I would say the source of ur troubles is the CG Animation Matrix. I've tried it and haven't liked the results. There is no relationship between the quants that P frames get and what B frames get unless u set an offset. To be honest I've found the H263 matrix to be the best for all sorts of animated material. I should know since that's almost all I encode. ^^ Your status graph looks perfectly fine. Keep in mind that CGI material is going to contain a lot of pure gradients, something that fundamentally cannot be encoded properly by Mpeg4. The only thing you can do is smooth out the artifacts with lots of bits. I think if u kept ur original settings and used the H263 matrix it'll look just fine. Better than the defaults.

LA

PS If u want the I frames to have more bits u can set the I frame boost in the Xvid settings.
__________________
Anata wa baka da! REPENT!

Last edited by lordadmira; 4th June 2004 at 13:18.
lordadmira is offline   Reply With Quote
Old 6th June 2004, 06:02   #5  |  Link
Prettz
easily bamboozled user
 
Prettz's Avatar
 
Join Date: Sep 2002
Location: Atlanta
Posts: 364
Aren't b-frames significantly larger than p-frames at the same quant?
Prettz is offline   Reply With Quote
Old 6th June 2004, 09:34   #6  |  Link
lordadmira
Registered User
 
lordadmira's Avatar
 
Join Date: Mar 2004
Location: Zinzinnati
Posts: 281
No there is no relationship between the size of P frames and the size of B frames for any quantizer. It's the motion compensation that results in B frames being significantly smaller than P frames; this is unrelated to the quantizers. Now if u have B frame quantizer offsets set then this effect will be even larger. If ur B frames are coming out larger than the P frames then something is seriously wrong.

LA
__________________
Anata wa baka da! REPENT!
lordadmira is offline   Reply With Quote
Old 7th June 2004, 02:11   #7  |  Link
Prettz
easily bamboozled user
 
Prettz's Avatar
 
Join Date: Sep 2002
Location: Atlanta
Posts: 364
So then, other than the fact that b-frames are forced to a higher quantizer, what makes a b-frame smaller than a p-frame?
Prettz is offline   Reply With Quote
Old 7th June 2004, 02:39   #8  |  Link
RadicalEd
Registered User
 
Join Date: Dec 2001
Posts: 987
More precise motion compensation, meaning less interblock data. That's more precise in the sense that there are two frames to search for matches in.
RadicalEd is offline   Reply With Quote
Old 7th June 2004, 02:57   #9  |  Link
Prettz
easily bamboozled user
 
Prettz's Avatar
 
Join Date: Sep 2002
Location: Atlanta
Posts: 364
Quote:
Originally posted by RadicalEd
More precise motion compensation, meaning less interblock data. That's more precise in the sense that there are two frames to search for matches in.
So that would come out to, what, 1 extra bit for each predicted macroblock? (I wish I had a detailed copy of the MPEG4 spec to look at right now). It seems to me that, compared to how my thinking was about it before, there's practically no difference between b and p frames.


edit: I believe the reasoning behind my assumption that b-frames are inherently larger than p-frames is from when I made an encode where all b-frames would come out to quant 2, and it ended up being way oversized and poor quality, although I don't remember exactly what the problem with it was now.

Last edited by Prettz; 7th June 2004 at 03:59.
Prettz is offline   Reply With Quote
Old 7th June 2004, 03:22   #10  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 2,705
@Blue_MiSfit
hehe what you will get with such settings is a nice blinking effect
i wonder you didn't recognized that it will be even more horrible with AQ on
__________________
all my compares are riddles so please try to decipher them yourselves :)
current Main XviD PSNRLab version 1.1
current XviD PSNRLab update 1.1.3
MT1389xx Player Infos
XviD EDP Build CVS (CruNchers Visual System ©) V 1.4 new with predefined profiles ;)
Code:
Olivera: "We're expendable assets"
         "and we've just been expended"
"It's not a trick it's a Sony Rootkit" pwnz :devil: :angry: :rolleyes:
CruNcher is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:25.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.