1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

Extensions for video accelerated architecture

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4353 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nick 2002-01-26 16:01:26 +00:00
parent 804eff0175
commit fa1d5742bc
30 changed files with 306 additions and 16 deletions

View File

@ -10,6 +10,7 @@
#include "font_load.h" #include "font_load.h"
#include "img_format.h" #include "img_format.h"
#include "../vidix/vidix.h"
#define VO_EVENT_EXPOSE 1 #define VO_EVENT_EXPOSE 1
#define VO_EVENT_RESIZE 2 #define VO_EVENT_RESIZE 2
@ -27,10 +28,53 @@ typedef struct vo_info_s
const char *comment; const char *comment;
} vo_info_t; } 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 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: * params:
* width,height: image source size * width,height: image source size
* d_width,d_height: size of the requested window size, just a hint * d_width,d_height: size of the requested window size, just a hint
@ -93,6 +137,14 @@ typedef struct vo_functions_s
*/ */
void (*uninit)(void); 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; } vo_functions_t;
char *vo_format_name(int format); char *vo_format_name(int format);

View File

@ -30,9 +30,12 @@ static void flip_page(void);
static void check_events(void); static void check_events(void);
static void uninit(void); static void uninit(void);
static uint32_t query_format(uint32_t format); 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 =\ #define LIBVO_EXTERN(x) vo_functions_t video_out_##x =\
{\ {\
preinit,\
init,\ init,\
query_format,\ query_format,\
get_info,\ get_info,\
@ -42,6 +45,7 @@ static uint32_t query_format(uint32_t format);
flip_page,\ flip_page,\
check_events,\ check_events,\
uninit,\ uninit,\
query_vaa\
}; };
#include "osd.h" #include "osd.h"

View File

@ -488,4 +488,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));
}

View File

@ -752,3 +752,12 @@ vo_aa_revertoption(config_t* opt,char* param) {
aaopt_subcolor= AA_SPECIAL; 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));
}

View File

@ -23,8 +23,8 @@
* - works only on x86 architectures * - works only on x86 architectures
* *
* $Log$ * $Log$
* Revision 1.36 2002/01/08 20:58:53 atmos4 * Revision 1.37 2002/01/26 16:01:26 nick
* SwScaler support for vo_png by Kim Minh, SwScale w/aspecz for vo_dga by me * Extensions for video accelerated architecture
* *
* Revision 1.35 2001/12/28 20:52:54 alex * 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) * use XF86VidMode later in init (at line 1031) only if we've got support (if have_vm==1)
@ -1175,6 +1175,16 @@ static uint32_t init( uint32_t width, uint32_t height,
return 0; 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 // deleted the old vo_dga_query_event() routine 'cause it is obsolete

View File

@ -888,3 +888,12 @@ static void uninit(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));
}

View File

@ -551,3 +551,13 @@ static void uninit(void)
static void check_events(void) 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));
}

View File

@ -1338,3 +1338,12 @@ static void uninit(void)
#endif #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));
}

View File

@ -463,8 +463,12 @@ int vo_dga_query_event(void){
} }
#endif #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));
}

View File

@ -765,3 +765,13 @@ static void check_events(void)
} }
return; 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));
}

View File

@ -477,3 +477,13 @@ uninit(void)
saver_on(mDisplay); // screen saver back on saver_on(mDisplay); // screen saver back on
XDestroyWindow( mDisplay,mywindow ); 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));
}

View File

@ -1103,3 +1103,13 @@ uninit(void)
saver_on(mDisplay); // screen saver back on saver_on(mDisplay); // screen saver back on
XDestroyWindow( mDisplay,mywindow ); 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));
}

View File

@ -103,4 +103,12 @@ 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));
}

View File

@ -146,5 +146,12 @@ 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));
}

View File

@ -511,3 +511,12 @@ 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));
}

View File

@ -90,5 +90,12 @@ 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));
}

View File

@ -261,10 +261,16 @@ uninit(void)
{ {
} }
static void check_events(void) 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));
}

View File

@ -135,5 +135,12 @@ 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));
}

View File

@ -309,3 +309,13 @@ uninit(void)
static void check_events(void) 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));
}

View File

@ -1263,3 +1263,13 @@ uninit(void)
#endif #endif
sdl_close(); 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));
}

View File

@ -569,3 +569,13 @@ static void uninit(void) {
free(list); 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));
}

View File

@ -448,3 +448,12 @@ 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));
}

View File

@ -823,4 +823,12 @@ static void my_draw_alpha_accel(int x0, int y0, int w, int h, unsigned char *src
} }
#endif /* ! HWACCEL_OSD_M2 */ #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));
}

View File

@ -988,3 +988,13 @@ static void check_events(void)
printf("vo_vesa: check_events was called\n"); printf("vo_vesa: check_events was called\n");
/* Nothing to do */ /* 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));
}

View File

@ -614,5 +614,12 @@ uninit(void)
printf("vo: uninit!\n"); 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));
}

View File

@ -391,3 +391,13 @@ uninit(void)
mga_uninit(); mga_uninit();
printf("vo: uninit!\n"); 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));
}

View File

@ -611,5 +611,12 @@ static void uninit(void)
for( i=0;i<num_buffers;i++ ) deallocate_xvimage( i ); 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));
}

View File

@ -490,3 +490,13 @@ static void Terminate_Display_Process(void)
return; 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));
}

View File

@ -604,3 +604,13 @@ void vo_zr_revertoption(config_t* opt,char* param) {
norm = VIDEO_MODE_AUTO; 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));
}

View File

@ -13,8 +13,7 @@
#define __VOSUB_VIDIX_INCLUDED #define __VOSUB_VIDIX_INCLUDED
/* drvname can be NULL */ /* drvname can be NULL */
int vidix_preinit( int vidix_preinit(const char *drvname,void *server);
const char *drvname,void *server);
int vidix_init(unsigned src_width,unsigned src_height, int vidix_init(unsigned src_width,unsigned src_height,
unsigned dest_x,unsigned dest_y,unsigned dst_width, unsigned dest_x,unsigned dest_y,unsigned dst_width,
unsigned dst_height,unsigned format,unsigned dest_bpp, unsigned dst_height,unsigned format,unsigned dest_bpp,