libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
dx_2d.c File Reference
#include "dx_hw.h"

Macros

#define DDCONTEXT   DDContext *dd = (DDContext *)dr->opaque;
 
#define DDBACK   DDSurface *pBack = (DDSurface *) gf_list_get(dd->surfaces, 0);
 
#define GF_COL_TO_565(c)
 
#define GF_COL_TO_555(c)
 
#define YUV_NUM_TEST   20
 

Enumerations

enum  {
  GF_PIXEL_IYUV = GF_4CC('I', 'Y', 'U', 'V') , GF_PIXEL_I420 = GF_4CC('I', '4', '2', '0') , GF_PIXEL_UYNV = GF_4CC('U', 'Y', 'N', 'V') , GF_PIXEL_YUNV = GF_4CC('Y', 'U', 'N', 'V') ,
  GF_PIXEL_V422 = GF_4CC('V', '4', '2', '2') , GF_PIXEL_YV12 = GF_4CC('Y', 'V', '1', '2') , GF_PIXEL_Y422 = GF_4CC('Y', '4', '2', '2') , GF_PIXEL_YUY2 = GF_4CC('Y', 'U', 'Y', '2')
}
 

Functions

static Bool pixelformat_yuv (u32 pixel_format)
 
static u32 get_win_4CC (u32 pixel_format)
 
static GF_Err DD_ClearBackBuffer (GF_VideoOutput *dr, u32 color)
 
GF_Err CreateBackBuffer (GF_VideoOutput *dr, u32 Width, u32 Height, Bool use_system_memory)
 
GF_Err InitDirectDraw (GF_VideoOutput *dr, u32 Width, u32 Height)
 
static GF_Err DD_LockSurface (DDContext *dd, GF_VideoSurface *vi, LPDDRAWSURFACE surface)
 
static GF_Err DD_UnlockSurface (DDContext *dd, LPDDRAWSURFACE surface)
 
static GF_Err DD_LockBackBuffer (GF_VideoOutput *dr, GF_VideoSurface *vi, Bool do_lock)
 
static void * LockOSContext (GF_VideoOutput *dr, Bool do_lock)
 
static GF_Err DD_BlitSurface (DDContext *dd, DDSurface *src, GF_Window *src_wnd, GF_Window *dst_wnd, GF_ColorKey *key)
 
static DDSurfaceDD_GetSurface (GF_VideoOutput *dr, u32 width, u32 height, u32 pixel_format, Bool check_caps)
 
static GF_Err DD_Blit (GF_VideoOutput *dr, GF_VideoSurface *video_src, GF_Window *src_wnd, GF_Window *dst_wnd, u32 overlay_type)
 
static GFINLINE u32 is_yuv_supported (u32 win_4cc)
 
static GFINLINE Bool is_yuv_planar (u32 format)
 
void DD_InitYUV (GF_VideoOutput *dr)
 
GF_Err DD_SetBackBufferSize (GF_VideoOutput *dr, u32 width, u32 height, Bool use_system_memory)
 
void DD_SetupDDraw (GF_VideoOutput *driv)
 

Macro Definition Documentation

◆ DDCONTEXT

#define DDCONTEXT   DDContext *dd = (DDContext *)dr->opaque;

◆ DDBACK

#define DDBACK   DDSurface *pBack = (DDSurface *) gf_list_get(dd->surfaces, 0);

◆ GF_COL_TO_565

#define GF_COL_TO_565 (   c)

transfoms a 32-bits color into a 16-bits one.

Note
alpha component is lost

◆ GF_COL_TO_555

#define GF_COL_TO_555 (   c)

transfoms a 32-bits color into a 15-bits one.

Note
alpha component is lost

◆ YUV_NUM_TEST

#define YUV_NUM_TEST   20

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GF_PIXEL_IYUV 
GF_PIXEL_I420 
GF_PIXEL_UYNV 

YUV packed format

GF_PIXEL_YUNV 

YUV packed format

GF_PIXEL_V422 

YUV packed format

GF_PIXEL_YV12 
GF_PIXEL_Y422 
GF_PIXEL_YUY2 

Function Documentation

◆ pixelformat_yuv()

static Bool pixelformat_yuv ( u32  pixel_format)
static

◆ get_win_4CC()

static u32 get_win_4CC ( u32  pixel_format)
static

◆ DD_ClearBackBuffer()

static GF_Err DD_ClearBackBuffer ( GF_VideoOutput dr,
u32  color 
)
static

◆ CreateBackBuffer()

GF_Err CreateBackBuffer ( GF_VideoOutput dr,
u32  Width,
u32  Height,
Bool  use_system_memory 
)

◆ InitDirectDraw()

GF_Err InitDirectDraw ( GF_VideoOutput dr,
u32  Width,
u32  Height 
)

◆ DD_LockSurface()

static GF_Err DD_LockSurface ( DDContext dd,
GF_VideoSurface vi,
LPDDRAWSURFACE  surface 
)
static

◆ DD_UnlockSurface()

static GF_Err DD_UnlockSurface ( DDContext dd,
LPDDRAWSURFACE  surface 
)
static

◆ DD_LockBackBuffer()

static GF_Err DD_LockBackBuffer ( GF_VideoOutput dr,
GF_VideoSurface vi,
Bool  do_lock 
)
static

◆ LockOSContext()

static void * LockOSContext ( GF_VideoOutput dr,
Bool  do_lock 
)
static

◆ DD_BlitSurface()

static GF_Err DD_BlitSurface ( DDContext dd,
DDSurface src,
GF_Window src_wnd,
GF_Window dst_wnd,
GF_ColorKey key 
)
static

◆ DD_GetSurface()

static DDSurface * DD_GetSurface ( GF_VideoOutput dr,
u32  width,
u32  height,
u32  pixel_format,
Bool  check_caps 
)
static

◆ DD_Blit()

static GF_Err DD_Blit ( GF_VideoOutput dr,
GF_VideoSurface video_src,
GF_Window src_wnd,
GF_Window dst_wnd,
u32  overlay_type 
)
static

◆ is_yuv_supported()

static GFINLINE u32 is_yuv_supported ( u32  win_4cc)
static

◆ is_yuv_planar()

static GFINLINE Bool is_yuv_planar ( u32  format)
static

◆ DD_InitYUV()

void DD_InitYUV ( GF_VideoOutput dr)

◆ DD_SetBackBufferSize()

GF_Err DD_SetBackBufferSize ( GF_VideoOutput dr,
u32  width,
u32  height,
Bool  use_system_memory 
)

◆ DD_SetupDDraw()

void DD_SetupDDraw ( GF_VideoOutput driv)