From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] lavfi/setpts: introduce rand() function in expression
Date: Thu, 28 Dec 2023 22:25:08 +0100
Message-ID: <20231228212508.GZ6420@pb2> (raw)
In-Reply-To: <ZY3DLvfTtBQ2nipR@mariano>
[-- Attachment #1.1: Type: text/plain, Size: 1771 bytes --]
On Thu, Dec 28, 2023 at 07:49:18PM +0100, Stefano Sabatini wrote:
> 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.
> eval.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
> 94413dcc88e3046b4987715f6c152aeb1c24c703 0001-lavu-eval-add-randomi-function-to-compute-random-val.patch
> From 4dc5213b0913a2585f75dfd03b497ca2efc093de Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab@gmail.com>
> Date: Thu, 28 Dec 2023 19:09:22 +0100
> Subject: [PATCH] lavu/eval: add randomi function to compute random value in
> interval
probably ok if this is usefull
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Never trust a computer, one day, it may think you are the virus. -- Compn
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-12-28 21:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 0:38 Stefano Sabatini
2023-12-28 11:02 ` Andreas Rheinhardt
2023-12-28 15:00 ` Stefano Sabatini
2023-12-28 18:49 ` Stefano Sabatini
2023-12-28 21:25 ` Michael Niedermayer [this message]
2023-12-29 11:51 ` Stefano Sabatini
2024-01-02 21:12 ` Stefano Sabatini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231228212508.GZ6420@pb2 \
--to=michael@niedermayer.cc \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git