On 6 Nov 2004, scott wrote: > I doing this little mod to y4mshift to try and correct some vertical > shaking in recording from a VCR and I have got to the point where I now
You may want to look at 'y4mstabilizer' (in the CVS version of mjpegtools) - perhaps it will do some of what you want. > I think I understand that 4:2:0 has (for each square of 4 pixels) 4 Y > values, 1 U, and 1 V value. But what happens in the uchar **yuv arrays > for interlaced material. I presume that the first row of U/V values 4:2:0 is, as you noticed, subsampled in BOTH the horizontal _and_ vertical dimensions. > Is that correct and if so are there any algorithms in the library to > handle shifting by numbers that are not a factor of 4? Not if you're doing the processing in 4:2:0 - two fields x the vertical subsampling factor of 2 = 4. What you can do is supersample the data up to 4:2:2 or even 4:4:4, perform whatever manipulations you want, and then subsample back to 4:2:0 y4mscaler can do that for you with the option "-O chromass=422" or "-O chromass=444". Then to convert back to 420 before going into the encoder you'd use "-O chromass=420_mpeg2" The other thing which may make life simpler is to deinterlace the material with 'yuvdeinterlace'. Deinterlaced supersampled (to 4:4:4) data may be the simplest/easiest form to work with for stabilization purposes. Cheers, Steven Schultz ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users