Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • Thrillseekr/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
400 results
Show changes
Commits on Source (3)
  • Romain Vimont's avatar
    deinterlace: fail on unknown mode · a5b4903d
    Romain Vimont authored and Romain Vimont's avatar Romain Vimont committed
    This will allow to try an alternate deinterlace filter (for example
    an OpenGL filter).
    a5b4903d
  • Romain Vimont's avatar
    deinterlace: add --deinterlace-filter option · 4de0b416
    Romain Vimont authored and Romain Vimont's avatar Romain Vimont committed
    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
    4de0b416
  • Romain Vimont's avatar
    opengl: add blend deinterlace filter · 8ef60b3b
    Romain Vimont authored and Romain Vimont's avatar Romain Vimont committed
    8ef60b3b
......@@ -188,6 +188,25 @@ endif
libdeinterlace_plugin_la_LIBADD = libdeinterlace_common.la
video_filter_LTLIBRARIES += libdeinterlace_plugin.la
libglblend_plugin_la_SOURCES = video_filter/deinterlace/glblend.c
libglblend_plugin_la_CFLAGS = $(AM_CFLAGS)
if HAVE_GL
libglblend_plugin_la_LIBADD = libvlc_opengl.la
video_filter_LTLIBRARIES += libglblend_plugin.la
endif
if HAVE_IOS
libglblend_plugin_la_LIBADD = libvlc_opengles.la
libglblend_plugin_la_CFLAGS += -DUSE_OPENGL_ES2=1
video_filter_LTLIBRARIES += libglblend_plugin.la
endif
if HAVE_ANDROID
libglblend_plugin_la_LIBADD = libvlc_opengles.la
libglblend_plugin_la_CFLAGS += -DUSE_OPENGL_ES2=1
video_filter_LTLIBRARIES += libglblend_plugin.la
endif
libopencv_wrapper_plugin_la_SOURCES = video_filter/opencv_wrapper.c
libopencv_wrapper_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENCV_CFLAGS)
libopencv_wrapper_plugin_la_LIBADD = $(OPENCV_LIBS)
......
......@@ -373,7 +373,7 @@ static struct filter_mode_t filter_mode [] = {
* @param mode Desired method. See mode_list for available choices.
* @see mode_list
*/
static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
static int SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
{
filter_sys_t *p_sys = p_filter->p_sys;
......@@ -388,25 +388,23 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
{
msg_Err( p_filter, "unknown or incompatible deinterlace mode \"%s\""
" for packed format", mode );
SetFilterMethod( p_filter, "blend", pack );
return;
return SetFilterMethod( p_filter, "blend", pack );
}
if( p_sys->chroma->pixel_size > 1 && !filter_mode[i].b_high_bit_depth )
{
msg_Err( p_filter, "unknown or incompatible deinterlace mode \"%s\""
" for high depth format", mode );
SetFilterMethod( p_filter, "blend", pack );
return;
return SetFilterMethod( p_filter, "blend", pack );
}
msg_Dbg( p_filter, "using %s deinterlace method", mode );
p_sys->context.settings = filter_mode[i].settings;
p_sys->context.pf_render_ordered = filter_mode[i].pf_render_ordered;
return;
return VLC_SUCCESS;
}
}
msg_Err( p_filter, "unknown deinterlace mode \"%s\"", mode );
return VLC_EGENERIC;
}
/**
......@@ -541,7 +539,13 @@ notsupp:
config_ChainParse( p_filter, FILTER_CFG_PREFIX, ppsz_filter_options,
p_filter->p_cfg );
char *psz_mode = var_InheritString( p_filter, FILTER_CFG_PREFIX "mode" );
SetFilterMethod( p_filter, psz_mode, packed );
int ret = SetFilterMethod( p_filter, psz_mode, packed );
if (ret != VLC_SUCCESS)
{
free(psz_mode);
free(p_sys);
return ret;
}
IVTCClearState( p_filter );
......
/*****************************************************************************
* glblend.c
*****************************************************************************
* Copyright (C) 2021 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_picture.h>
#include <vlc_plugin.h>
#include <vlc_modules.h>
#include <vlc_opengl.h>
#include <vlc_filter.h>
#include "video_output/opengl/filter.h"
#include "video_output/opengl/gl_api.h"
#include "video_output/opengl/gl_common.h"
#include "video_output/opengl/gl_util.h"
struct sys {
GLuint program_id;
GLuint vbo;
struct {
GLint vertex_pos;
GLint height;
} loc;
};
static int
Draw(struct vlc_gl_filter *filter, const struct vlc_gl_input_meta *meta)
{
struct sys *sys = filter->sys;
const opengl_vtable_t *vt = &filter->api->vt;
vt->UseProgram(sys->program_id);
struct vlc_gl_sampler *sampler = vlc_gl_filter_GetSampler(filter);
vlc_gl_sampler_Load(sampler);
vt->BindBuffer(GL_ARRAY_BUFFER, sys->vbo);
vt->EnableVertexAttribArray(sys->loc.vertex_pos);
vt->VertexAttribPointer(sys->loc.vertex_pos, 2, GL_FLOAT, GL_FALSE, 0,
(const void *) 0);
GLsizei height = sampler->tex_heights[meta->plane];
vt->Uniform1f(sys->loc.height, height);
vt->Clear(GL_COLOR_BUFFER_BIT);
vt->DrawArrays(GL_TRIANGLE_STRIP, 0, 4);
return VLC_SUCCESS;
}
static void
Close(struct vlc_gl_filter *filter)
{
struct sys *sys = filter->sys;
const opengl_vtable_t *vt = &filter->api->vt;
vt->DeleteProgram(sys->program_id);
vt->DeleteBuffers(1, &sys->vbo);
free(sys);
}
static int
Open(struct vlc_gl_filter *filter, const config_chain_t *config,
struct vlc_gl_tex_size *size_out)
{
(void) config;
(void) size_out;
struct sys *sys = filter->sys = malloc(sizeof(*sys));
if (!sys)
return VLC_EGENERIC;
static const struct vlc_gl_filter_ops ops = {
.draw = Draw,
.close = Close,
};
filter->ops = &ops;
filter->config.filter_planes = true;
struct vlc_gl_sampler *sampler = vlc_gl_filter_GetSampler(filter);
static const char *const VERTEX_SHADER =
"attribute vec2 vertex_pos;\n"
"varying vec2 tex_coords;\n"
"varying vec2 tex_coords_up;\n"
"uniform float height;\n"
"void main() {\n"
" gl_Position = vec4(vertex_pos, 0.0, 1.0);\n"
" tex_coords = vec2((vertex_pos.x + 1.0) / 2.0,\n"
" (vertex_pos.y + 1.0) / 2.0);\n"
" tex_coords_up = vec2(tex_coords.x,\n"
" tex_coords.y + 1.0 / height);\n"
"}\n";
static const char *const FRAGMENT_SHADER =
"varying vec2 tex_coords;\n"
"varying vec2 tex_coords_up;\n"
"void main() {\n"
" vec4 pix = vlc_texture(tex_coords);\n"
" vec4 pix_up = vlc_texture(tex_coords_up);\n"
" gl_FragColor = (pix + pix_up) / 2.0;\n"
"}\n";
const char *shader_version;
const char *shader_precision;
if (filter->api->is_gles)
{
shader_version = "#version 100\n";
shader_precision = "precision highp float;\n";
}
else
{
shader_version = "#version 120\n";
shader_precision = "";
}
const char *extensions = sampler->shader.extensions
? sampler->shader.extensions : "";
const opengl_vtable_t *vt = &filter->api->vt;
const char *vertex_shader[] = { shader_version, VERTEX_SHADER };
const char *fragment_shader[] = {
shader_version,
extensions,
shader_precision,
sampler->shader.body,
FRAGMENT_SHADER,
};
GLuint program_id =
vlc_gl_BuildProgram(VLC_OBJECT(filter), vt,
ARRAY_SIZE(vertex_shader), vertex_shader,
ARRAY_SIZE(fragment_shader), fragment_shader);
if (!program_id)
goto error;
vlc_gl_sampler_FetchLocations(sampler, program_id);
sys->program_id = program_id;
sys->loc.vertex_pos = vt->GetAttribLocation(program_id, "vertex_pos");
assert(sys->loc.vertex_pos != -1);
sys->loc.height = vt->GetUniformLocation(program_id, "height");
assert(sys->loc.height != -1);
vt->GenBuffers(1, &sys->vbo);
static const GLfloat vertex_pos[] = {
-1, 1,
-1, -1,
1, 1,
1, -1,
};
vt->BindBuffer(GL_ARRAY_BUFFER, sys->vbo);
vt->BufferData(GL_ARRAY_BUFFER, sizeof(vertex_pos), vertex_pos,
GL_STATIC_DRAW);
vt->BindBuffer(GL_ARRAY_BUFFER, 0);
return VLC_SUCCESS;
error:
free(sys);
return VLC_EGENERIC;
}
static int OpenVideoFilter(vlc_object_t *obj)
{
filter_t *filter = (filter_t*)obj;
char *mode = var_InheritString(obj, "deinterlace-mode");
bool is_supported = !mode
|| !strcmp(mode, "auto")
|| !strcmp(mode, "blend");
free(mode);
if (!is_supported)
return VLC_EGENERIC;
const config_chain_t *prev_chain = filter->p_cfg;
var_Create(filter, "opengl-filter", VLC_VAR_STRING);
var_SetString(filter, "opengl-filter", "glblend");
filter->p_cfg = NULL;
module_t *module = module_need(obj, "video filter", "opengl", true);
filter->p_cfg = prev_chain;
var_Destroy(filter, "opengl-filter");
if (module == NULL)
return VLC_EGENERIC;
return VLC_SUCCESS;
}
vlc_module_begin()
set_shortname("blend")
set_description("OpenGL blend deinterlace filter")
set_category(CAT_VIDEO)
set_subcategory(SUBCAT_VIDEO_VFILTER)
set_capability("video filter", 0)
set_callback(OpenVideoFilter)
add_shortcut("glblend")
add_submodule()
set_capability("opengl filter", 0)
set_callback(Open)
add_shortcut("glblend")
vlc_module_end()
......@@ -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)
......
......@@ -73,6 +73,7 @@ static int DeinterlaceCallback(vlc_object_t *object, char const *cmd,
const bool is_needed = var_GetBool(vout, "deinterlace-needed");
if (!mode || !DeinterlaceIsModeValid(mode))
{
msg_Err(vout, "unknown deinterlace mode %s", mode);
free(mode);
return VLC_EGENERIC;
}
......
......@@ -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);
}
}
......