X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fdeinterlace%2Fdeinterlace.c;h=aec545a8cefc158a5e2f0aebe7a1508e606e41a6;hb=c131475c1f634f8ad55fc87250d6e6e50cbbf5e8;hp=100cc19edc56db4bad35df3847f61d6e45dcc21b;hpb=02950db17a09f58e676d72e8d02b21c88b7dccd5;p=vlc diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c index 100cc19edc..aec545a8ce 100644 --- a/modules/video_filter/deinterlace/deinterlace.c +++ b/modules/video_filter/deinterlace/deinterlace.c @@ -134,7 +134,16 @@ static const char *const ppsz_filter_options[] = { * SetFilterMethod: setup the deinterlace method to use. *****************************************************************************/ -void SetFilterMethod( filter_t *p_filter, const char *psz_method ) +/** + * Setup the deinterlace method to use. + * + * FIXME: extract i_chroma from p_filter automatically? + * + * @param p_filter The filter instance. + * @param psz_method Desired method. See mode_list for available choices. + * @see mode_list + */ +static void SetFilterMethod( filter_t *p_filter, const char *psz_method ) { filter_sys_t *p_sys = p_filter->p_sys; @@ -206,11 +215,19 @@ void SetFilterMethod( filter_t *p_filter, const char *psz_method ) msg_Dbg( p_filter, "using %s deinterlace method", psz_method ); } -/***************************************************************************** - * GetOutputFormat: return which format the chosen algorithm outputs. - *****************************************************************************/ - -void GetOutputFormat( filter_t *p_filter, +/** + * Get the output video format of the chosen deinterlace method + * for the given input video format. + * + * Note that each algorithm is allowed to specify its output format, + * which may (for some input formats) differ from the input format. + * + * @param p_filter The filter instance. + * @param[out] p_dst Output video format. The structure must be allocated by ca + * @param[in] p_src Input video format. + * @see SetFilterMethod() + */ +static void GetOutputFormat( filter_t *p_filter, video_format_t *p_dst, const video_format_t *p_src ) { filter_sys_t *p_sys = p_filter->p_sys; @@ -597,13 +614,14 @@ int Open( vlc_object_t *p_this ) if( !p_sys ) return VLC_ENOMEM; + p_sys->chroma = chroma; + 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 ); free( psz_mode ); - p_sys->chroma = chroma; for( int i = 0; i < METADATA_SIZE; i++ ) { p_sys->meta.pi_date[i] = VLC_TS_INVALID;