[FFmpeg-devel] [PATCH] lavfi/volume: add dynamic expression evaluation

Stefano Sabatini stefasab at gmail.com
Mon Dec 23 18:02:54 CET 2013

On date Tuesday 2013-03-05 22:51:33 +0100, Stefano Sabatini encoded:
> On date Tuesday 2013-03-05 18:10:45 +0100, Stefano Sabatini encoded:
> > I'm trying to implement av_expr_is_const() (and trying to clean up
> > eval code a bit at the same time).
> And here there is a problem. In case I have something like this:
> foo(100);
> assuming the function is constant (and there is no way to know in case
> it is an user function), then the evaluation is obviously constant.
> OTOH if we have:
> foo(W+X)
> we don't know which parameters we assume are going to change (which
> really depends on the implementation, if the parameters are reset
> after one evaluation and the next one).
> So av_expr_is_const() doesn't seem like a viable choice (unless I'm
> missing something), because it helps only in a few trivial cases,
> when no custom functions and no variables are used in the expression.
> In this specific case the best solutions seem to implement a mode
> which forces re-evaluation for each frame.

Updated with a solution similar to that of overlay. I don't plan to
implement the av_expr_is_const() thing, and will probably push this
variant unless there are objections.

Comments are welcome.
FFmpeg = Free & Funny Magnificient Proud Elected Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-volume-support-volume-expression-and-per-frame.patch
Type: text/x-diff
Size: 12263 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131223/4d4754c3/attachment.bin>

More information about the ffmpeg-devel mailing list