Mercurial > mplayer.hg
changeset 4352:ed5b85b713a3
Extensions for video accelerated architecture
author | nick |
---|---|
date | Sat, 26 Jan 2002 16:01:26 +0000 |
parents | aac822b8a630 |
children | 8487ae6ca3f4 |
files | libvo/video_out.h libvo/video_out_internal.h libvo/vo_3dfx.c libvo/vo_aa.c libvo/vo_dga.c libvo/vo_directfb.c libvo/vo_dxr3.c libvo/vo_fbdev.c libvo/vo_fsdga.c libvo/vo_ggi.c libvo/vo_gl.c libvo/vo_gl2.c libvo/vo_md5.c libvo/vo_mga.c libvo/vo_mpegpes.c libvo/vo_null.c libvo/vo_odivx.c libvo/vo_pgm.c libvo/vo_png.c libvo/vo_sdl.c libvo/vo_svga.c libvo/vo_syncfb.c libvo/vo_tdfxfb.c libvo/vo_vesa.c libvo/vo_x11.c libvo/vo_xmga.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_zr.c libvo/vosub_vidix.h |
diffstat | 30 files changed, 306 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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"
--- 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)); +} +
--- 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)); +}
--- 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
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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)); +}
--- 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<num_buffers;i++ ) deallocate_xvimage( i ); } +static uint32_t preinit(const char *arg) +{ + return 0; +} - +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +}
--- a/libvo/vo_xvidix.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_xvidix.c Sat Jan 26 16:01:26 2002 +0000 @@ -490,3 +490,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)); +}
--- a/libvo/vo_zr.c Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vo_zr.c Sat Jan 26 16:01:26 2002 +0000 @@ -604,3 +604,13 @@ norm = VIDEO_MODE_AUTO; } + +static uint32_t preinit(const char *arg) +{ + return 0; +} + +static void query_vaa(vo_vaa_t *vaa) +{ + memset(vaa,0,sizeof(vo_vaa_t)); +}
--- a/libvo/vosub_vidix.h Sat Jan 26 15:46:58 2002 +0000 +++ b/libvo/vosub_vidix.h Sat Jan 26 16:01:26 2002 +0000 @@ -13,8 +13,7 @@ #define __VOSUB_VIDIX_INCLUDED /* drvname can be NULL */ -int vidix_preinit( -const char *drvname,void *server); +int vidix_preinit(const char *drvname,void *server); int vidix_init(unsigned src_width,unsigned src_height, unsigned dest_x,unsigned dest_y,unsigned dst_width, unsigned dst_height,unsigned format,unsigned dest_bpp,