[Mplayer-cvslog] CVS: main/libvo vo_directx.c,1.7,1.8

Diego Biurrun diego at biurrun.de
Sat Dec 21 19:43:23 CET 2002


Sascha Sommer CVS wrote:
> Modified Files:
> 	vo_directx.c 
> Log Message:
> 10l - my system is very tolerant it seems

Very much unlike mine - *sigh* ...

-vo directx has just completely stopped working for me.

> --- vo_directx.c	18 Dec 2002 07:34:32 -0000	1.7
> +++ vo_directx.c	19 Dec 2002 12:01:50 -0000	1.8
> @@ -118,13 +118,13 @@
>      case IMGFMT_I420 :
>  	case IMGFMT_IYUV :
>  	case IMGFMT_YVU9 :
> -    	vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + image_width*y0 + x0,image_width);
> +    	vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + x0,dstride);
>  	break;
>  	case IMGFMT_YUY2 :
> -	    vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ 2*image_width*y0 + 2*x0 ,2*image_width);
> +	    vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ dstride*y0 + 2*x0 ,dstride);
>      break;
>      case IMGFMT_UYVY :
> -        vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + 2*image_width*y0 + 2*x0 + 1,dstride);
> +        vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + 2*x0 + 1,dstride);
>      break;
>  	case IMGFMT_RGB15:	
>      case IMGFMT_BGR15:

Very nice, this hunk fixes my problems with the garbled OSD of some movies.

> @@ -1047,19 +1047,19 @@
>  		}
>  		if(dxresult != DD_OK)mp_msg(MSGT_VO, MSGL_ERR,"<vo_directx><ERROR>can't flip page\n");
>      }
> +	g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL);
> +	if(nooverlay) 
> +	{
> +		DDBLTFX  ddbltfx;
> +        // ask for the "NOTEARING" option
> +	    memset( &ddbltfx, 0, sizeof(DDBLTFX) );
> +        ddbltfx.dwSize = sizeof(DDBLTFX);
> +        ddbltfx.dwDDFX = DDBLTFX_NOTEARING;
> +        g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx);
> +    }	
>  	g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL);
> -	g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL);
>  	dstride = ddsdsf.lPitch;
>      image = ddsdsf.lpSurface;
> -	if(nooverlay == 1) 
> -	{
> -		DDBLTFX  ddbltfx;
> -        // ask for the "NOTEARING" option
> -	    memset( &ddbltfx, 0, sizeof(DDBLTFX) );
> -        ddbltfx.dwSize = sizeof(DDBLTFX);
> -        ddbltfx.dwDDFX = DDBLTFX_NOTEARING;
> -        g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx);
> -    }	
>  }
>  
>  static uint32_t draw_frame(uint8_t *src[])

Ouch, this hunk makes the screen go completely black and produces the 
following output (many times over):

<vo_directx><ERROR>can't flip page 0.113  3008/3008   0%  0%  0.0% 6 0 0%

> @@ -1241,7 +1241,6 @@
>  	memset(&ddsdsf, 0,sizeof(DDSURFACEDESC));
>  	ddsdsf.dwSize = sizeof (DDSURFACEDESC);
>  	g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL);
> -	g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL);
>  	dstride = ddsdsf.lPitch;
>      image = ddsdsf.lpSurface;
>  	if(image_format==IMGFMT_I420||image_format==IMGFMT_IYUV)

And together with this I get a static image that is mostly pink and 
really garbled.

It works perfect for me with just the first hunk applied.  Please 
reverse this or find some other solution.

Diego




More information about the MPlayer-cvslog mailing list