[MPlayer-dev-eng] [PATCH] CQMs in x264

Robert Swain robert.swain at gmail.com
Wed Jul 27 03:17:33 CEST 2005


On 7/27/05, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, Jul 26, 2005 at 07:46:20PM +0100, Robert Swain wrote:
> > +.B cqm=<jvt|flat|<filename>>
> > +Uses either a predefined custom quantization matrix or loads a JM format
> > +matrix file. (default: not used)
> 
> The note in parentheses is redundant.

OK

> > +.IPs jvt\
> 
> You're not forcing a linebreak here, you need to pad one more character.
> 
> > +.B cqm4iy=<list>
> > +Custom 4x4 intra luminance matrix. A list of 16 comma separated values.
> 
> Capitalization is funky here, try
> 
>   custom 4x4 intra luminance matrix (list of 16 comma separated values)

Guillaume helped with these issues already, so please see what you
think of the docs in this patch.

> What those values are is still a mystery.

They are values between 1 and 255. The coefficients of these matrices
are used for the quantisation stage of h.264 encoding. I guess if you
don't know what that is or don't use h.264 codecs then it won't really
matter if you don't know. :) They're exactly the same concept as
custom quantisation matrices for MPEG-4 ASP (XviD, etc) codecs.

> Whoever came up with these cleverly inconsistent option names (i vs y vs
> p) should enter some sort of obfuscation contest...

It's perfectly consistent. Breaking it down into sections:
1) cqm - means custom quantisation matrix
2) 4 or 8 - mean the matrix is either 4x4 or 8x8 respectively, hence
16 or 64 values are required
3) i or p - mean the matrix is intended for intra or inter blocks respectively.
4) y or c - mean the matrix is intended for luminance or chrominance
blocks respectively. That is Y, or U/V. x264 uses the same matrix for
both U and V as far as I can see but it is possible in the
specification to use two different matrices. Also note that for the
8x8 matrix size there are no chrominance matrices. This is because of
the h.264 high profile specification.

> > +.RE
> > +.I NOTES:
> 
> .RE ends, not starts, first level suboptions.

Well this is what I read:

".RE [nnn]
 	This macro moves the left margin back to level nnn; if no argument
is given, it moves one level back. The first level (i.e., no call to
RS yet) has number 1, and each call to RS increases the level by 1."

I wanted it to move back one level such that the notes apply to the
lists and the cqm=blah stuff.

Thank you for all your comments and assistance by the way Diego.

To everyone: I'm sure revision 9 was working on all fronts
implementation-wise, with valid arguments given. However, I haven't
changed anything significant between then and now with regard to the
cqm=blah code and yet it no longer works. Can you see anything in
lines 131-157 of the attached patch to suggest why cqm=flat / cqm=jvt
/ cqm=matrix.cfg should cause mencoder to crash?

Kind regards,
Robert Swain (superdump)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer.x264.cqm.13.diff
Type: application/octet-stream
Size: 6977 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050727/b8ca55af/attachment.obj>


More information about the MPlayer-dev-eng mailing list