[MPlayer-dev-eng] [PATCH] factor out panscan etc. calculation from xv, xvmc and direct3d

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 12 11:26:33 CET 2009


On Wed, Feb 11, 2009 at 11:30:49PM +0200, Ivan Kalvachev wrote:
> However why are you using 2d array when the rectangles
> are actually never used in loop?

Because we already have so may types for the same crap, the Windows
RECT, the VPDPAU VdpRect and probably a few more.
Also it's straight-forward to pass on to the src_dst_split_scaling
function.

> It's much simpler to use struct with some meaningful names.
> It may even make code smaller.
> Alll the [0][0][1][0][0][1][1][1] are just making all the code look
> really funny.

What do you suggest?
left/right/top/bottom
x0/x1/y0/y1

Mean two more arguments to src_dst_split_scaling. The first is probably
most readable, I just don't like the verbosity much.

x[0]/x[1]/y[0]/y[1]

Seems ugly, too.

> About xvmc cropping, mpi have unused x,y,w,h parameters.

Maybe, but I'd love if a normal -vf crop would just work as usual, and
that would at least require a way to detect if cropping is supported by
the vo.



More information about the MPlayer-dev-eng mailing list