[FFmpeg-devel] [PATCH] enable runtime-cpudetect in configure
Måns Rullgård
mans
Mon Apr 6 00:32:56 CEST 2009
Ramiro Polla <ramiro.polla at gmail.com> writes:
> Hi,
>
> Enable runtime-cpudetection in configure so that other projects don't
> have to use the --extra-cflags=-DRUNTIME_CPUDETECT hack.
> Also applies it to swscale.
>
> This can then be used, like Michael suggested, in dsputils as well to
> save on binary size.
>
> And then there's the issue that with runtime cpu detection, swscale
> expects the use to pass the appropriate sws_flags. Shouldn't ffmpeg.c
> use mm_support() and set those flags?
>
> Ramiro Polla
>
>
> From f9b99c86386b21984c9b409654f8fa4f363d9149 Mon Sep 17 00:00:00 2001
> From: ramiro <ramiro at ramiro-q6600.(none)>
> Date: Sun, 5 Apr 2009 01:34:26 -0300
> Subject: [PATCH] enable runtime-cpudetect in configure
>
> ---
> configure | 3 +++
> libavcodec/ppc/check_altivec.c | 2 +-
> libpostproc/postprocess.c | 14 +++++++-------
> 3 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/configure b/configure
> index a9cc2fd..eae40c6 100755
> --- a/configure
> +++ b/configure
> @@ -100,6 +100,7 @@ show_help(){
> echo " --disable-golomb disable Golomb code"
> echo " --disable-mdct disable MDCT code"
> echo " --disable-rdft disable RDFT code"
> + echo " --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)"
> echo " --enable-hardcoded-tables use hardcoded tables instead of runtime generation"
> echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
> echo " --enable-beos-netserver enable BeOS netserver"
> @@ -806,6 +807,7 @@ CONFIG_LIST="
> postproc
> powerpc_perf
> rdft
> + runtime_cpudetect
> shared
> small
> static
> @@ -2282,6 +2284,7 @@ if test "$extra_version" != ""; then
> echo "version string suffix $extra_version"
> fi
> echo "big-endian ${bigendian-no}"
> +echo "runtime cpu detection ${runtime_cpudetect-no}"
> if enabled x86; then
> echo "yasm ${yasm-no}"
> echo "MMX enabled ${mmx-no}"
This parts looks OK.
The renaming throughout the code should be safe, but those files are
not mine. Did you make sure it still works with both settings?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list