[vlc-devel] [vlc-commits] hqdn3d: allow live modification of params

Ilkka Ollakka ileoo at videolan.org
Tue Oct 1 09:48:52 CEST 2013


On Sun, Sep 29, 2013 at 07:36:37PM +0200, Jean-Baptiste Kempf wrote:
> vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep 29 19:31:05 2013 +0200| [2ec43b29667c1c814f1ff793db25d9f94cf872f8] | committer: Jean-Baptiste Kempf

> hqdn3d: allow live modification of params

> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ec43b29667c1c814f1ff793db25d9f94cf872f8
> ---
> +
> +
> +static int DenoiseCallback( vlc_object_t *p_this, char const *psz_var,
> +                            vlc_value_t oldval, vlc_value_t newval,
> +                            void *p_data )
> +{
> +    VLC_UNUSED(p_this); VLC_UNUSED(oldval);
> +
> +    struct vf_priv_s *cfg = (struct vf_priv_s *)p_data;
> +
> +    if( !strcmp( psz_var, FILTER_PREFIX "luma-spat" ) )
> +        PrecalcCoefs(cfg->Coefs[0], newval.f_float);
> +    else if( !strcmp( psz_var, FILTER_PREFIX "luma-temp" ) )
> +        PrecalcCoefs(cfg->Coefs[1], newval.f_float);
> +    else if( !strcmp( psz_var, FILTER_PREFIX "chroma-spat") )
> +        PrecalcCoefs(cfg->Coefs[2], newval.f_float);
> +    else if( !strcmp( psz_var, FILTER_PREFIX "chroma-temp") )
> +        PrecalcCoefs(cfg->Coefs[3], newval.f_float);
> +
> +    return VLC_SUCCESS;
> +}

Does't this require using mutex when accessing cfg->Coefs[0..4] or is
this callback always called from same thread that calls Filter() ?


-- 
Ilkka Ollakka
Even if you do learn to speak correct English, whom are you going to speak
it to?
		-- Clarence Darrow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131001/c0c3f64f/attachment.sig>


More information about the vlc-devel mailing list