PDA

View Full Version : B-frames & performance


mustardman
11th January 2003, 02:10
Hi all,

The latest advances in the codec have included B-frame support and QPEL. However, there is no documentation on the B-frame options, or any discussions about it here... I know what B-frames ARE (that IS elsewhere on this forum).

The default setting for B-frames is "-1". What does that mean? Every non-I-frame is a B-frame?

When using this "-1", the performance hit is extraordinarily high, an XviD normally playing about 20% CPU goes to 100% and pretty much stays there (thru FFdshow). When looking at the frame type, the frames are mostly reported as "P QPEL", with the occasional "I" as inserted according to the "I-frames" setting. No "B"s at all. I assume "P QPEL" is the same as a "B".

An XviD encoded with B-frames set to "0" plays back nicely, and most frames are "P" (occasional "I" frames).

To the crux of it all, how does the "Max B-frames" relate to their creation, what does "-1" mean in this case? And the other options, "Quantiser" and the check boxes?

Keopi, I know you are really busy, but this stuff is needed in the 'options explained' document!

Thanks,
MustardMan.

Kurosu
11th January 2003, 02:33
-1 means no B frames are used/should be used
P Qpel means that you ticked quaterpel option, and has nothing to do with B frames. Both features (B-frames and quarterpel Motion Estimation) are CPU consuming. I would consider B-frames as beta and P-frames as alpha, but none of them is in the stable tree of 0.9.

B-frames can be quantized (compressed) higher without loosing much details. Quarterpel ME brings more precision/detail. You can do a google search for a better explaination or maybe read the xvid.org forums.

Than using Bframes=-1 setting brings Qpel, and that 0 doesn't bring any is quite strange. I'll let the specialists talk and investiguate.

-h
11th January 2003, 02:34
Setting B-frames to -1 disables B-frame support. Setting it to 0 enables some B-frame functionality (header changes from memory) but doesn't actually encode any B-frames. Values above 0 enable B-frames to be encoded, with the maximum number of consecutive B-frames being limited by the number entered.

There are help items associated with each option in the codec configuration window - just hold the mouse over the text box.

If you don't understand an option, I would suggest not altering it from the defaults.

-h

Koepi
11th January 2003, 16:30
Setting bframes to 0 activates dynamic I/P/B-decision code and is more or less for debugging issues. Well, sysKin should know more about it, but it's very likely that the headers change, too ;)

Regards
Koepi

mustardman
12th January 2003, 10:19
Hi all,

Thanks for the replies... I never held the mouse over an option long enough for context help to come up! Very useful.

I had a further look at the codec (I am a user, not a developer, with nic 23-oct-2002) and couldn't see anywhere where you could select the use, or not, of QPEL estimation. Since it is not referenced anywhere, perhaps as mentioned by Kurosi, it is a bug that Bframes=-1 makes QPEL come on, and Bframes=0 makes it turn off....

I don't have any tools for checking (only FFdshow) what the frames actually are.

Perhaps a bug that the developers know of, perhaps not...

MustardMan

Koepi
12th January 2003, 10:41
mustard,

maybe you follow the link in my signature.

xvid-231002. very outdated. no qpel in there. bframes became better since then...

Just a hint.

Regards
Koepi

((( atom )))
12th January 2003, 13:23
...hold it!
bframes -1 enables qpel?!?
what about the qpel-checkbox?

someone pls explain!

Iznogoud
12th January 2003, 13:33
I guess Mustardman has older version like Koepi thinks, recent versions have checkbox for Qpel. So " Bframes=-1 makes QPEL come on" is old information if you got the checkbox.

mustardman
13th January 2003, 11:35
Thanks for setting me straight guys.

I had wanted to keep to the 'stable' builds, and I mistakenly thought that the build I was using was a stable version.

Since it was an 'unstable', I have no possible excuse for not updating to the latest - thanks Koepi for the pointer to 3-Jan-03, I regulary visit, but had been only looking for the stable version, and domestic blindness bit me!

Thanks,
MustardMan