[FFmpeg-devel] [PATCH] lavfi/volume: add dynamic expression evaluation
nicolas.george at normalesup.org
Tue Mar 5 23:21:41 CET 2013
Le quintidi 15 ventôse, an CCXXI, Stefano Sabatini a écrit :
> And here there is a problem. In case I have something like this:
> 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:
> 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).
IMHO, the code that calls av_expr_is_const() is responsible for providing
the information: for each user variable, is it considered constant or not;
for each user function, is it pure or not.
OTOH, I agree with Clément that av_expr_is_const() returning false even
when the expression is actually constant in certain cases is acceptable.
(In fact I believe that determining if an expression is constant or not is
undecidable. So the return value of av_expr_is_const() is actually whether
the expression is obviously constant, and the only question is how much
effort to put in this "obviously".)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel