On 11/04/2011 08:48 PM, Stefano Sabatini wrote:
> On date Wednesday 2011-11-02 21:22:41 +0100, Thomas Kühnel encoded:
>> On 27.10.2011 23:44, Stefano Sabatini wrote:
>>> On date Sunday 2011-10-23 22:12:01 +0200, Thomas Kühnel encoded:
>>>> Updated.
>> [...]
>>
>>>> +static double tget_double(const uint8_t **p, int le){
>>>> + av_alias64 i = { .u64 = le ? AV_RL64(*p) : AV_RB64(*p)};
>>>> + *p += 8;
>>>> + return i.f64;
>>>> +}
>>> is type "double" guaranteed to be always 64 bits on all platforms?
>>>
>> Well doubles in a TIFF file are always 64 bit long, but there is
>> nothing about the length of the double type in the C spec.
>
> Yet most implementation are conforming to IEE 754 double-precision
> format, which is assumed by Tiff specification. I'm not aware of
> non-conforming platforms, but maybe someone can give advices (in the
> worst case it might be safe to disable this code in case
> platform/compiler doesn't support it, but I don't think there is a
> real-world use case for this).
I'm pretty sure many things in Libav would fail on such a system. But if
one is paranoid about obscure portability, I suppose av_int2dbl() could
be used.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel