Commit 4de0b416 authored by Romain Vimont's avatar Romain Vimont Committed by Romain Vimont
Browse files

deinterlace: add --deinterlace-filter option

The option --deinterlace-mode selects the deinterlace algorithm to use,
but the same algorithm might be implemented by several modules, for
example a CPU version and an OpenGL version.

For that purpose, add a separate option to select the module(s) to use.
The default value is "deinterlace".

To select the blend deinterlace algorithm:

    --deinterlace-mode=blend

or equivalently ("deinterlace" is the default filter):

    --deinterlace-filter=deinterlace --deinterlace-mode=blend

To run the OpenGL version (the mode is "auto"):

    --deinterlace-filter=glblend

The module glblend only implements the "blend" algorithm, it can be
passed explicitly:

    --deinterlace-filter=glblend --deinterlace-mode=blend

To pass a list a modules, executed in order until one works:

    --deinterlace-filter=glblend,deinterlace --deinterlace-mode=blend
parent a5b4903d
......@@ -373,6 +373,9 @@ static const char * const ppsz_deinterlace_mode_text[] = {
N_("Film NTSC (IVTC)")
};
#define DEINTERLACE_FILTER_TEXT N_("Deinterlace filter")
#define DEINTERLACE_FILTER_LONGTEXT N_("Deinterlace module to use.")
static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
......@@ -1715,6 +1718,9 @@ vlc_module_begin ()
DEINTERLACE_MODE_TEXT, DEINTERLACE_MODE_LONGTEXT )
change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text )
change_safe()
add_string( "deinterlace-filter", "deinterlace",
DEINTERLACE_FILTER_TEXT, DEINTERLACE_FILTER_LONGTEXT )
change_safe()
set_subcategory( SUBCAT_VIDEO_VOUT )
add_module("vout", "vout display", NULL, VOUT_TEXT, VOUT_LONGTEXT)
......
......@@ -859,7 +859,9 @@ static void ThreadChangeFilters(vout_thread_sys_t *vout)
if (likely(e))
{
free(config_ChainCreate(&e->name, &e->cfg, "deinterlace"));
char *filter = var_InheritString(&vout->obj, "deinterlace-filter");
free(config_ChainCreate(&e->name, &e->cfg, filter));
free(filter);
vlc_array_append_or_abort(&array_static, e);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment