# HG changeset patch # User nick # Date 1012060886 0 # Node ID ed5b85b713a380673c751c48113c52d65c4e20e3 # Parent aac822b8a630805df4a23731559c663fb0d7e7e7 Extensions for video accelerated architecture diff -r aac822b8a630 -r ed5b85b713a3 libvo/video_out.h --- a/libvo/video_out.h Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/video_out.h Sat Jan 26 16:01:26 2002 +0000 @@ -10,6 +10,7 @@ #include "font_load.h" #include "img_format.h" +#include "../vidix/vidix.h" #define VO_EVENT_EXPOSE 1 #define VO_EVENT_RESIZE 2 @@ -27,10 +28,53 @@ const char *comment; } vo_info_t; +/* Direct access to BES */ +typedef struct bes_da_s +{ + vidix_rect_t dest; /* This field should be filled by x,y,w,h + from vidix:src but pitches from + vidix:dest */ + int flags; /* Probably will work only when flag == 0 */ + /* memory model */ + unsigned frame_size; /* destinition frame size */ + unsigned num_frames; /* number available frames */ + unsigned offsets[VID_PLAY_MAXFRAMES]; /* relative offset of each frame from begin of video memory */ + vidix_yuv_t offset; /* relative offsets within frame for yuv planes */ + void* dga_addr; /* linear address of BES */ +}bes_da_t; + +/* + Video Accelearted Architecture. + Every field of this structure can be set to NULL that means that + features is not supported +*/ +typedef struct vo_vaa_s +{ + uint32_t flags; /* currently undefined */ + /* + * Query Direct Access to BES + * info - information to be filled + * returns: 0 on success errno on error. + */ + int (*query_bes_da)(bes_da_t *info); + int (*get_video_eq)(vidix_video_eq_t *info); + int (*set_video_eq)(const vidix_video_eq_t *info); + int (*get_num_fx)(unsigned *info); + int (*get_oem_fx)(vidix_oem_fx_t *info); + int (*set_oem_fx)(const vidix_oem_fx_t *info); + int (*set_deint)(const vidix_deinterlace_t *info); +}vo_vaa_t; + typedef struct vo_functions_s { + /* + * Preinitializes driver (real INITIALIZATION) + * arg - currently it's vo_subdevice + * returns: zero on successful initialization, non-zero on error. + */ + uint32_t (*preinit)(const char *arg); /* - * Initialize the display driver. + * Initialize (means CONFIGURE) the display driver. * params: * width,height: image source size * d_width,d_height: size of the requested window size, just a hint @@ -93,6 +137,14 @@ */ void (*uninit)(void); + /* + * Query Video Accelerated Architecture information. + * params: + * vaa: address of struct to be filled. + * (Note: driver should memset it to ZERO if it doesn't support vaa.) + */ + void (*query_vaa)(vo_vaa_t *vaa); + } vo_functions_t; char *vo_format_name(int format); diff -r aac822b8a630 -r ed5b85b713a3 libvo/video_out_internal.h --- a/libvo/video_out_internal.h Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/video_out_internal.h Sat Jan 26 16:01:26 2002 +0000 @@ -30,9 +30,12 @@ static void check_events(void); static void uninit(void); static uint32_t query_format(uint32_t format); +static uint32_t preinit(const char *); +static void query_vaa(vo_vaa_t *); #define LIBVO_EXTERN(x) vo_functions_t video_out_##x =\ {\ + preinit,\ init,\ query_format,\ get_info,\ @@ -42,6 +45,7 @@ flip_page,\ check_events,\ uninit,\ + query_vaa\ }; #include "osd.h" diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_3dfx.c --- a/libvo/vo_3dfx.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_3dfx.c Sat Jan 26 16:01:26 2002 +0000 @@ -488,4 +488,13 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} + diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_aa.c --- a/libvo/vo_aa.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_aa.c Sat Jan 26 16:01:26 2002 +0000 @@ -752,3 +752,12 @@ aaopt_subcolor= AA_SPECIAL; } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_dga.c --- a/libvo/vo_dga.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_dga.c Sat Jan 26 16:01:26 2002 +0000 @@ -23,8 +23,8 @@ * - works only on x86 architectures * * $Log$ - * Revision 1.36 2002/01/08 20:58:53 atmos4 - * SwScaler support for vo_png by Kim Minh, SwScale w/aspecz for vo_dga by me + * Revision 1.37 2002/01/26 16:01:26 nick + * Extensions for video accelerated architecture * * Revision 1.35 2001/12/28 20:52:54 alex * use XF86VidMode later in init (at line 1031) only if we've got support (if have_vm==1) @@ -1175,6 +1175,16 @@ return 0; } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} + //--------------------------------------------------------- // deleted the old vo_dga_query_event() routine 'cause it is obsolete diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_directfb.c --- a/libvo/vo_directfb.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_directfb.c Sat Jan 26 16:01:26 2002 +0000 @@ -888,3 +888,12 @@ } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_dxr3.c --- a/libvo/vo_dxr3.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_dxr3.c Sat Jan 26 16:01:26 2002 +0000 @@ -551,3 +551,13 @@ static void check_events(void) { } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_fbdev.c --- a/libvo/vo_fbdev.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_fbdev.c Sat Jan 26 16:01:26 2002 +0000 @@ -1338,3 +1338,12 @@ #endif } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_fsdga.c --- a/libvo/vo_fsdga.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_fsdga.c Sat Jan 26 16:01:26 2002 +0000 @@ -463,8 +463,12 @@ } #endif - - +static uint32_t preinit(const char *arg) +{ + return 0; +} - - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_ggi.c --- a/libvo/vo_ggi.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_ggi.c Sat Jan 26 16:01:26 2002 +0000 @@ -765,3 +765,13 @@ } return; } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_gl.c --- a/libvo/vo_gl.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_gl.c Sat Jan 26 16:01:26 2002 +0000 @@ -477,3 +477,13 @@ saver_on(mDisplay); // screen saver back on XDestroyWindow( mDisplay,mywindow ); } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_gl2.c --- a/libvo/vo_gl2.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_gl2.c Sat Jan 26 16:01:26 2002 +0000 @@ -1103,3 +1103,13 @@ saver_on(mDisplay); // screen saver back on XDestroyWindow( mDisplay,mywindow ); } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_md5.c --- a/libvo/vo_md5.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_md5.c Sat Jan 26 16:01:26 2002 +0000 @@ -103,4 +103,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_mga.c --- a/libvo/vo_mga.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_mga.c Sat Jan 26 16:01:26 2002 +0000 @@ -146,5 +146,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_mpegpes.c --- a/libvo/vo_mpegpes.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_mpegpes.c Sat Jan 26 16:01:26 2002 +0000 @@ -511,3 +511,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_null.c --- a/libvo/vo_null.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_null.c Sat Jan 26 16:01:26 2002 +0000 @@ -90,5 +90,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_odivx.c --- a/libvo/vo_odivx.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_odivx.c Sat Jan 26 16:01:26 2002 +0000 @@ -261,10 +261,16 @@ { } - - static void check_events(void) { } +static uint32_t preinit(const char *arg) +{ + return 0; +} +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_pgm.c --- a/libvo/vo_pgm.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_pgm.c Sat Jan 26 16:01:26 2002 +0000 @@ -135,5 +135,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_png.c --- a/libvo/vo_png.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_png.c Sat Jan 26 16:01:26 2002 +0000 @@ -309,3 +309,13 @@ static void check_events(void) { } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_sdl.c --- a/libvo/vo_sdl.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_sdl.c Sat Jan 26 16:01:26 2002 +0000 @@ -1263,3 +1263,13 @@ #endif sdl_close(); } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_svga.c --- a/libvo/vo_svga.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_svga.c Sat Jan 26 16:01:26 2002 +0000 @@ -569,3 +569,13 @@ free(list); } } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_syncfb.c --- a/libvo/vo_syncfb.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_syncfb.c Sat Jan 26 16:01:26 2002 +0000 @@ -448,3 +448,12 @@ { } +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_tdfxfb.c --- a/libvo/vo_tdfxfb.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_tdfxfb.c Sat Jan 26 16:01:26 2002 +0000 @@ -823,4 +823,12 @@ } #endif /* ! HWACCEL_OSD_M2 */ +static uint32_t preinit(const char *arg) +{ + return 0; +} +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_vesa.c --- a/libvo/vo_vesa.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_vesa.c Sat Jan 26 16:01:26 2002 +0000 @@ -988,3 +988,13 @@ printf("vo_vesa: check_events was called\n"); /* Nothing to do */ } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_x11.c --- a/libvo/vo_x11.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_x11.c Sat Jan 26 16:01:26 2002 +0000 @@ -614,5 +614,12 @@ printf("vo: uninit!\n"); } +static uint32_t preinit(const char *arg) +{ + return 0; +} - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_xmga.c --- a/libvo/vo_xmga.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_xmga.c Sat Jan 26 16:01:26 2002 +0000 @@ -391,3 +391,13 @@ mga_uninit(); printf("vo: uninit!\n"); } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +} diff -r aac822b8a630 -r ed5b85b713a3 libvo/vo_xv.c --- a/libvo/vo_xv.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_xv.c Sat Jan 26 16:01:26 2002 +0000 @@ -611,5 +611,12 @@ for( i=0;i