[FFmpeg-devel] [PATCH] AAC: type puns for 16 bit floating point rounding
Alex Converse
alex.converse
Thu Dec 4 07:03:35 CET 2008
On Wed, Dec 3, 2008 at 10:13 PM, M?ns Rullg?rd <mans at mansr.com> wrote:
> "Alex Converse" <alex.converse at gmail.com> writes:
>
>> Hi,
>>
>> Attached is the remaing patch from the AAC Main series with the
>> rounding functions rewritten as suggested to do arithmetic in the
>> integer domain rather than the floating point domain.
>>
>> A configure check has been added as suggested but I'm not happy with
>> it. Any input on this is greatly appreciated.
>>
>> Regards,
>> Alex Converse
>>
>> diff --git a/configure b/configure
>> index 605bf3f..035e939 100755
>> --- a/configure
>> +++ b/configure
>> @@ -844,6 +844,7 @@ HAVE_LIST="
>> gethrtime
>> GetProcessTimes
>> getrusage
>> + ieee754_pun
>> imlib2
>> inet_aton
>> inline_asm
>> @@ -1800,6 +1801,13 @@ EOF
>> od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
>>
>> # ---
>> +# IEEE float test
>> +check_cc <<EOF || die "IEEE float test failed"
>> +float f[3] = {218387568.0f, 218387568.0f, 218387568.0f };
>> +EOF
>> +strings $TMPO | grep -E -q 'MPEGMPEGMPEG|GEPMGEPMGEPM' && enable ieee754_pun
>
> That test isn't portable. However, I think it's safe to assume
> IEEE754 floats. I doubt anyone will ever run FFmpeg on a VAX, and
> it's already broken on Cray since we assume two's complement signed
> integers.
>
So what's the preferred behavior here? Should it just be an untested
configure flag that's on by default? Should all the non-754 code
remain at all?
--Alex
More information about the ffmpeg-devel
mailing list