[MPlayer-cvslog] r35154 - trunk/libvo/vo_directx.c

reimar subversion at mplayerhq.hu
Fri Sep 7 21:27:44 CEST 2012


Author: reimar
Date: Fri Sep  7 21:27:44 2012
New Revision: 35154

Log:
directx: Support negative panscanrange (i.e. zooming) for noaccel.

All that is necessary is to skip the code clipping
the destination rectangle.

Modified:
   trunk/libvo/vo_directx.c

Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c	Fri Sep  7 21:16:10 2012	(r35153)
+++ trunk/libvo/vo_directx.c	Fri Sep  7 21:27:44 2012	(r35154)
@@ -476,8 +476,14 @@ static uint32_t Directx_ManageDisplay(vo
     rd.right  = rd.left + width;
     rd.bottom = rd.top + height;
 
+    if(nooverlay) {
+        g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window);
+        // For nooverlay we are done, the blitter can handle
+        // a destination RECT larger than the window.
+        return 0;
+    }
     /*ok, let's workaround some overlay limitations*/
-    if (!nooverlay) {
+    {
         uint32_t uStretchFactor1000;                 //minimum stretch
         uint32_t xstretch1000, ystretch1000;
 
@@ -564,8 +570,6 @@ static uint32_t Directx_ManageDisplay(vo
             dwUpdateFlags |= DDOVER_KEYDESTOVERRIDE;
         else if (!tmp_image)
             vo_ontop = 1;
-    } else {
-        g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window);
     }
 
     /*make sure the overlay is inside the screen*/
@@ -574,10 +578,7 @@ static uint32_t Directx_ManageDisplay(vo
     rd.bottom = FFMIN(rd.bottom, vo_screenheight);
     rd.right  = FFMIN(rd.right,  vo_screenwidth);
 
-    /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/
-    if (nooverlay)
-        return 0;
-
+    /* Now reconfigure/show the overlay */
 //    printf("overlay: %i %i %ix%i\n",rd.left,rd.top,rd.right - rd.left,rd.bottom - rd.top);
     ddrval = g_lpddsOverlay->lpVtbl->UpdateOverlay(g_lpddsOverlay, &rs, g_lpddsPrimary, &rd, dwUpdateFlags, &ovfx);
     if (FAILED(ddrval)) {


More information about the MPlayer-cvslog mailing list