[MPlayer-dev-eng] [PATCH] blackbar osd option + vo svga, vo_dgaNOVIRUS
Ivan Kalvachev
ivan at cacad.com
Sat Sep 20 01:41:32 CEST 2003
Dimitar Zhekov said:
> A> why are you keep adding such hacks, insteda of rtfm'ing
> A> about -vf expand ???
>
> GSB> - would be easier to have one single flag to that.
> GSB> -vf scale=800:-3,expand=800:600 isn't so friendly...
>
> -vf scale... I use svga/dga primary to _avoid_ any movie
> scaling, that's always a quality+cputime loss. And without
> scale, you'd better know the best monitor resolution to
> pass to -vf expand; even expand with negative values may
> result in a higher resolution mode than needed for the
> movie. So I don't wont to run each movie _twice_ to 1) see
> the best monitor mode and 2) specify it to -vf expand.
>
> Now in theory it might be possible to implement bbosd as
> an expand filter after vo config has been performed, but
> with such a late movie size change Bad Things Will Happen.
>
> Even if mplayer is somehow(?!) "fixed" to work this way,
> there will still be an unneeded slowdown if both vf expand
> and bbosd expand are used, while with this patch they work
> together nicely, with bbosd clearing the areas (if any)
> outside the expanded area.
>
> If you have don't have a better suggestion but still
> reject the patch, I hope you won't be against including it
> in the ROCK-Linux MPlayer package, so the 1st extended
> (instead of crippled) mplayer may see the daylight, or
> whatever all good programs see when being run.
If you want to reject your patch then here it goes why:
> --- libvo/vo_svga.c 2 Apr 2003 04:31:40 -0000 1.68
> +++ libvo/vo_svga.c 17 Sep 2003 07:06:25 -0000
> @@ -248,7 +248,7 @@
> if (mode_capabilities & CAP_LINEAR){
> if(verbose > 2)
> printf("vo_svga: clearing box %d,%d - %d,%d with
memset\n",x,y,w,h);
> - rgbplane=PageStore[0].vbase + (y*mode_stride) +
(x*modeinfo->bytesperpixel)
;
> + rgbplane=PageStore[cpage].vbase + (y*mode_stride)
+(x*modeinfo->bytesperpixel);
This part is from svga_clear_box, cpage is the current page, but cpage is
updated on draw_image. This means that cpage is undefine on config() time,
and this function is used to clear all pages by config. The solution is to
zero cpage, or use yoffset to call svga_clear_box with.
The second problem is here:
> + svga_clear_box(0, 0, modeinfo->width, y_pos);
> + svga_clear_box(0, modeinfo->height - y_pos, modeinfo->width,
y_pos);
> + svga_clear_box(0, y_pos, x_pos, modeinfo->height - y_pos);
> + svga_clear_box(modeinfo->width - x_pos, y_pos, x_pos,
modeinfo->height - y_
pos);
The height and width of clear box are not calculated correctly. While
height of top and bottom bars are equal (or differ with one), this is not
true for the x_pos, that is rounded by factor 16. This could leave visible
part of subtitles (e.g. seek bar) or make some part of the image to
flicker.
I must say that i had fixed these issue, and there is no need to resend
fixed patches.
I see that the core developers prefer to reject your patch in favior of
vf_expand. But
I will incorporate this ability in the svga anyway.
ATM i'm trying to make an smart OSD removal like the (possible) one in
xvmc. It uses vo_remove_text(), but i run into problems with it.
In few words, it doesn;t work with 2 buffers. I had to remove the
subtitles in the old buffer, and then to render in the new one. The
problem is that the old buffer is visible, and this produse visible
flickering in all cases (so -double and -vsync doesn't help anymore)
I will also remove the separate page code in svga, as i had forgot how
does it work and i couldn't understand that from the souce, and there is
already better one in G2
>
> A> with a vo driver supporting DR (get_image()) it will
> A> have the same speed
but DR is disabled by default, as with some codecs, it
draws osd into the internal buffers. Should i remind that
this is fixed (i hope) in G2, but not in G1?
>
> Actually bbosd/expand always have the same speed for me,
> except when expand doesn't work (that's faster :-)
>
> IK> I can tell you that there is special function that
> IK> clears subtitles (rectangulars) when needed. I used
> IK> it in xvmc, you can take a look there.
>
>>From what I see, xvmc uses XvMC*Subpicture() calls, which
> are X11 only and non-DGA. vf_expand.c:remove_func() does
> this, but it's for internal use by vf expand only.
libvo/sub.c::vo_remove_text
Yes, i took a look and sow that commited version have that functionality
disabled. Donno why, maybe one of the many things i forgot to do.
>
> --
> E-gards: Jimmy
>
Best Regards
Ivan Kalvachev
iive
More information about the MPlayer-dev-eng
mailing list