mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
Verbosing and minor optimization
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3018 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
62c4bc90cc
commit
16fd954717
@ -45,6 +45,7 @@ extern int verbose;
|
|||||||
|
|
||||||
int vlvo_preinit(const char *drvname)
|
int vlvo_preinit(const char *drvname)
|
||||||
{
|
{
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_preinit(%s) was called\n",drvname);
|
||||||
lvo_handler = open(drvname,O_RDWR);
|
lvo_handler = open(drvname,O_RDWR);
|
||||||
if(lvo_handler == -1)
|
if(lvo_handler == -1)
|
||||||
{
|
{
|
||||||
@ -59,6 +60,7 @@ int vlvo_init(unsigned src_width,unsigned src_height,
|
|||||||
unsigned dst_height,unsigned format,unsigned dest_bpp)
|
unsigned dst_height,unsigned format,unsigned dest_bpp)
|
||||||
{
|
{
|
||||||
size_t i,awidth;
|
size_t i,awidth;
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_init() was called\n");
|
||||||
image_width = src_width;
|
image_width = src_width;
|
||||||
image_height = src_height;
|
image_height = src_height;
|
||||||
mga_vid_config.version=MGA_VID_VERSION;
|
mga_vid_config.version=MGA_VID_VERSION;
|
||||||
@ -136,6 +138,7 @@ int vlvo_init(unsigned src_width,unsigned src_height,
|
|||||||
|
|
||||||
void vlvo_term( void )
|
void vlvo_term( void )
|
||||||
{
|
{
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_term() was called\n");
|
||||||
ioctl( lvo_handler,MGA_VID_OFF,0 );
|
ioctl( lvo_handler,MGA_VID_OFF,0 );
|
||||||
munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
|
munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
|
||||||
if(lvo_handler != -1) close(lvo_handler);
|
if(lvo_handler != -1) close(lvo_handler);
|
||||||
@ -181,7 +184,6 @@ uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y
|
|||||||
dest += bespitch2;
|
dest += bespitch2;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
uint8_t *src;
|
|
||||||
uint8_t *dst;
|
uint8_t *dst;
|
||||||
uint8_t bytpp;
|
uint8_t bytpp;
|
||||||
bytpp = (image_bpp+7)/8;
|
bytpp = (image_bpp+7)/8;
|
||||||
@ -194,32 +196,23 @@ uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
memcpy(dst,image[0],mga_vid_config.frame_size);
|
||||||
src = image[0];
|
|
||||||
memcpy(dst,src,w*h*bytpp);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_draw_slice() was called\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t vlvo_draw_frame(uint8_t *src[])
|
uint32_t vlvo_draw_frame(uint8_t *image[])
|
||||||
{
|
{
|
||||||
size_t i, ssize;
|
/* Note it's very strange but sometime for YUY2 draw_frame is called */
|
||||||
uint8_t *dest;
|
memcpy(lvo_mem,image[0],mga_vid_config.frame_size);
|
||||||
const uint8_t *sptr;
|
if(verbose > 1) printf("vesa_lvo: vlvo_draw_frame() was called\n");
|
||||||
ssize = IMAGE_LINE_SIZE((image_bpp+7)/8);
|
return 0;
|
||||||
dest = lvo_mem;
|
|
||||||
sptr = src[0];
|
|
||||||
for(i=0;i<image_height;i++)
|
|
||||||
{
|
|
||||||
memcpy(dest,sptr,ssize);
|
|
||||||
sptr += ssize;
|
|
||||||
dest += ssize;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void vlvo_flip_page(void)
|
void vlvo_flip_page(void)
|
||||||
{
|
{
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_flip_page() was called\n");
|
||||||
ioctl(lvo_handler,MGA_VID_FSEL,&next_frame);
|
ioctl(lvo_handler,MGA_VID_FSEL,&next_frame);
|
||||||
next_frame=(next_frame+1)%mga_vid_config.num_frames;
|
next_frame=(next_frame+1)%mga_vid_config.num_frames;
|
||||||
lvo_mem=frames[next_frame];
|
lvo_mem=frames[next_frame];
|
||||||
@ -227,11 +220,12 @@ void vlvo_flip_page(void)
|
|||||||
|
|
||||||
void vlvo_draw_osd(void)
|
void vlvo_draw_osd(void)
|
||||||
{
|
{
|
||||||
|
if(verbose > 1) printf("vesa_lvo: vlvo_draw_osd() was called\n");
|
||||||
/* TODO: hw support */
|
/* TODO: hw support */
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t vlvo_query_info(uint32_t format)
|
uint32_t vlvo_query_info(uint32_t format)
|
||||||
{
|
{
|
||||||
if(verbose) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
|
if(verbose > 1) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user