[FFmpeg-devel] [PATCH] Add ppc/fmtconvert_ppc.c to fix compilation for PPC without Altivec.
Måns Rullgård
mans
Sat Mar 5 13:42:57 CET 2011
"Ronald S. Bultje" <rsbultje at gmail.com> writes:
> Hi,
>
> On Sat, Mar 5, 2011 at 6:15 AM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
>>> + ? ?int mm_flags = av_get_cpu_flags();
>>> +
>>> + ? ?if (mm_flags & AV_CPU_FLAG_ALTIVEC && HAVE_ALTIVEC) {
>>
>> Is there any point to it? As far as I know as soon as
>> HAVE_ALTIVEC is set the code will crash on non-altivec
>> anyway so the av_get_cpu_flags is just confusing because
>> it pretends that something will work that does not at all.
>
> On some systems (e.g. Darwin, I believe) it returns valid flags. On
> others it's a dummy.
On Linux uses mfspr to check for altivec support if RUNTIME_CPUDETECT is
enabled. However, with the compiler flags we use, the compiler is free
to use altivec code anywhere it pleases, so the detection is rather
pointless.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list