[FFmpeg-devel] [PATCH] [libavutil] Add saturated add/sub operations for int64_t.

Michael Niedermayer michael at niedermayer.cc
Wed May 6 17:03:10 EEST 2020


On Mon, May 04, 2020 at 04:06:56PM -0700, Dale Curtis wrote:
> On Mon, May 4, 2020 at 3:39 PM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > On Mon, May 04, 2020 at 02:19:47PM -0700, Dale Curtis wrote:
> > > On Mon, May 4, 2020 at 1:48 PM Michael Niedermayer
> > <michael at niedermayer.cc>
> > [...]
> >
> 
> You snipped out the example I provided, 

yes because it was messed up from linebreaks which made both variants
unreadable


> but did you have an opinion on
> which approach looked best there? I think the concept of an "eint" type is
> interesting, but is a project wide change that's a bit beyond what I can
> commit to.

yes, i didnt mean to ask you to implement that
in fact iam happy to implement it, it just seems recently i always have more
things i want to work on than what i actually succeed finding time for
so i ended up throwing the idea onto the mailing list, and if noone does implement
it before i find time, then ill probably do it

> 
> > Are you just proposing sentinel values for those extensions? E.g., +inf =
> > > INT64_MAX, -inf=-INT64_MAX, nan=INT64_MIN?
> >
> > yes
> >
> 
> Okay. Having an "eint" type for timestamps seems reasonable. Some sort of
> "AVTimestamp" type perhaps with a new class of arithmetic to handle
> operations to it. This would be similar to how we handle time in Chromium:
> https://source.chromium.org/chromium/chromium/src/+/master:base/time/time.h;l=119

yes

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200506/e21416ec/attachment.sig>


More information about the ffmpeg-devel mailing list