Log in

View Full Version : Post XVID 1.0.0 VBV in single pass?


gatormac
15th May 2004, 15:56
Looking at GomGoms TODO list post XVID 1.0.0 VBV was at the top. In another closed thread Bonz1 stated this about VBV:

Gruel is coding it and it is already in the cvs sort of 2pass2 cvs log see also XviD mailing lists. Apparently he had a some problems with it so the current cvs version does not work properly.

I looked it over and even though I don't have a programming cell in my body this looks very promising. My question is this: is it possible to do this with a 1-pass encode? I think the 2-passes are required to analyze for the 3-second peak bitrate and also to check the curve for VBV compliancy. It would be nice if it were possible to do it in 1-pass though as filesize isn't a major concern to alot of us....and even if a noob wanted to use quality mode in AutoGK he could still be assured that it would be VBV compliant.

EDIT: Thread Title

Jvdhorst
15th May 2004, 21:21
That wouldn't be very final version werthy, would it? 2-pass encoding is still the favourite way of encoding for the best possible quality within a size constraint. And size does matter, why else would you use MPEG4? If you care less about quality and more about VBV you should use DIVX.

gatormac
15th May 2004, 23:17
Originally posted by Jvdhorst
That wouldn't be very final version werthy, would it? 2-pass encoding is still the favourite way of encoding for the best possible quality within a size constraint. And size does matter, why else would you use MPEG4? If you care less about quality and more about VBV you should use DIVX.

Where did you get the idea that I care little about quality? Encoding a 1-pass with a constant q of 2 is the highest quality you can get (unless you go for a q of 1. My point here is that it would be nice to be VBV compliant while doing a 1-pass at a constant q of 2 (or whatever setting you wanted).

And I agree, size does matter, but it is all relative to your needs. Some people want to fit a movie on 1CD at 700MB, but I don't mind that same movie being 1.5GB or even 2GB if it will be superior quality-wise. In this way we are both getting the benefit of MPEG-4. MPEG-4 isn't only about getting the smallest filesize...even at the highest quality possible my encodes are 1/3 to 1/6th the size of the source video.

So yes, it would be worthy of any version.

Jvdhorst
16th May 2004, 00:40
Was bit of a rushed reply, sorry about that. Rereading your first post I do agree with your point about AutoGK. First pass quality setting with VBV would be nice, but I would only think it to be 1.0 werthy if the step to coding it in 2-pass in a qualitatively good way would be very big. Otherwise I would say wait to release and put the complete VBV in 1.0 or just leave it totally out and cram it in ie. 1.01.

sysKin
16th May 2004, 05:00
Originally posted by gatormac
My point here is that it would be nice to be VBV compliant while doing a 1-pass at a constant q of 2 (or whatever setting you wanted). Kinda by definition, constant quantizer disables rate control of any kind. You can either get constant quantizer or VBV, but never both, because they contradict.

In theory, single-pass CBR could have VBV, but I would have no idea how to code such thing. The quality would be even worse than normal CBR so let's just forget about it...

Radek

dragongodz
16th May 2004, 05:03
some reading for those interested. :)

_http://www.img.lx.it.pt/~fp/artigos/asilomar_ver2_rev.doc

_http://www.img.lx.it.pt/~fp/artigos/vcip2001_paper3.doc

MfA
16th May 2004, 07:16
In principle you can do VBV in 1-pass just as good as you can do it in 2-pass ... but you need a lot of lookahead, buffered frames, otherwise clusters of I-frames will not get their fair share of bits. This would complicate the encoder structure. Not sure the VfW interface would be compatible with that idea either.

dragongodz
16th May 2004, 07:56
you need a lot of lookahead, buffered frames, otherwise clusters of I-frames will not get their fair share of bits
actually you can do it /MB or /frame or /GOP or whatever you like but of course quality will vary.

This would complicate the encoder structure.
and your point ?

Not sure the VfW interface would be compatible with that idea either
since you do the work in memory before outputing frames to vfw of course it is. example ? divx.

as i said, for those interested read the links i posted. :)

MfA
16th May 2004, 08:39
Originally posted by dragongodz
and your point?

It's much easier to do it in 2-pass, so if it is of limited interest to developers that is probably what you will end up with ;)

since you do the work in memory before outputing frames to vfw of course it is. example ? divx.

I dont know VfW very well, you have to output a coded frame for each input frame right? I thought that was why b-frames in AVI were so fugly. If that is true you can do no lookahead.

dragongodz
16th May 2004, 08:51
It's much easier to do it in 2-pass, so if it is of limited interest to developers that is probably what you will end up with
ye that may be true but hopefully they will do 1 pass eventually aswell.

you have to output a coded frame for each input frame right? I thought that was why b-frames in AVI were so fugly. If that is true you can do no lookahead.
as i said though you dont have to use lookahead, thats just 1 option.


edit: removed method since its not really compatible with current programs anyway. :)

MfA
16th May 2004, 09:22
Sure, but then you would have 15 dummy frames at the start of the AVI.

dragongodz
16th May 2004, 12:27
thats why i also said it can be done per MacroBlock or per frame. for 1 pass they are the only REAL options. they may not provide optimal quality but then again 2 pass is always going to be better(or at least should) for any bitrate distribution.

the point is it can be done for 1 pass aswell.

gatormac
16th May 2004, 16:34
Originally posted by sysKin
Kinda by definition, constant quantizer disables rate control of any kind. You can either get constant quantizer or VBV, but never both, because they contradict.

In theory, single-pass CBR could have VBV, but I would have no idea how to code such thing. The quality would be even worse than normal CBR so let's just forget about it...

Radek

That makes sense. Thanks Radek. I won't mind making two passes for the compliancy...just thought I'd ask :D