Mercurial > mplayer.hg
changeset 677:ee2dac2cc633
- now mpeg is fast again (no more offscreen buffer rubbish) But is it really ok?
author | acki2 |
---|---|
date | Tue, 01 May 2001 20:24:31 +0000 |
parents | 428755f858f7 |
children | 9088ebc5b5b5 |
files | libvo/vo_dga.c |
diffstat | 1 files changed, 8 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_dga.c Tue May 01 01:32:59 2001 +0000 +++ b/libvo/vo_dga.c Tue May 01 20:24:31 2001 +0000 @@ -23,6 +23,9 @@ * - works only on x86 architectures * * $Log$ + * Revision 1.18 2001/05/01 20:24:31 acki2 + * - now mpeg is fast again (no more offscreen buffer rubbish) But is it really ok? + * * Revision 1.17 2001/04/24 11:42:04 pontscho * clean up * @@ -259,7 +262,6 @@ vo_dga_dbf_current; // current buffer (0 or 1) static unsigned char *vo_dga_base; -static unsigned char *vo_dga_yv12_base = NULL; static Display *vo_dga_dpy; //--------------------------------------------------------- @@ -370,10 +372,6 @@ static void flip_page( void ){ - if(vo_dga_src_format ==IMGFMT_YV12 ){ - draw_frame( &vo_dga_yv12_base); - } - vo_draw_text(vo_dga_src_width,vo_dga_src_height,draw_alpha); if(vo_dga_dbf_mem_offset != 0){ @@ -397,18 +395,11 @@ int w,int h,int x,int y ) { - // for osd, we need a separate buffer here ... :-() - - yuv2rgb( vo_dga_yv12_base + (vo_dga_src_width * y +x) * BYTESPP, - src[0], src[1], src[2], - w,h, vo_dga_src_width * BYTESPP, - stride[0],stride[1] ); - - // yuv2rgb( vo_dga_base + vo_dga_vp_offset + - // (vo_dga_width * y +x) * BYTESPP, - // src[0], src[1], src[2], - // w,h, vo_dga_width * BYTESPP, - // stride[0],stride[1] ); + yuv2rgb( vo_dga_base + vo_dga_dbf_current * vo_dga_dbf_mem_offset + vo_dga_vp_offset + + (vo_dga_width * y +x) * BYTESPP, + src[0], src[1], src[2], + w,h, vo_dga_width * BYTESPP, + stride[0],stride[1] ); return 0; }; @@ -518,8 +509,6 @@ #endif if(vo_dga_is_running){ - if(vo_dga_yv12_base)free(vo_dga_yv12_base); - vo_dga_yv12_base = NULL; vo_dga_is_running = 0; vd_printf( VD_DBG, "vo_dga: in uninit\n"); XUngrabPointer (vo_dga_dpy, CurrentTime); @@ -678,15 +667,6 @@ return 1; } - if(format ==IMGFMT_YV12 ){ - vo_dga_yv12_base = malloc(wanted_width * wanted_height * BYTESPP); - if(vo_dga_yv12_base== NULL){ - vd_printf(VD_ERR, "vo_dga: Not enough memory for offscreen YV12 buffer!\n"); - return 1; - } - } - - vo_dga_vp_width = DisplayWidth( vo_dga_dpy, DefaultScreen(vo_dga_dpy)); vo_dga_vp_height = DisplayHeight( vo_dga_dpy, DefaultScreen(vo_dga_dpy)); @@ -810,10 +790,6 @@ } #endif #endif - if(vo_dga_yv12_base){ - free(vo_dga_yv12_base); - vo_dga_yv12_base = NULL; - } return 1; }