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

Benjamin Zores ben at geexbox.org
Sun Jan 27 12:53:11 CET 2008


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 ?

Ben


> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 




More information about the MPlayer-dev-eng mailing list