On Fri, 15 Oct 2004, sean wrote:

> The DV-to-DVD-HOWTO in the transcode docs uses these flags for mpeg2enc:
> 
> F 8, -c -q 6 -4 2 -2 1 -K file=matrix.txt -R 2

        I think that's a lowercase 'f' instead of 'F', as in "-f 8" and
        not "-F 8".  -F is the frame rate and 8 corresponds to 60 frames/sec
        and that's one of the HDTV rates (1280x720 progressive at 60 fps).

> where matrix.txt is:
> 
> cat - > matrix.txt << MATRIX
> # High resolution INTRA table
> 8,16,18,20,24,25,26,30
> 16,16,20,23,25,26,30,30
> 18,20,22,24,26,28,29,31
> 20,21,23,24,26,28,31,31
> 21,23,24,25,28,30,30,33
> 23,24,25,28,30,30,33,36
> 24,25,26,29,29,31,34,38
> 25,26,28,29,31,34,38,42
> # TMPEGEnc NON-INTRA table
> 16,17,18,19,20,21,22,23
> 17,18,19,20,21,22,23,24
> 18,19,20,21,22,23,24,25
> 19,20,21,22,23,24,26,27
> 20,21,22,23,25,26,27,28
> 21,22,23,24,26,27,28,30
> 22,23,24,26,27,28,30,31
> 23,24,25,27,28,30,31,33
> MATRIX
> 
> How does this compare with the mpeg2enc F 8 defaults?

        The default MPEG-2 (it's not just "-f 8" but all MPEG-2 formats
        such as "-f 3") tables look like this:

/* default intra quantization matrix */
        8, 16, 19, 22, 26, 27, 29, 34,
        16, 16, 22, 24, 27, 29, 34, 37,
        19, 22, 26, 27, 29, 34, 34, 38,
        22, 22, 26, 27, 29, 34, 37, 40,
        22, 26, 27, 29, 32, 35, 40, 48,
        26, 27, 29, 32, 35, 40, 48, 58,
        26, 27, 29, 34, 38, 46, 56, 69,
        27, 29, 35, 38, 46, 56, 69, 83
const uint16_t default_nonintra_quantizer_matrix[64]
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16,
        16, 16, 16, 16, 16, 16, 16, 16

> does Steve Schultz actually use this? Faster? Better quality?

        Yes, he does.  In fact they're about all that's used and I've been 
        meaning to put the tables into mpeg2enc itself so that an external 
        file isn't required.  Just too many other things going on (and I
        don't care for wrestling with C++ ;)).

        Speed is the same since the code path is the same - just that the
        code references different quantizing tables when doing its work.

        The main reason the tables were created and the encoder extended to
        accept new tables _and_ tables from external files was to allow the
        user to tailor the bitrate.  Perhaps the TMPGEnc and Kvcd tables were 
        not quite a high enough bitrate/quality - you really can't use the
        "-H" (hi res) tables, the bitrate goes thru the roof.  So, pick
        a compromise - use part of the hi res tables but part of the other
        tables which give a lower bitrate.

        Maybe the Kvcd tables lost a little too much detail - so use the
        hi-kvcd tables, you'll gain some/most of the benefit of the kvcd
        tables but preserve (at the expense of a few more bits) more quality.

> Is there anyplace that describes the matrix?

        <mjpeg_tools>/mpeg2enc/tables.c is where the tables are defined. 

        Other than that you'll have to hit a bookstore and get a reference
        or two about video encoding and mathematics ;)

        You can find TMPGEnc's website somewhere in Japan I think - that's
        where the "tmpgenc" tables came from.  KVCD tables came from their
        website.  The 'hi-tmpgenc' and 'hi-kvcd' tables simply combined 
        the MPEG-2 high resolution tables with the TMPGEnc and Kvcd tables.

        Cheers,
        Steven Schultz



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to