[PATCH] (mencoder) lavc option "notch_matrix"
Hi, Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix) So you can use: mencoder -voc lavc -lavcops notch_matrix instead of: mencoder -voc lavc -lavcops intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44
David Möller writes:
Included is a patch to add the lavc (encoding) option "notch_matrix".
Please also add the option to the man page. Thanks Diego
Hi,
Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix)
So you can use: mencoder -voc lavc -lavcops notch_matrix The main problem of this is that it's not free...and it's license is not compatible with the GPL, so we aren't allowed to include, that's why I've settled to the way below. (see http://kvcd.net/, if anyone who understands GPL and law better, please have a look at it, if it's legal to include with GPL, I1m not against it)
Maybe this patch chould be added to the contributed section. -- Alex Beregszaszi <alex@fsn.hu> (MPlayer Core Developer -- http://www.mplayerhq.hu/)
On Friday 17 October 2003 10:24, Alex Beregszaszi wrote:
Hi,
Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix)
So you can use: mencoder -voc lavc -lavcops notch_matrix
The main problem of this is that it's not free...and it's license is not compatible with the GPL, so we aren't allowed to include, that's why I've settled to the way below. (see http://kvcd.net/, if anyone who understands GPL and law better, please have a look at it, if it's legal to include with GPL, I1m not against it)
Maybe this patch chould be added to the contributed section. Hi!
So what do you think about the possibility of having presets loadable with for example -lavcopts preset=notch these presets need not be in the sourcecode but may be stored in files in external files and thus could solve the problem with the license. Matthias
On Fri, Oct 17, 2003 at 10:24:02AM +0200, Alex Beregszaszi wrote:
Hi,
Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix)
So you can use: mencoder -voc lavc -lavcops notch_matrix The main problem of this is that it's not free...and it's license is not compatible with the GPL, so we aren't allowed to include, that's why I've settled to the way below. (see http://kvcd.net/, if anyone who understands GPL and law better, please have a look at it, if it's legal to include with GPL, I1m not against it)
IMO this is nonsense. Coefficients needed for encoding are not themselves copyrightable; only the actual publication in which they originally appeared is under copyright. Rich
D Richard Felker III writes:
On Fri, Oct 17, 2003 at 10:24:02AM +0200, Alex Beregszaszi wrote:
Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix)
So you can use: mencoder -voc lavc -lavcops notch_matrix The main problem of this is that it's not free...and it's license is not compatible with the GPL, so we aren't allowed to include, that's why I've settled to the way below. (see http://kvcd.net/, if anyone who understands GPL and law better, please have a look at it, if it's legal to include with GPL, I1m not against it)
IMO this is nonsense. Coefficients needed for encoding are not themselves copyrightable; only the actual publication in which they originally appeared is under copyright.
I'm also very doubtful of the illegality of including this. On their homepage http://www.kvcd.org/portal/articles.php?lng=en&pg=20 it says The KVCD "Notch" Quantization Matrix is Copyright (c) 2002, 2003 of Softronex Corporation. Please contact us for commercial use. GPL is not commercial use, is it? How you can restrict reusing of a matrix that you publish on your homepage is beyond me. I doubt it is possible, it's less than 20 lines, but IANAL. Diego
Hi On Sunday 19 October 2003 20:00, Diego Biurrun wrote:
D Richard Felker III writes:
On Fri, Oct 17, 2003 at 10:24:02AM +0200, Alex Beregszaszi wrote:
Included is a patch to add the lavc (encoding) option "notch_matrix". (The KVCD "Notch" Quantization Matrix)
So you can use: mencoder -voc lavc -lavcops notch_matrix
The main problem of this is that it's not free...and it's license is not compatible with the GPL, so we aren't allowed to include, that's why I've settled to the way below. (see http://kvcd.net/, if anyone who understands GPL and law better, please have a look at it, if it's legal to include with GPL, I1m not against it)
IMO this is nonsense. Coefficients needed for encoding are not themselves copyrightable; only the actual publication in which they originally appeared is under copyright.
I'm also very doubtful of the illegality of including this.
On their homepage
http://www.kvcd.org/portal/articles.php?lng=en&pg=20
it says
The KVCD "Notch" Quantization Matrix is Copyright (c) 2002, 2003 of Softronex Corporation. Please contact us for commercial use.
GPL is not commercial use, is it? How you can restrict reusing of a matrix that you publish on your homepage is beyond me. I doubt it is possible, it's less than 20 lines, but IANAL. additionally the matrix is included in all encoded files so they would also fall under this copyjoke
btw, does anyone know why this matrix is supposed to be better then the default? did anyone do any tests? PSNR?, double blind subjective? and yes, IMHO its not copyrightable as its the only possible matrix to decode the resulting files, IIRC there was some case where some court decided that cases where there exists just one possible solution, this solution cannot be copyrighted, but IANAL!!! [...] -- Michael level[i]= get_vlc(); i+=get_vlc(); (violates patent EP0266049) median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates patent #5,905,535) buf[i]= qp - buf[i-1]; (violates patent #?) for more examples, see http://mplayerhq.hu/~michael/patent.html stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en
On Sun, 19 Oct 2003, Michael Niedermayer wrote:
On their homepage
http://www.kvcd.org/portal/articles.php?lng=en&pg=20
it says
The KVCD "Notch" Quantization Matrix is Copyright (c) 2002, 2003 of Softronex Corporation. Please contact us for commercial use.
They have changed the page then from what it was a couple months ago. It used to say something to the effect that you could use the tables as long as the program was "labeled" as using them - i.e. a notice when running the encoder that "using the KVCD quantization matrices" or similar.
btw, does anyone know why this matrix is supposed to be better then the default? did anyone do any tests? PSNR?, double blind subjective?
Comparing the tables they give to the default MPEG-2 tables it looks like the high frequencies are quantized very differently. "Roll off" isn't the right term but that's what comes to mind. I've used the Kvcd tables as well as the TMPGEnc tables in mpeg2enc (mpeg2 encoder from mjpegtools). Not double blind testing but the resulting video was fine to me (not having golden eyeballs, using an older TV set, etc ;)). The difference in bitrate was a big surprise. Using "-K kvcd" with mpeg2enc the average reduction in bitrate (as reported by mplex) was 20% (depends on the -q or quality setting - sometimes the savings was closer to 12%, other times 25%). The TMPGEnc tables split the difference between the default and Kvcd tables - usually around 10-15% savings over the default tables. Much depends of course on the source of the material being encoded. The claim that the Kvcd tables reduce the "splotches" during dark scenes is true - the dimly lit scenes do look better when using the Kvcd tables. Cheers, Steven Schultz
Hi On Sunday 19 October 2003 21:04, Steven M. Schultz wrote: [...]
btw, does anyone know why this matrix is supposed to be better then the default? did anyone do any tests? PSNR?, double blind subjective?
Comparing the tables they give to the default MPEG-2 tables it looks like the high frequencies are quantized very differently. "Roll off" isn't the right term but that's what comes to mind.
I've used the Kvcd tables as well as the TMPGEnc tables in mpeg2enc (mpeg2 encoder from mjpegtools). Not double blind testing but the resulting video was fine to me (not having golden eyeballs, using an older TV set, etc ;)).
The difference in bitrate was a big surprise. Using "-K kvcd" with mpeg2enc the average reduction in bitrate (as reported by mplex) was 20% (depends on the -q or quality setting - sometimes the savings was closer to 12%, other times 25%). The TMPGEnc tables split the difference between the default and Kvcd tables - usually around 10-15% savings over the default tables. Much depends of course on the source of the material being encoded. yes, but thats meaningless, i mean just use 99 or 255 for all enries, dunno which is tha largest which doesnt overflow, and u get a nice reduction of bitrate at the same q but the quality will also suffer seriously
[...] -- Michael level[i]= get_vlc(); i+=get_vlc(); (violates patent EP0266049) median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates patent #5,905,535) buf[i]= qp - buf[i-1]; (violates patent #?) for more examples, see http://mplayerhq.hu/~michael/patent.html stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en
Steven M. Schultz writes:
On Sun, 19 Oct 2003, Michael Niedermayer wrote:
On their homepage
http://www.kvcd.org/portal/articles.php?lng=en&pg=20
it says
The KVCD "Notch" Quantization Matrix is Copyright (c) 2002, 2003 of Softronex Corporation. Please contact us for commercial use.
They have changed the page then from what it was a couple months ago. It used to say something to the effect that you could use the tables as long as the program was "labeled" as using them - i.e. a notice when running the encoder that "using the KVCD quantization matrices" or similar.
Do you have a copy of the matrix from back then? Then please post the free version here and we will be rid of this problem. This is a charade, but this should put us on the safe side anyway. Diego
On Sun, 19 Oct 2003, Diego Biurrun wrote:
Do you have a copy of the matrix from back then? Then please post the free version here and we will be rid of this problem.
Yes, I do. I made the mods to mpeg2enc to add both the kvcd and tmpgenc tables. The numbers in the attachment are identical (if I did not make any typographic errors) to the ones currently on their website. Attached are the matrices extracted from mjpegtools mpeg2enc My observation was that the biggest change was in the B frame size (when doing mpeg2 encoding), the I frame grew a few percent but the B frames dropped considerable. Visually I couldn't see the difference so I've been using the kvcd or tmpgenc tables rather than the default for my encodings.
This is a charade, but this should put us on the safe side anyway.
Yes, it is. Sigh Happy Reading ;) Steven Schultz
"Diego" == Diego Biurrun <diego@biurrun.de> writes:
GPL is not commercial use, is it? How you can restrict reusing of a matrix that you publish on your homepage is beyond me. I doubt it is possible, it's less than 20 lines, but IANAL.
As long as you publish GPLed source code, commercial use is allowed. §6 of the GPL states: You may not impose any further restrictions on the recipients' exercise of the rights granted herein. The copyright of the matrix is thus clearly violating the GPL, as it restricts the use to non-commercial applications only. But as you say, it's not clear whether a matrix of numbers could be copyrighted at all. Hmm. At least under US-law everything seems possible. David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
participants (8)
-
Alex Beregszaszi -
D Richard Felker III -
David Kuehling -
David Möller -
Diego Biurrun -
Matthias Schwarzott -
Michael Niedermayer -
Steven M. Schultz