libgpac
Documentation of the core library of GPAC
dx_2d.c File Reference
#include "dx_hw.h"
+ Include dependency graph for dx_2d.c:

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)
 

Variables

static GF_GPACArg DirectDrawArgs []
 

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
+ Here is the caller graph for this function:

◆ get_win_4CC()

static u32 get_win_4CC ( u32  pixel_format)
static
+ Here is the caller graph for this function:

◆ DD_ClearBackBuffer()

static GF_Err DD_ClearBackBuffer ( GF_VideoOutput dr,
u32  color 
)
static
+ Here is the caller graph for this function:

◆ CreateBackBuffer()

GF_Err CreateBackBuffer ( GF_VideoOutput dr,
u32  Width,
u32  Height,
Bool  use_system_memory 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitDirectDraw()

GF_Err InitDirectDraw ( GF_VideoOutput dr,
u32  Width,
u32  Height 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_LockSurface()

static GF_Err DD_LockSurface ( DDContext dd,
GF_VideoSurface vi,
LPDDRAWSURFACE  surface 
)
static
+ Here is the caller graph for this function:

◆ DD_UnlockSurface()

static GF_Err DD_UnlockSurface ( DDContext dd,
LPDDRAWSURFACE  surface 
)
static
+ Here is the caller graph for this function:

◆ DD_LockBackBuffer()

static GF_Err DD_LockBackBuffer ( GF_VideoOutput dr,
GF_VideoSurface vi,
Bool  do_lock 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LockOSContext()

static void* LockOSContext ( GF_VideoOutput dr,
Bool  do_lock 
)
static
+ Here is the caller graph for this function:

◆ DD_BlitSurface()

static GF_Err DD_BlitSurface ( DDContext dd,
DDSurface src,
GF_Window src_wnd,
GF_Window dst_wnd,
GF_ColorKey key 
)
static
+ Here is the caller graph for this function:

◆ DD_GetSurface()

static DDSurface* DD_GetSurface ( GF_VideoOutput dr,
u32  width,
u32  height,
u32  pixel_format,
Bool  check_caps 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_yuv_supported()

static GFINLINE u32 is_yuv_supported ( u32  win_4cc)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_yuv_planar()

static GFINLINE Bool is_yuv_planar ( u32  format)
static
+ Here is the caller graph for this function:

◆ DD_InitYUV()

void DD_InitYUV ( GF_VideoOutput dr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_SetBackBufferSize()

GF_Err DD_SetBackBufferSize ( GF_VideoOutput dr,
u32  width,
u32  height,
Bool  use_system_memory 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DD_SetupDDraw()

void DD_SetupDDraw ( GF_VideoOutput driv)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DirectDrawArgs

GF_GPACArg DirectDrawArgs[]
static
Initial value:
= {
GF_DEF_ARG("yuv-overlay", NULL, "enable yuv overlays", "false", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("yuv-4cc", NULL, "prefered YUV 4CC for overlays", NULL, NULL, GF_ARG_STRING, 0),
GF_DEF_ARG("offscreen-yuv", NULL, "enable offscreen yuv", "true", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("overlay-color-key", NULL, "color key value for overlay", "0101FE", NULL, GF_ARG_STRING, 0),
GF_DEF_ARG("no-vsync", NULL, "disable vertical synchro", "false", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("switch-vres", NULL, "enable resolution switching of display", "false", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("hwvmem", NULL, "specify (2D rendering only) memory type of main video backbuffer. Depending on the scene type, this may drastically change the playback speed\n"
"- always: always on hardware\n"
"- never: always on system memory\n"
"- auto: selected by GPAC based on content type (graphics or video)", "auto", "auto|always|never", GF_ARG_INT, GF_ARG_HINT_EXPERT|GF_ARG_SUBSYS_VIDEO),
{0},
}
#define GF_ARG_SUBSYS_VIDEO
Definition: main.h:138
#define GF_ARG_STRING
Definition: main.h:155
#define GF_ARG_INT
Definition: main.h:151
#define GF_DEF_ARG(_a, _b, _c, _d, _e, _f, _g)
Definition: main.h:166
#define GF_ARG_HINT_EXPERT
Definition: main.h:123
#define GF_ARG_BOOL
Definition: main.h:149