constDDPIXELFORMATumc_dx_overlay_formats[]= { {sizeof(DDPIXELFORMAT),DDPF_FOURCC|DDPF_YUV,MAKEFOURCC('Y','V','1','2'),12,0,0,0,0},/*YV12*/ {sizeof(DDPIXELFORMAT),DDPF_FOURCC|DDPF_YUV,MAKEFOURCC('Y','U','Y','2'),16,0,0,0,0},/*YUY2*/ {sizeof(DDPIXELFORMAT),DDPF_FOURCC|DDPF_YUV,MAKEFOURCC('U','Y','V','Y'),16,0,0,0,0},/*UYVY*/ {sizeof(DDPIXELFORMAT),DDPF_FOURCC|DDPF_YUV,MAKEFOURCC('N','V','1','2'),12,0,0,0,0},/*NV12*/ {sizeof(DDPIXELFORMAT),DDPF_RGB,0,16,0x00007C00,0x000003E0,0x0000001F,0}, /*RGB555*/ {sizeof(DDPIXELFORMAT),DDPF_RGB,0,16,0xf800,0x07e0,0x001f,0},/*RGB565*/ {sizeof(DDPIXELFORMAT),DDPF_RGB,0,24,0x00FF0000,0x0000FF00,0x000000FF,0},/*RGB24*/ {sizeof(DDPIXELFORMAT),DDPF_RGB,0,32,0x00FF0000,0x0000FF00,0x000000FF,0}/*RGB32*/ }; 2) extend in dx_drv.h the DDVideoDrvColorFomat to this:typedefenumDDVideoDrvColorFormat { DXVideoDrv_YV12=0, DXVideoDrv_YUY2=1, DXVideoDrv_UYVY=2, DXVideoDrv_NV12=3, DXVideoDrv_RGB555=4, DXVideoDrv_RGB565=5, DXVideoDrv_RGB24 =6, DXVideoDrv_RGB32 =7 }DDVideoDrvColorFormat;
3) add in blt_video_render.cpp (for example) in the Init function:caseRGB555: DrvParams.dd_fmt=DXVideoDrv_RGB555; break; caseRGB32: DrvParams.dd_fmt=DXVideoDrv_RGB32; break; caseRGB24: DrvParams.dd_fmt=DXVideoDrv_RGB24; break;
Now you can initialize UMC::AVSync also with RGB555, RGB24 & RGB32
It works fine, best Regards
Detlef
Link Copied
Detlef,
Thanks for sharing it. I think it is very useful for those who are using the render code.
best,
Chao
Very useful! I'm confusing with the DDPIXELFORMAT struct. Thanks for sharing it.
For more complete information about compiler optimizations, see our Optimization Notice.