On date Thursday 2023-12-28 16:00:57 +0100, Stefano Sabatini wrote: > On date Thursday 2023-12-28 12:02:59 +0100, Andreas Rheinhardt wrote: > > Stefano Sabatini: > > > This is useful to simulate random jitter. > > > --- > > > Changelog | 1 + > > > doc/filters.texi | 10 +++++++++- > > > libavfilter/setpts.c | 39 +++++++++++++++++++++++++++++++++------ > > > 3 files changed, 43 insertions(+), 7 deletions(-) [...] > > Why is this added here and not in lavu/eval so that it is available with > > all expressions? > > There is no specific reason. Sometimes you need to have a control over > the seed, in this case you need to provide the PRNG context. > > For the general case, probably we can place a global LFG in the eval > module and fetch its generated values. Another possible solution in attachment, leveraging the same affine PRNG used in random(). For other use cases you might need to use a high-quality PRNG and this might not be good enough.