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

Jonathan Rogers jonner at teegra.net
Tue Jul 29 19:35:56 CEST 2003


D Richard Felker III wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> 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.

Have your perfect eyes been able to detect it, or is this all 
just a thought experiment? As you've mentioned, this is lossy 
encoding, so perfect results are not attainable anyway. I've 
almost always scaled the frames as well as cropping, so I may not 
have seen the problems that result from just cropping.

You know much more about MPlayer than I do and you may be right 
about cropping to an odd dimension, though I've tried it and not 
been able to observe any problems. I'm genuinely curious whether 
it's just a guess or whether it's based on direct knowledge or 
experience.

Jonathan Rogers



More information about the MPlayer-users mailing list