[MPlayer-users] Re: mencoder/crop => image distortion

D Richard Felker III dalias at aerifal.cx
Tue Jul 29 17:01:09 CEST 2003


On Tue, Jul 29, 2003 at 03:45:08AM -0500, Jonathan Rogers wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> D Richard Felker III wrote:
> >Lines come in pairs (because of the way chroma works, so I would
> >always use crop sizes and offsets that are even numbers. Otherwise you
> >could seriously misalign or distort the color.
> 
> Isn't it the job of the scaler to deal with that? I've cropped to 

No. No scaling takes place if you just crop. And if you crop with an
odd offset, you WILL shift the chroma plane by one luma pixel (half a
chroma pixel). It may not be terribly noticable, but it will look bad
if you look close, and it *may* hurt compression since motion in the
chroma planes won't quite line up with luma.

Note that this can be fixed by using the swscaler to shift the chroma
planes, but it's better not to mess them up to begin with!

> odd dimensions several times with no problems. It's easy to test 
> too: just play the movie with the desired crop (and scale if you 
> want). If the color is distorted, something broke. If not, 
> there's no reason to think encoding would do any worse.

Maybe your eyes were just lazy and didn't notice.

Rich



More information about the MPlayer-users mailing list