On 04/12/2012 07:28 AM, Diego Biurrun wrote:

> On Wed, Apr 11, 2012 at 02:26:01PM -0400, Justin Ruggles wrote:
>> On 04/10/2012 05:17 PM, Diego Biurrun wrote:
>>> On Mon, Apr 09, 2012 at 05:27:52PM -0400, Justin Ruggles wrote:
>> [...]
>>>> +AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr,
>>>> +                                     enum AVSampleFormat out_fmt,
>>>> +                                     enum AVSampleFormat in_fmt,
>>>> +                                     int channels)
>>>> +{
>>>> +
>>>> +    if (HAVE_MMX)
>>>> +        ff_audio_convert_init_x86(ac);
>>>
>>> There is no dependency on MMX there and these are implementation details.
>>> Please check for ARCH_X86 instead.
>>
>> What do you mean there is no dependency on MMX? That's why we use
>> OBJS-$(HAVE_MMX) in the Makefile. There really is no point in adding
>> optimized functions for x86 in this case if building with MMX support is
>> disabled. We don't have a need for non-SIMD x86 assembly optimizations
>> in this library.
> 
> Sorry, I realize what I wrote was more confusing than anything else.
> 
> I've been discussing this with Mans a while back - the C code should not
> have to concern itself with the type of arch-specific optimization that
> is being done.  These are implementation details of the arch-specific
> code.  It's cleaner to just check for ARCH_X86/ARCH_ARM/... and then
> let the arch init code figure out further details.
> 
> And yes, it's done different all over the place, especially in libavcodec,
> but given that libavresample is a fresh library, it's a good opportunity
> to start with a cleaner design for arch optimizations.


Ah, I see. So would we also use OBJS-$(ARCH_X86) for the "init" files in
the arch-specific Makefile?

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

Reply via email to