Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] libvo: implement fs-borders.

Le septidi 17 pluviôse, an CCXXIII, Reimar Döffinger a écrit :
> Which way did you try this?

Maybe I was not clear enough: regarding the panscan / rotation / borders
computations, a lot of arithmetic is duplicated between VOs, with some
partial sharing (see calc_src_dst_rects()), but very little.

As a result, rarely used features are frequently broken in some VOs,
especially together in combination. I am referring to panscan, especially
negative panscan, setting border align, using rotated monitor, etc.

I was trying to unify that, but there are too many special cases, I was not
seeing the end of it. I have committed it in a local branch, I may work on
it again sometime.

> I would have assumed that a combination of panscan and border_pos would
> have this effect...

It can, and I have been using that for about a month, but it has a lot of

* it requires a trivial patch to enable large negative values for panscan;

* it requires tricky arithmetic to find the correct panscan value, and it
  depends on the video aspect ratio;

* it only works for the video and EODS, but OSD ended up on the ceiling.

> In fact, wouldn't (ignoring division by 0, rounding etc.
> vo_border_pos_x = vo_fs_border_l / (vo_fs_border_l + vo_fs_border_r)
> vo_border_pos_y = vo_fs_border_t / (vo_fs_border_t + vo_fs_border_b)
> and
> *w -= vo_fs_border_l + vo_fs_border_r;
> *h -= vo_fs_border_t + vo_fs_border_b
> in get_max_dims (aspect.c)
> have the desired effect?

No, that would not work: a lot of VOs, including vo_gl, use vo_dwidth and
vo_dheight directly to do their coordinates conversions, so the borders must
be subtracted from these variables, or all the corresponding code needs to
be updated and retested.

That was one of the reasons I was trying to refactor the code: getting rid
of some global variables and rather use function arguments (in structures).

Also, it only affects the video, not the OSD.


  Nicolas George

Attachment: signature.asc
Description: Digital signature

MPlayer-dev-eng mailing list