[MPlayer-dev-eng] [PATCH] Color SPU rendering

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Jan 27 13:12:01 CET 2008


On Sun, Jan 27, 2008 at 12:53:11PM +0100, Benjamin Zores wrote:
> Reimar Döffinger a écrit :
> > On Sun, Jan 27, 2008 at 12:21:00PM +0100, Benjamin Zores wrote:
> >> Hi,
> >>
> >> In an attempt to start the color spu patchset for dvdnav, here's a first 
> >> patch.
> >>
> >> It adds a new VO control that will be used to ask each vo which colorspace 
> >> it can use to render SPUs.
> >> Next patch will implement this VOCTRL for each vo driver.
> >>
> >> Ok to apply ?
> >>
> >> Ben
> > 
> >> Index: libvo/video_out.h
> >> ===================================================================
> >> --- libvo/video_out.h	(revision 25871)
> >> +++ libvo/video_out.h	(working copy)
> >> @@ -84,6 +84,17 @@
> >>    int w,h;
> >>  } mp_win_t;
> >>  
> >> +// Query supported color space for SPU rendering
> >> +#define VOCTRL_COLORSPU_SUPPORT 33
> >> +
> >> +typedef enum {
> >> +  DVDNAV_SPU_NONE,
> >> +  DVDNAV_SPU_YUV,
> >> +  DVDNAV_SPU_YUY,
> >> +  DVDNAV_SPU_RGB,
> >> +  DVDNAV_SPU_BGR,
> >> +} nav_spu_type_t;
> > 
> > Uh, those values make no sense, at least not without further specifying
> > them.
> > And why use new defines anyway, why not just use IMGFMT_ ??
> 
> They will be defined according to IMGFMT_ actually.
> 
> For example, one vo implementation will be:
> +    case VOCTRL_COLORSPU_SUPPORT: {
> +       *(int*)data=DVDNAV_SPU_NONE;
> +       if (image_format==IMGFMT_YV12 || image_format==IMGFMT_I420 ||
> +           image_format==IMGFMT_IYUV || image_format==IMGFMT_YVU9)
> +               *(int*)data=DVDNAV_SPU_YUV;
> +       if (image_format==IMGFMT_YUY2)
> +               *(int*)data=DVDNAV_SPU_YUY;
> +       if (image_format==IMGFMT_RGB15 || image_format==IMGFMT_RGB16 ||
> +           image_format==IMGFMT_RGB32)
> +               *(int*)data=DVDNAV_SPU_RGB;
> +       if (image_format==IMGFMT_BGR15 || image_format==IMGFMT_BGR16 ||
> +           image_format==IMGFMT_BGR32)
> +               *(int*)data=DVDNAV_SPU_BGR;
> +       return VO_TRUE;
> +       }
> 
> According to the image format, the SPU decoder will now how to draw the SPU.
> 
> Does it make more sense ?

No, how in the nine hells is this supposed to work if the renderer
supports YV12 but not YVU9?
And how would support for RGB24 fit into this?
I really cannot see what these new defines get you _except_ a huge
amount of problems (there is after all no way to render to IMGFMT_BGR15
or IMGFMT_BGR16 or IMGFMT_BGR32, you always render to one and exactly
one format).



More information about the MPlayer-dev-eng mailing list