>> I'd like to ask a little question. When transcoding with: >> >> transcode -i source.mpg -o /dev/null -m audio -y xvid4,null -w 1930 \ >> -b 128,0,0 --export_par 9216,4896 --progress_rate 20 -R 1,xvid4.log \ >> -c 14145-159874 -j 2,3,0,3 -J pp=ci >> >> where I suppose only '-y xvid4,null' and '-j 2,3,0,3' are really >> relevant to the question, I get (with transcode CVS from today): >> >> [transcode] warning: left/right clip must be even in YUV/YUV422 mode >> [transcode] warning: left/right clip must be even in YUV/YUV422 mode >> >> I'm wondering: the clipping may be odd on the left or on the right, but >> if the resulting image *width* and *height* are both even, it should be >> OK, no?
Actually, it's not. The reason is that if you try to clip an odd number of pixels from the left or right, then you end up trying to split a U/V pixel in half. (I don't know how familiar you are with YUV mode, but the basic theory is that human eyes are less sensitive to color changes than to brightness, so most current video codecs use half the horizontal resolution for blue and red data [U and V] as they do for brightness [Y]; hence you have one color pixel for every two brightness pixels in a row.) Even if the final width is even, the resulting frame will have the color data shifted one pixel horizontally, so every second pixel will have a different color than it did originally. For example, if you try to clip 3 pixels off the left edge of an image: Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 ... Y3 Y4 Y5 Y6 Y7 Y8 ... U0 U0 U1 U1 U2 U2 U3 U3 U4 ... becomes U1 U1 U2 U2 U3 U3 ... V0 V0 V1 V1 V2 V2 V3 V3 V4 ... V1 V1 V2 V2 V3 V3 ... (Note how pixels Y4, Y6, and Y8 have changed color.) Depending on your input video, of course, this may not make a difference, but you should be aware of the possibility of degradation if you use odd clipping values. --Andrew Church [EMAIL PROTECTED] http://achurch.org/