Justin Ruggles <[email protected]> writes:

>>> +    LOCAL_ALIGNED_16(CoefType, cpl_coords,      [AC3_MAX_BLOCKS], 
>>> [AC3_MAX_CHANNELS][16]);
>>>  #if CONFIG_AC3ENC_FLOAT
>>> -    LOCAL_ALIGNED_16(float,   cpl_coords,       [AC3_MAX_BLOCKS], 
>>> [AC3_MAX_CHANNELS][16]);
>>>     LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], 
>>> [AC3_MAX_CHANNELS][16]);
>>> +#else
>>> +#define fixed_cpl_coords cpl_coords
>>> +#endif
>> 
>> Ehw. That is a little icky and will lead to a hard-to-debug conflict
>> later on. I'm wondering if you could use something like a struct
>> (float encoder) vs union (fixed-point encoder) here instead, i.e.:
>> 
>> #if CONFIG_AC3ENC_FLOAT
>> struct {
>> #else
>> union {
>> #endif
>>     LOCAL_ALIGNED_16(CoefType, cpl_coords,      [AC3_MAX_BLOCKS],
>> [AC3_MAX_CHANNELS][16]);
>>     LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS],
>> [AC3_MAX_CHANNELS][16]);
>> } someprefix;
>
> Yeah, I know it's pretty ugly. I didn't think of a union/struct combo.
> It also seems out-of-the-ordinary, but at least it's C and not
> pre-processor trickery. I'll give it a try.

What about simply int32_t *fixed_cpl_coords = cpl_coords?

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to