Here's is my 5 cents on various aspects of this thread:


 >From: Selva Nair <[EMAIL PROTECTED]>
 ...
 >The general advice is to avoid vertical scaling mainly because vertical
 >scalers should be interlacing-aware -- also for interlaced frames the
 >vertical samples per field is only half as much. For progressive frames it

I second that emotion.


 >From: "Steven M. Schultz" <[EMAIL PROTECTED]>
 ...
 >      What I'm doing so far is:
 >
 >(generate 720x540 PPM frames) | ppmtoy4m -F 30000:1001 | \
 >y4mscaler -O size-720x480 -S option=sinc8lan -O chromass=420_MPEG2 | \
 >mpeg2enc -f 8 -o intro.m2v

Try to just use the "-O preset=DVD" option instead of all the other -O
 options you have there.  This will additionally set the correct output SAR,
 and then y4mscaler should automagically pad the output as necessary.

 ...
 >      I tried simply adding "-L" to the ppmtoy4m line and the results were
 >      quite blurry.   Can the data be "interlaced" after generation, does
 >      that even make sense, or does it need to be created that way?   

I'm not sure why the results were so blurry --- but, if you were doing
 vertical scaling on an interlaced frame, then each 'field' is scaled 
 independently.  As Selva pointed out above, each field effectively has
 only half the vertical resolution of the full frame to begin with.


 >From: Selva Nair <[EMAIL PROTECTED]>
 ...
 >> > I would use -S 420_mpeg2 at the ppmtoy4m stage instead of 
 >> > resampling by y4mscaler as above. 
 >> 
 >>     Why?  I have to rescale from 720x540 to 720x480 which means going
 >>     thru y4mscaler.  Seemed logical to have it do the chroma conversion
 >>     at the same time.
 >
 >You have the full 444 chroma info at the ppm stage so isn't it  best 
 >to subsample it directly to 420_mpeg2 from the ppm? Otherwise you go 
 >through 444 -> 420_jpeg -> 420_mpeg2 -- looks more lossy to me.

 a)  A 420_jpeg -> 420_mpeg2 conversion requires interpolation in the
     chroma planes: for progressive material, only horizontal interpolation;
     for interlaced, both horizontal and vertical interpolation.

 b)  If you're scaling in some direction, interpolation comes for free; 
     otherwise, it is an extra filtering pass.  (I don't know which would
     be more visible:  the subpixel shift of the chroma planes if you 
     skipped the conversion altogether, or the slight blurring/ringing
     in the chroma planes that the conversion will introduce.)

 c)  Since 720x540 -> 720x480 scaling is vertical only, then starting with
     420_mpeg2 material will avoid the extra horizontal interpolation step.
 
 d)  I just checked and discovered that ppmtoy4m does *not* quite do the
     correct subsampling when generating *interlaced* 420_mpeg2 output.
     (It's a half-pixel vertical shift in chroma; I'll fix that.)

 e)  Conclusion:  Overall, you are better off generating 420_mpeg2 from
     the get-go.  (Definitely for progressive; it's a toss-up for interlaced,
     leaning toward "just generate it that way", until ppmtoy4m is tightened
     up.)

-matt m.


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to