[MPlayer-dev-eng] [PATCH] ggi osd support added

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Jun 30 11:09:55 CEST 2006


Hello,
On Fri, Jun 30, 2006 at 03:40:33AM -0400, spdepagn at ncsu.edu wrote:
> Hi, I have added support for the osd to the ggi output driver.  I am
> wondering why the osd is implemented so each output driver must implement
> it.

Not, the vo is only supposed to implement it when it can be done in a
way that results in higher speed by avoiding one memcpy.
In all other cases you're supposed to use -vf expand.

> @@ -323,6 +345,19 @@
>  static int draw_slice(uint8_t *src[], int stride[],
>                        int w, int h, int x, int y)
>  {
> +    while(osd_stack_off > 0) {
> +      osd_stack_off--;
> +      char *dst = src[0] + (osd_stack[osd_stack_off].x
> +			    + osd_stack[osd_stack_off].y * w)
> +	                                       * ggi_conf.srcbpp;
> +      draw_alpha_p(osd_stack[osd_stack_off].w,
> +		   osd_stack[osd_stack_off].h,
> +		   osd_stack[osd_stack_off].src,
> +		   osd_stack[osd_stack_off].srca,
> +		   osd_stack[osd_stack_off].stride,
> +		   dst, w*ggi_conf.srcbpp);
> +    }

What are you doing here? You don't necessarily have access to the full
frame in draw_slice, so I can't see how you can draw the OSD here.
Also you seem to draw it onto src[0]?? You may not modify the contents
of src[0] here!

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list