Err, between this:

 >From: Jonathan Black <[EMAIL PROTECTED]>
 >Date: Wed, 19 Jan 2005 21:17:08 +0100
 >
 >On Wed, Jan 19, 2005 at 10:02:45AM -0800, Steven Boswell II wrote:
 >> Right before I call yuvkineco, I call yuvcorrect to
 >> change bottom-field-interlacing to
 >> top-field-interlacing.  yuvkineco needs
 >> top-field-interlaced vidoe for some reason; that can
 >> probably be fixed.  yuvkineco puts out a
 >> progressive-frame stream, though, so before the video
 >> gets sent to mpeg2enc, I pipe it through another
 >> yuvcorrect that changes the stream header back to
 >> top-field-interlaced.
 >
 >What's wrong with feeding mpeg2enc the stream of progressive frames? I
 >would think that is exactly what you want to do, with 24fps film
 >material.

 and this:

 >From: "Steven M. Schultz" <[EMAIL PROTECTED]>
 >Date: Wed, 19 Jan 2005 13:23:56 -0800 (PST)
 ...
 >      You can feed mpeg2enc a progressive stream and it will do The
 >      Right Thing.  Basically the progressive frame gets split into two
 >      "fields" and the flag in the MPEG2 header turned on that says 
 >      both fields came from the same point in time.
 >
 >      The usual reference:
 >
 >          http://www.dvddemystified.com/dvdfaq.html#3.4
 >
 >      "MPEG-2 progressive_sequence is not allowed, but interlaced sequences 
 >      can contain progressive pictures and progressive macroblocks."

 several people have several things half-correct, making the totality
 lean toward the wrong side.  Starting with the second part:

 o Yes, MPEG-2 has two types of "sequence", progressive and not.
     Progressive sequences can only contain progressive frames; the
     non-progressive sequences can contain mixtures of progressive and
     interlaced frames.  
   Progressive frames in non-progressive sequences are not 'split'
     during encoding; they are treated as whole frames (e.g. the chroma
     subsampling is taken to be across the whole frame, motion estimation
     is performed across the entire frame).
   However, at the *decoder*:  progressive sequences are expected to be
     'presented' as a series of frames, non-progressive sequences as a
     series of fields.  That's where the splitting (and replication, in
     the case of 3:2-pulldown-tagged material) occurs.

Now, the first part:

 o With 4:2:0 material, you can't just re-label a stream from
    "top-field-first" to "progressive" or vice-versa:  that will
    screw up the chroma planes.

   The chroma planes are subsampled vertically, either across each
    individual field (for interlaced streams) or the entire frame
    (for progressive streams).  When you change the tag, you also
    have to resample the chroma, or it will get muddled by the next
    device/program that tries touches it.

   That said,

    (a) Changing tags with 'yuvcorrect' is a bad idea, *unless* you
         are using it to correct a tag that is truly incorrect (hence
         the name of the program).

    (b) I don't remember (and I don't remember if I ever looked into it)
         if yuvkineco is doing to right thing or not.  If it is reading
         an interlaced 4:2:0 stream and producing a progressive 4:2:0
         stream, then it *should* be resampling the chroma.
        If not, then what it is actually producing is a stream with
         progressive _temporal_ properties (both fields at same time) but
         interlaced _spatial_ properties (fields subsampled separately).

        The new YUV4MPEG2 'mixed-mode' tags can actually encode this
         state (loosely termed an 'anomalous mixed-mode stream') and
         the latest y4mscaler can fix it (by vertically upsampling
         the chroma).  But these tags aren't used anywhere else yet.

    (c) All that said, yes, mpeg2enc will do the right thing given a
         stream properly tagged as progressive, top-first, or bottom-first;
         and, all three can be handled while still producing a non-progressive
         sequence usable for DVD or SVCD.
        mpeg2enc does not yet handle 'mixed-mode' streams, though, but
         nothing actually produces them yet, either.

-matt m.



   


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to