Hi,

On Sat, Aug 18, 2012 at 11:09 PM, Anton Khirnov <[email protected]> wrote:
>
> On Sat, 18 Aug 2012 22:32:15 -0700, "Ronald S. Bultje" <[email protected]> 
> wrote:
>> From: "Ronald S. Bultje" <[email protected]>
>>
>> ---
>>  libavcodec/aacdec.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
>> index 1c59ec5..bf99cc3 100644
>> --- a/libavcodec/aacdec.c
>> +++ b/libavcodec/aacdec.c
>> @@ -1257,9 +1257,10 @@ static inline float *VMUL4S(float *dst, const float 
>> *v, unsigned idx,
>>                              unsigned sign, const float *scale)
>>  {
>>      unsigned nz = idx >> 12;
>> -    union av_intfloat32 s = { .f = *scale };
>> +    union av_intfloat32 s;
>>      union av_intfloat32 t;
>>
>> +    s.f = *scale;
>>      t.i = s.i ^ (sign & 1U<<31);
>>      *dst++ = v[idx    & 3] * t.f;
>>
>
> Please, stop those euphemisms. I'm sure the actual reason for this patch is 
> not
> simplifying the code, but making it parsable by msvc. In that case, just say 
> so.
> Obscuring the purpose is not helping anyone.
>
> Also, I wonder why is this needed. Your converter can do this replacement for
> structs, can't it trivially do the same for unions?

OK, so apparently no flames, so fine, I propose I amend the commit msg
saying that "this aids in compilation with compilers that have
limitations, such as MSVC." Is that better?

I'm sure there's ways to write some sort of a converter to do some
kind of source code conversion to sort of hack around this and make it
sort-of work in some cases but not others (think static const union
assignments). I welcome patches that assist in accomplishing this
goal, and encourage you to send one, or contribute ideas on how to get
there.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to