[FFmpeg-devel] [PATCH] Make mmx2 dependent on mmx/ssse3 dependent on mmx2
Måns Rullgård
mans
Fri Mar 21 18:09:13 CET 2008
Panagiotis Issaris <takis.issaris at uhasselt.be> writes:
> M?ns Rullg?rd schreef:
>> Panagiotis Issaris <takis.issaris at uhasselt.be> writes:
>>
>>> Hi,
>>>
>>> First of all, I'm not sure about this patch... The thing is, I had
>>> expected the configure script to disable mmx2 and ssse3 too when
>>> disabling mmx, which it currently doesn't do. But, that's just because
>>> I'm not aware of any machines implementing mmx2 but not mmx. Anyway,
>>> attached patch makes mmx2 dependent on mmx, likewise for ssse3 which
>>> becomes dependent on mmx2. So, with the attached patch --disable-mmx
>>> disables them all.
>>>
>>> Index: configure
>>> ===================================================================
>>> --- configure (revision 12527)
>>> +++ configure (working copy)
>>> @@ -782,8 +784,8 @@
>>> iwmmxt_deps="armv4l"
>>> mmi_deps="mips"
>>> mmx_deps="x86"
>>> -mmx2_deps="x86"
>>> -ssse3_deps="x86"
>>> +mmx2_deps="x86 mmx"
>>> +ssse3_deps="x86 mmx2"
>>> vis_deps="sparc"
>>>
>>> # decoders / encoders
>> I can imagine someone wishing to disable only mmx on an sse-capable
>> machine to save some space. If you want an option to disable all
>> assembler optimisations, it should be called something else.
>
> Yes, you're both right. How about something like the attached patch?
>
> Index: configure
> ===================================================================
> --- configure (revision 12535)
> +++ configure (working copy)
> @@ -119,6 +119,7 @@
> echo " instruction selection, may crash on older CPUs)"
> echo " --enable-powerpc-perf enable performance report on PPC"
> echo " (requires enabling PMC)"
> + echo " --disable-simd disable all SIMD usage"
> echo " --disable-mmx disable MMX usage"
> echo " --disable-mmx2 disable MMX2 usage"
> echo " --disable-ssse3 disable SSSE3 usage"
> @@ -702,6 +703,7 @@
> mmi
> mmx
> mmx2
> + simd
> ssse3
> vis
> '
> @@ -778,15 +780,15 @@
> # code dependency declarations
>
> # architecture extensions
> -altivec_deps="powerpc"
> +altivec_deps="powerpc simd"
> armv5te_deps="armv4l"
> armv6_deps="armv4l"
> -iwmmxt_deps="armv4l"
> +iwmmxt_deps="armv4l simd"
> mmi_deps="mips"
> -mmx_deps="x86"
> -mmx2_deps="x86"
> -ssse3_deps="x86"
> -vis_deps="sparc"
> +mmx_deps="x86 simd"
> +mmx2_deps="x86 simd"
> +ssse3_deps="x86 simd"
> +vis_deps="sparc simd"
I don't think SIMD is the proper qualifier. I see no reason why to
disable SIMD optimisations while keeping non-SIMD CPU-specific code
(e.g. armv5te). Either way, armv6 and mmi (iirc) are also SIMD.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list