[Mplayer-cvslog] CVS: main/libvo vo_vesa.c,1.49,1.50 vesa_lvo.c,1.10,1.11
Nick Kurshev
nick at mplayer.dev.hu
Thu Nov 29 19:01:00 CET 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv13514/main/libvo
Modified Files:
vo_vesa.c vesa_lvo.c
Log Message:
Minor optimization
Index: vo_vesa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_vesa.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- vo_vesa.c 18 Nov 2001 15:06:32 -0000 1.49
+++ vo_vesa.c 29 Nov 2001 18:00:57 -0000 1.50
@@ -34,6 +34,7 @@
#include "linux/vbelib.h"
#include "bswap.h"
#include "aspect.h"
+#include "vesa_lvo.h"
#include "../postproc/swscale.h"
#include "../postproc/rgb2rgb.h"
@@ -245,8 +246,6 @@
{
if(verbose > 2)
printf("vo_vesa: draw_slice was called: w=%u h=%u x=%u y=%u\n",w,h,x,y);
- if(lvo_name) return vlvo_draw_slice(image,stride,w,h,x,y);
- else
if(vesa_zoom)
{
uint8_t *dst[3]= {dga_buffer, NULL, NULL};
@@ -314,8 +313,6 @@
uint32_t w,h;
if(verbose > 2)
printf("vo_vesa: draw_osd was called\n");
- if(lvo_name) vlvo_draw_osd();
- else
{
w = HAS_DGA()?video_mode_info.XResolution:image_width;
h = HAS_DGA()?video_mode_info.YResolution:image_height;
@@ -327,8 +324,6 @@
{
if(verbose > 2)
printf("vo_vesa: flip_page was called\n");
- if(lvo_name) vlvo_flip_page();
- else
if(flip_trigger)
{
if(!HAS_DGA()) __vbeCopyData(dga_buffer);
@@ -365,8 +360,6 @@
uint8_t *data = src[0];
if(verbose > 2)
printf("vo_vesa: draw_frame was called\n");
- if(lvo_name) return vlvo_draw_frame(src);
- else
if(rgb2rgb_fnc)
{
if(HAS_DGA())
Index: vesa_lvo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vesa_lvo.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vesa_lvo.c 27 Nov 2001 18:36:35 -0000 1.10
+++ vesa_lvo.c 29 Nov 2001 18:00:57 -0000 1.11
@@ -24,6 +24,8 @@
#include "../drivers/mga_vid.h" /* <- should be changed to "linux/'something'.h" */
#include "fastmemcpy.h"
+#include "video_out.h"
+
#define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */
#define NUM_FRAMES 2
static uint8_t *frames[NUM_FRAMES];
@@ -39,6 +41,8 @@
#define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) )
#define IMAGE_LINE_SIZE(pixel_size) (image_width*(pixel_size))
+extern vo_functions_t video_out_vesa;
+
int vlvo_preinit(const char *drvname)
{
if(verbose > 1) printf("vesa_lvo: vlvo_preinit(%s) was called\n",drvname);
@@ -48,6 +52,11 @@
printf("vesa_lvo: Couldn't open '%s'\n",drvname);
return -1;
}
+ /* we are able to tune up this stuff depend on fourcc format */
+ video_out_vesa.draw_slice=vlvo_draw_slice;
+ video_out_vesa.draw_frame=vlvo_draw_frame;
+ video_out_vesa.flip_page=vlvo_flip_page;
+ video_out_vesa.draw_osd=vlvo_draw_osd;
return 0;
}
@@ -172,16 +181,18 @@
uint32_t vlvo_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
{
- uint8_t *dst;
- uint8_t bytpp;
if(verbose > 1) printf("vesa_lvo: vlvo_draw_slice() was called\n");
- bytpp = (image_bpp+7)/8;
- dst = lvo_mem + (image_width * y + x)*bytpp;
if(src_format == IMGFMT_YV12 || src_format == IMGFMT_I420 || src_format == IMGFMT_IYUV)
- vlvo_draw_slice_420(image,stride,w,h,x,y);
+ vlvo_draw_slice_420(image,stride,w,h,x,y);
else
- /* vlvo_draw_slice_422(image,stride,w,h,x,y); just for speed */
- memcpy(dst,image[0],mga_vid_config.frame_size);
+ {
+ uint8_t *dst;
+ uint8_t bytpp;
+ bytpp = (image_bpp+7)/8;
+ dst = lvo_mem + (image_width * y + x)*bytpp;
+ /* vlvo_draw_slice_422(image,stride,w,h,x,y); just for speed */
+ memcpy(dst,image[0],mga_vid_config.frame_size);
+ }
return 0;
}
More information about the MPlayer-cvslog
mailing list