[FFmpeg-devel] [PATCH 3/5] mathops: add [SU]DIVMOD macros

Måns Rullgård mans
Mon Apr 12 17:18:38 CEST 2010


Michael Niedermayer <michaelni at gmx.at> writes:

> On Sun, Apr 11, 2010 at 11:05:52PM +0100, Mans Rullgard wrote:
>> These macros calculate the quotient and remainder of two values. This
>> is necessary for adding workarounds for gcc failing to calculate
>> quotient and remainder simultaneously on some platforms.
>
> this code pessimization bug should be submitted to the gcc devels

Already done: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721

> and then the issue number added as comment to the code so it can be
> removed once gcc has been fixed instead of becoming another piece of
> accumulated cruft
>
> that said i suspect that all uses of this macro can be implemenetd more
> efficiently by multiplying by the inverse shifting down to get the /
> and then doing a multiply and subtract for the %

I'll see what I can do.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list