[vlc-commits] Revert "direct3d9: use point interpolation rather than none"

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 6 16:38:06 CEST 2017


vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Apr  5 19:41:21 2017 +0200| [25414e56f544b635ef9c42dd890cfceab8ecfd99] | committer: Hugo Beauzée-Luyssen

Revert "direct3d9: use point interpolation rather than none"

This reverts commit ba313729689218a26b648428b80f629eeb72aa51.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=25414e56f544b635ef9c42dd890cfceab8ecfd99
---

 modules/video_output/msw/common.h   |  2 --
 modules/video_output/msw/direct3d.c | 19 +++----------------
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/modules/video_output/msw/common.h b/modules/video_output/msw/common.h
index d35b4f3..5ddf85e 100644
--- a/modules/video_output/msw/common.h
+++ b/modules/video_output/msw/common.h
@@ -154,8 +154,6 @@ struct vout_display_sys_t
     D3DCAPS9                d3dcaps;
     LPDIRECT3DDEVICE9       d3ddev;
     D3DPRESENT_PARAMETERS   d3dpp;
-    D3DTEXTUREFILTERTYPE    minFilter;
-    D3DTEXTUREFILTERTYPE    magFilter;
 
     // scene objects
     LPDIRECT3DTEXTURE9      d3dtex;
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 3d89c74..acb0fa0 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -1106,25 +1106,19 @@ static int Direct3DCreateScene(vout_display_t *vd, const video_format_t *fmt)
     IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
 
     // Set linear filtering quality
-    /* we can't use linear interpolation in software decoding, the pictures
-     * are not initialized to black */
-    if ( sys->d3dcaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFLINEAR ) {
+    if (sys->d3dcaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFLINEAR) {
         msg_Dbg(vd, "Using D3DTEXF_LINEAR for minification");
         IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
-        sys->minFilter = D3DTEXF_LINEAR;
     } else {
         msg_Dbg(vd, "Using D3DTEXF_POINT for minification");
         IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
-        sys->minFilter = D3DTEXF_POINT;
     }
-    if ( sys->d3dcaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFLINEAR ) {
+    if (sys->d3dcaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFLINEAR) {
         msg_Dbg(vd, "Using D3DTEXF_LINEAR for magnification");
         IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
-        sys->magFilter = D3DTEXF_LINEAR;
     } else {
         msg_Dbg(vd, "Using D3DTEXF_POINT for magnification");
         IDirect3DDevice9_SetSamplerState(d3ddev, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
-        sys->magFilter = D3DTEXF_POINT;
     }
 
     // set maximum ambient light
@@ -1469,14 +1463,7 @@ static int Direct3DImportPicture(vout_display_t *vd,
 
     /* Copy picture surface into texture surface
      * color space conversion happen here */
-    D3DTEXTUREFILTERTYPE filterType;
-    if (sys->rect_src_clipped.right < sys->rect_dest_clipped.right)
-        filterType = sys->magFilter;
-    else if (sys->rect_src_clipped.right > sys->rect_dest_clipped.right)
-        filterType = sys->minFilter;
-    else
-        filterType = D3DTEXF_NONE;
-    hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, &sys->rect_src_clipped, destination, NULL, filterType );
+    hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, &vd->sys->rect_src_clipped, destination, NULL, D3DTEXF_NONE );
     IDirect3DSurface9_Release(destination);
     if (FAILED(hr)) {
         msg_Dbg(vd, "%s:%d (hr=0x%0lX)", __FUNCTION__, __LINE__, hr);



More information about the vlc-commits mailing list