[Mplayer-cvslog] CVS: main/libvo vo_dxr3.c,1.19,1.20

David Holm mswitch at mplayer.dev.hu
Thu Dec 20 09:02:40 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv9085/libvo

Modified Files:
	vo_dxr3.c 
Log Message:
Removed conversion for yuy2, libmp1e supports this format, no need to cnovert it...


Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- vo_dxr3.c	20 Dec 2001 07:40:30 -0000	1.19
+++ vo_dxr3.c	20 Dec 2001 08:02:38 -0000	1.20
@@ -72,6 +72,8 @@
 #ifdef USE_MP1E
 void write_dxr3( rte_context* context, void* data, size_t size, void* user_data )
 {
+    if(ioctl(fd_video,EM8300_IOCTL_VIDEO_SETPTS,&vo_pts) < 0)
+	    printf( "VO: [dxr3] Unable to set pts\n" );
     write( fd_video, data, size );
 }
 #endif
@@ -124,6 +126,7 @@
 #ifdef USE_MP1E
 	int size;
 	enum rte_frame_rate frame_rate;
+	enum rte_pixformat pixel_format;
 
 	if( !rte_init() )
 	{
@@ -164,7 +167,11 @@
 	else if( vo_fps > 60.0 ) frame_rate = RTE_RATE_8;
 	else frame_rate = RTE_RATE_NORATE;
 
-        if( !rte_set_video_parameters( mp1e_context, RTE_YUV420, mp1e_context->width,
+	if( format == IMGFMT_YUY2 )
+	    pixel_format = RTE_YUYV;
+	else
+	    pixel_format = RTE_YUV420;
+        if( !rte_set_video_parameters( mp1e_context, pixel_format, mp1e_context->width,
 					mp1e_context->height, frame_rate,
 					3e6, "I" ) )
         {
@@ -268,20 +275,7 @@
 #ifdef USE_MP1E
     else if( img_format == IMGFMT_YUY2 )
     {
-	int w=v_width,h=v_height;
-	unsigned char *s,*dY,*dU,*dV;
-	
-        if(d_pos_x+w>picture_linesize[0]) w=picture_linesize[0]-d_pos_x;
-        if(d_pos_y+h>s_height) h=s_height-d_pos_y;
-
-	s = src[0]+s_pos_x+s_pos_y*(w*2);
-	dY = picture_data[0]+d_pos_x+d_pos_y*picture_linesize[0];
-	dU = picture_data[1]+(d_pos_x/2)+(d_pos_y/2)*picture_linesize[1];
-	dV = picture_data[2]+(d_pos_x/2)+(d_pos_y/2)*picture_linesize[2];
-	
-	yuy2toyv12( s, dY, dU, dV, w, h, picture_linesize[0], picture_linesize[1], w*2 );
-	
-	mp1e_buffer.data = picture_data[0];
+	mp1e_buffer.data = src[0];
 	mp1e_buffer.time = vo_pts/90000.0;
 	mp1e_buffer.user_data = NULL;
 	rte_push_video_buffer( mp1e_context, &mp1e_buffer );




More information about the MPlayer-cvslog mailing list