incomprehensibility in encoding guide
Hi, all! I've mentioned some confusing example into encoding guide, in chapter "Encoding with the libavcodec codec family" in the "Examples" section: ***** mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 ***** As you can see, mbd=2 and mbcmp=3 are used together, but according to the manual: ***** mbcmp=<0-2000> Sets the comparison function for the macroblock decision, only used if mbd=0. ***** So, mbcmp option seems to be useless into this and the following (in the guide) example. Am I right?
Hi, On 1/3/07, Andrew Savchenko <Bircoph@list.ru> wrote:
Hi, all!
I've mentioned some confusing example into encoding guide, in chapter "Encoding with the libavcodec codec family" in the "Examples" section: ***** mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 -vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 *****
As you can see, mbd=2 and mbcmp=3 are used together, but according to the manual: ***** mbcmp=<0-2000> Sets the comparison function for the macroblock decision, only used if mbd=0. ***** So, mbcmp option seems to be useless into this and the following (in the guide) example. Am I right?
Assuming that the doc is correct (maybe Loren can confirm this), then yes, I think mbcmp should be dropped. mbd=0 + mbcmp=xx yields AFAIR worse quality than mbd=2 Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
Guillaume POIRIER wrote:
Hi,
On 1/3/07, Andrew Savchenko <Bircoph@list.ru> wrote:
Hi, all!
I've mentioned some confusing example into encoding guide, in chapter "Encoding with the libavcodec codec family" in the "Examples" section: ***** mencoder dvd://1 -ofps 24000/1001 -oac copy -o Harry_Potter_2.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1
-vf pullup,softskip,crop=720:352:0:62,hqdn3d=2:1:2 *****
As you can see, mbd=2 and mbcmp=3 are used together, but according to the manual: ***** mbcmp=<0-2000> Sets the comparison function for the macroblock decision, only used if mbd=0. ***** So, mbcmp option seems to be useless into this and the following (in the guide) example. Am I right?
Assuming that the doc is correct (maybe Loren can confirm this), then yes, I think mbcmp should be dropped.
This sounds familiar. Take a look here: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2003-October/029913.html As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters. In Andrew's example from the docs, though, mbcmp indeed has no effect, since cmp and subcmp are both nonzero.
mbd=0 + mbcmp=xx yields AFAIR worse quality than mbd=2
To this part, specifically: yes. -Corey
On 3 Jan 2007 23:08 Corey Hickey wrote:
Assuming that the doc is correct (maybe Loren can confirm this), then yes, I think mbcmp should be dropped.
This sounds familiar. Take a look here: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2003-October/02 9913.html
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Hi, On 1/3/07, Andrew Savchenko <Bircoph@list.ru> wrote:
On 3 Jan 2007 23:08 Corey Hickey wrote:
Assuming that the doc is correct (maybe Loren can confirm this), then yes, I think mbcmp should be dropped.
This sounds familiar. Take a look here: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2003-October/02 9913.html
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Like this? Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
Hi, On 4 Январь 2007 01:04 Guillaume POIRIER wrote:
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Like this?
Almost, but IMHO it would be nice to mention that "When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero." or something similar. And your patch seems to be slightly redundant, affecting non-related dvdsub_id and so on.
Hi, On 1/4/07, Andrew Savchenko <Bircoph@list.ru> wrote:
Hi,
On 4 Январь 2007 01:04 Guillaume POIRIER wrote:
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Like this?
Almost, but IMHO it would be nice to mention that "When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero." or something similar.
Isn't that overly verbose? We already have: .TP .B mbd=<0\-2> Macroblock decision algorithm (high quality mode), encode each macro block in all modes and choose the best. This is slow but results in better quality and file size. . .PD 0 .RSs .IPs 0 Use comparison function given by mbcmp (default). and .TP .B mbcmp=<0\-2000> Sets the comparison function for the macroblock decision, has only an effect if mbd=0. I'm not saying that it wouldn't help getting the point across to add your suggested sentence somewhere in the docs. It just seems to be redundant, and I'm not sure which spot in the doc should carry that paragraph...
And your patch seems to be slightly redundant, affecting non-related dvdsub_id and so on.
Yeah, that's what happens when you don't read the patches you send ;) Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
Guillaume POIRIER wrote:
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Like this?
Almost, but IMHO it would be nice to mention that "When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero." or something similar.
Isn't that overly verbose?
Actually, it might not be verbose enough to be to precise. This isn't any more fun to read, but should match the actual behavior: "When mbd is set to 1 or 2, the value of mbcmp is ignored when comparing macroblocks. If any comparison setting (precmp, subcmp, cmp, or mbcmp) is nonzero, however, a slower but better half-pel motion search will be used, regardless of what mbd is set to. If qpel is set, quarter-pel motion search will be used regardless." If someone wants to make the slower but better half-pel motion search a separate option, instead, that might be less complicated. -Corey
Hi, On 1/4/07, Corey Hickey <bugfood-ml@fatooh.org> wrote:
Guillaume POIRIER wrote:
Almost, but IMHO it would be nice to mention that "When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero." or something similar.
Isn't that overly verbose?
Actually, it might not be verbose enough to be to precise. This isn't any more fun to read, but should match the actual behavior:
"When mbd is set to 1 or 2, the value of mbcmp is ignored when comparing macroblocks. If any comparison setting (precmp, subcmp, cmp, or mbcmp) is nonzero, however, a slower but better half-pel motion search will be used, regardless of what mbd is set to. If qpel is set, quarter-pel motion search will be used regardless."
If someone wants to make the slower but better half-pel motion search a separate option, instead, that might be less complicated.
I vote for the 2nd solution. An ordinary person will never understand current behaviour. I'm not even quite sure if _I_ get how things currently work in fact, and I'm really trying. Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
On 4 Jan 2007 23:41 Corey Hickey wrote:
Guillaume POIRIER wrote:
As far as I can tell from the code and a couple quick tests, the situation with mbd and mbcmp is still the same: when all other *cmp options are 0 (the default), making mbcmp nonzero will have a beneficial effect on quality regardless of what mbd is set to. When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero. When mbd is 0, the specific value of mbcmp matters.
So, maybe manpage should be updated to clarify this?
Like this?
Almost, but IMHO it would be nice to mention that "When mbd is set to 1 or 2, the specific value of mbcmp is ignored, except to check whether it is nonzero." or something similar.
Isn't that overly verbose?
Actually, it might not be verbose enough to be to precise. This isn't any more fun to read, but should match the actual behavior:
"When mbd is set to 1 or 2, the value of mbcmp is ignored when comparing macroblocks. If any comparison setting (precmp, subcmp, cmp, or mbcmp) is nonzero, however, a slower but better half-pel motion search will be used, regardless of what mbd is set to. If qpel is set, quarter-pel motion search will be used regardless."
I'm OK with the last variant.
Hi, On 1/4/07, Corey Hickey <bugfood-ml@fatooh.org> wrote: [..]
Actually, it might not be verbose enough to be to precise. This isn't any more fun to read, but should match the actual behavior:
"When mbd is set to 1 or 2, the value of mbcmp is ignored when comparing macroblocks. If any comparison setting (precmp, subcmp, cmp, or mbcmp) is nonzero, however, a slower but better half-pel motion search will be used, regardless of what mbd is set to. If qpel is set, quarter-pel motion search will be used regardless."
If someone wants to make the slower but better half-pel motion search a separate option, instead, that might be less complicated.
Attached patch provides the man and xml doc update. I didn't know where to put Corey's paragraph, so I put it in mbd's section, but if you think it should be better put elsewhere, please speak up, I'm all hears. Please re-read, give feedback and stuff like that. I intend to merge that patch soon. Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html
On Sun, Jan 07, 2007 at 12:28:57AM +0100, Guillaume POIRIER wrote:
Attached patch provides the man and xml doc update.
Looks good to me. Diego
participants (5)
-
Andrew Savchenko -
Corey Hickey -
Diego Biurrun -
Guillaume POIRIER -
Guillaume POIRIER