[PATCH] iWMMXt support was Re: [Ffmpeg-devel] iWMMXt support

Måns Rullgård mans
Thu Mar 15 00:03:33 CET 2007


Tim Chick <chick at computergeek.freeserve.co.uk> writes:

> On Wednesday 14 March 2007 22:52, M?ns Rullg?rd wrote:
>> Tim Chick <chick at computergeek.freeserve.co.uk> writes:
>> > On Wednesday 14 March 2007 18:47, M?ns Rullg?rd wrote:
>> > Index: libavcodec/armv4l/dsputil_iwmmxt.c
>> > ===================================================================
>> > --- libavcodec/armv4l/dsputil_iwmmxt.c	(revision 8407)
>> > +++ libavcodec/armv4l/dsputil_iwmmxt.c	(working copy)
>> > @@ -132,7 +132,10 @@
>> >
>> >  int mm_support(void)
>> >  {
>> > -    return 0; /* TODO, implement proper detection */
>> > +    /* A run time test is not simple. If this file is compiled in
>> > +     * then we should install the functions
>> > +     */
>> > +    return MM_IWMMXT; /* TODO, implement proper detection */
>> >  }
>>
>> Why not get rid of that function completely?
>
> 'Cause it's not "my code" and I was trying to change it as little as
> possible :-) Also, it's a good placeholder for where the run-time
> checking might one day go? The other architectures have a similar
> function to do run time checking. If you think it's best to get rid
> of it I'll happily generate another patch.

Feature detection can only be done with privileged instructions on
ARM.  As OS might provide some facility to determine CPU features, but
it would be non-standard.  Until such facilities exist, and we want to
use them, we might as well keep the code clean from placeholders like
this.  It's simple enough to add it back later should the need arise.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list