[vlc-commits] Revert "direct3d9: use point interpolation rather than none"
Hugo Beauzée-Luyssen
git at videolan.org
Wed Apr 5 19:31:02 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Mar 31 16:02:33 2017 +0200| [f25f9aa7a1231834efd95d92e9a202bb8cb652c6] | committer: Hugo Beauzée-Luyssen
Revert "direct3d9: use point interpolation rather than none"
This reverts commit d0b92b9b4d35a39589a6c58247f307e95cc78140.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f25f9aa7a1231834efd95d92e9a202bb8cb652c6
---
modules/video_output/win32/direct3d9.c | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 16b0678..ae0c693 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -127,9 +127,6 @@ struct vout_display_sys_t
D3DPRESENT_PARAMETERS d3dpp;
bool use_d3d9ex;
- D3DTEXTUREFILTERTYPE minFilter;
- D3DTEXTUREFILTERTYPE magFilter;
-
// scene objects
LPDIRECT3DTEXTURE9 d3dtex;
LPDIRECT3DVERTEXBUFFER9 d3dvtc;
@@ -1297,27 +1294,19 @@ static int Direct3D9CreateScene(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 ( is_d3d9_opaque(vd->source.i_chroma) &&
- 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 ( is_d3d9_opaque(vd->source.i_chroma) &&
- 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
@@ -1669,14 +1658,7 @@ static int Direct3D9ImportPicture(vout_display_t *vd,
/* Copy picture surface into texture surface
* color space conversion happen here */
- D3DTEXTUREFILTERTYPE filterType;
- if (sys->sys.rect_src_clipped.right < sys->sys.rect_dest_clipped.right)
- filterType = sys->magFilter;
- else if (sys->sys.rect_src_clipped.right > sys->sys.rect_dest_clipped.right)
- filterType = sys->minFilter;
- else
- filterType = D3DTEXF_NONE;
- hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, &sys->sys.rect_src_clipped, destination, NULL, filterType );
+ hr = IDirect3DDevice9_StretchRect(sys->d3ddev, source, &vd->sys->sys.rect_src_clipped, destination, NULL, D3DTEXF_NONE );
IDirect3DSurface9_Release(destination);
if (FAILED(hr)) {
msg_Dbg(vd, "Failed IDirect3DDevice9_StretchRect: source 0x%p 0x%0lx",
More information about the vlc-commits
mailing list