[MPlayer-users] Color problems with video

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Nov 23 20:06:56 CET 2011

On Wed, Nov 23, 2011 at 08:12:43AM -0700, Deron Kazmaier wrote:
> On 11/22/11 12:08 PM, Reimar Döffinger wrote:
> >On Mon, Nov 21, 2011 at 06:16:24PM -0700, Deron Kazmaier wrote:
> >>testing further, I found out that it is a strange mix of scale and
> >>expand that causes this.
> >Actually it is just expand.
> >The way expand works it can't handle one-plane YUV formats where
> >the x offset to center them would be odd.
> >Reproducible with any file if you use something like this:
> >-vf expand=500:0:1,format=uyvy,scale
> >(500 must be replaced with some value>  video width).
> I take it from the way you wrote your reply that the problem is
> known and won't be fixed.

Really, what part gave you that impression? I wrote it while testing
the fix, which is in SVN (though at the cost that the image will be
off-center by 1 pixel).

> If so, could an error message be output
> when this occurs?

This is implemented, too.

> I only stumbled onto this because I used scale
> -3:720 which gave me the odd width. Could that be changed to always
> give even results?

I think your analysis is wrong. The problem is not with odd width,
it is when (expanded width - original/scaled width) mod 4 = 2 or = 3.
Scale already rounds the size to a multiple of 2 for those formats.
However you can use -11 as scale argument to make it round to a multiple
of 16, which is overkill and might look a bit ugly but will avoid this
issue, too, without updating to SVN.

More information about the MPlayer-users mailing list