[FFmpeg-devel] [PATCH v1] Bug #8027 - Wrong result for FFSIGN(0)

Hendrik Leppkes h.leppkes at gmail.com
Wed Jul 17 11:12:08 EEST 2019


On Wed, Jul 17, 2019 at 9:55 AM Ulf Zibis <Ulf.Zibis at cosoco.de> wrote:
>
>
> Am 17.07.19 um 08:57 schrieb Song, Ruiling:
> > Why do you think FFSIGN(0.0) should return +1?
> Because anyone I ask including mathematicians, is the opinion that the
> sign of 0 is positive.

It really doesn't matter what anyone else thinks, the macro was
defined the way it  is, and changing it now has a chance of breaking
random places that rely on the current behavior.

>
> > What issue do you meet?
>
> I wanted to use the macro in my code, but with the current behaviour it
> is worthless.
>

Any macro starting with FF is technically internal to FFmpeg and
should not be relied upon by external software.
Furthermore, this macro is so extremely simple, you can just make your
own with no overhead or issues, if this one does not suit your needs.

- Hendrik


More information about the ffmpeg-devel mailing list