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

Nicolas George george at nsup.org
Thu Feb 5 23:29:33 CET 2015


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
drawbacks:

* 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.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20150205/4d91cfd6/attachment.asc>


More information about the MPlayer-dev-eng mailing list