[FFmpeg-devel] [PATCH] enable runtime-cpudetect in configure

Michael Niedermayer michaelni
Mon Apr 6 03:10:00 CEST 2009


On Sun, Apr 05, 2009 at 09:34:41PM -0300, Ramiro Polla wrote:
> On Sun, Apr 5, 2009 at 9:08 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> > 2009/4/5 M?ns Rullg?rd <mans at mansr.com>:
> >> Ramiro Polla <ramiro.polla at gmail.com> writes:
> >>> 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?
> >
> > Yes. Regression tests always pass and there is no difference in the
> > object files.
> 
> And here's an updated patch for swscale, since the previously attached
> one depends on patches that got rejected/will take longer to be
> accepted.

ok, also note this might need changes in mplayers configure

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090406/71c62a0f/attachment.pgp>



More information about the ffmpeg-devel mailing list