[MPlayer-dev-eng] [RFC] skipping video filters

Rich Felker dalias at aerifal.cx
Thu Nov 23 22:50:40 CET 2006


On Thu, Nov 23, 2006 at 07:57:14PM +0100, Reimar Döffinger wrote:
> Hello,
> attached is a code fragment that would add a skip_filter variable to the
> vf instance, which when set would just cause the put_image be skipped.
> I wondered if you think this makes sense and will work with enough
> filters so that applying this together with a slave command to
> set/remove this flag would make sense...
> 
> Greetings,
> Reimar Döffinger

> Index: libmpcodecs/vf.c
> ===================================================================
> --- libmpcodecs/vf.c	(revision 21180)
> +++ libmpcodecs/vf.c	(working copy)
> @@ -668,7 +672,9 @@
>  }
>  
>  int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts){
> -    return vf->next->put_image(vf->next,mpi, pts);
> +    vf = vf->next;
> +    while (vf->skip_filter) vf = vf->next;
> +    return vf->put_image(vf,mpi, pts);
>  }

This is absolutely not acceptable. The configuration between filters
is ONLY valid between that actual pair of filters. The output of
filter N is only acceptable to filter N+1; there's no reason to
believe it should be acceptable to filter N+2 or filter N+k for any
k>1.

Trying to force this will lead to very nasty crashes unless you can
ensure that skipping can only be enabled when in/out format are
identical and when no slices/dr is in use.

Rich




More information about the MPlayer-dev-eng mailing list