[FFmpeg-devel] [PATCH 3/3] lavu/rational: add more info regarding floor(x+0.5) usage

Ganesh Ajjanagadde gajjanag at gmail.com
Sat Feb 27 14:27:57 CET 2016


On Thu, Feb 25, 2016 at 8:56 AM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 2/25/2016 2:20 AM, Ganesh Ajjanagadde wrote:
>> -    // (int64_t)rint() and llrint() do not work with gcc on ia64 and sparc64
>> +    // (int64_t)rint() and llrint() do not work with gcc on ia64 and sparc64,
>> +    // see Ticket2713 for affected gcc/glibc versions
>
> I've never seen this comment before, but it makes me wonder: how the heck do these
> functions work in the rest of the codebase?

I can only speculate here. They may not work in the rest of the
codebase, but here they cause FATE regressions as per the ticket. For
example, an incorrect llrint in the middle of some computation,
although inconvenient, may not lead to wrong output as measured by
FATE.

For example, git grep -n 'llrint' (or '<\rint') don't yield many
interesting hits.

As for why these platforms have incorrect llrint, note on x86 it is
trivial to write llrint; it just uses cvttsd2si (or some instruction
like that). Maybe on sparc there is no equivalent opcode, forcing
software emulation that is not trivial.

BTW, if you think the above speculation is reasonable and useful, I
can amend the comment (or perhaps better the patch notes) accordingly.

>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list