[vlc-devel] [PATCH] dxva2_deinterlace: better attempt to match settings with available modes
Steve Lhomme
robux4 at videolabs.io
Mon Jul 3 11:28:38 CEST 2017
The DXVA2 modes don't match exactly the software algorithms but try to get as
close as possible.
---
modules/video_output/win32/dxva2_deinterlace.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/dxva2_deinterlace.c b/modules/video_output/win32/dxva2_deinterlace.c
index 520fc29ac9..e17dfff964 100644
--- a/modules/video_output/win32/dxva2_deinterlace.c
+++ b/modules/video_output/win32/dxva2_deinterlace.c
@@ -313,7 +313,10 @@ static int Open(vlc_object_t *obj)
if ( FAILED(hr) || !caps.DeinterlaceTechnology )
continue;
- unsigned score = (caps.DeinterlaceTechnology & p_mode->i_mode) ? 10 : 1;
+ unsigned score = (caps.DeinterlaceTechnology & p_mode->i_mode) ? 5 : 1;
+ if ( ( caps.NumBackwardRefSamples || caps.NumForwardRefSamples ) ==
+ p_mode->settings.b_use_frame_history )
+ score += 4;
if (best_score < score) {
best_score = score;
best_caps = caps;
@@ -359,10 +362,10 @@ static int Open(vlc_object_t *obj)
InitDeinterlacingContext( &sys->context );
+ msg_Dbg( filter, "using %s deinterlace method", p_mode->psz_mode );
sys->context.settings = p_mode->settings;
sys->context.settings.b_use_frame_history = best_caps.NumBackwardRefSamples != 0 ||
best_caps.NumForwardRefSamples != 0;
- assert(sys->context.settings.b_use_frame_history == p_mode->settings.b_use_frame_history);
if (sys->context.settings.b_double_rate)
sys->context.pf_render_ordered = RenderPic;
else
--
2.12.1
More information about the vlc-devel
mailing list