[FFmpeg-devel] [PATCH] Add ability to turn off yasm from the command line

Måns Rullgård mans
Thu Feb 5 00:29:14 CET 2009


Art Clarke <aclarke at xuggle.com> writes:

> This is useful if you have yasm in your path, but don't want to have
> FFMPEG use it (for example, you want libx264 to use yasm, but not
> ffmpeg).  The need for this came up while working around the x86_64
> Mac-OS issue I just submitted another patch for.
>
> For this patch I normalized check_yasm to work like check_asm.
>
> Tested this fix on Mac OS-X in all combinations of:
>  - yasm available / not-available on path
>  - --disable-yasm specified / not-specified to configure
>
> - Art
>
> -- 
> http://www.xuggle.com/
> xu?ggle (z?' gl) v. To freely encode, decode, and experience audio and video.
>
> Use Xuggle to get the power of FFMPEG in Java.
>
> Index: configure
> ===================================================================
> --- configure	(revision 16989)
> +++ configure	(working copy)
> @@ -207,6 +207,7 @@
>    echo "  --disable-mmi            disable MMI optimizations"
>    echo "  --disable-neon           disable neon optimizations"
>    echo "  --disable-vis            disable VIS optimizations"
> +  echo "  --disable-yasm           disable yasm"
>    echo
>    echo "Developer options (useful when working on FFmpeg itself):"
>    echo "  --disable-debug          disable debugging symbols"
> @@ -530,7 +531,7 @@
>      echo "$1" > $TMPS
>      log_file $TMPS
>      shift 1
> -    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
> +    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS && enable yasm || disable yasm
>  }

That is wrong.  The check_yasm should not mess with the yasm variable.

>  check_ld(){
> @@ -791,6 +792,7 @@
>      vhook
>      x11grab
>      xvmc
> +    yasm
>      zlib
>  "
>
> @@ -899,7 +901,6 @@
>      threads
>      truncf
>      winsock2_h
> -    yasm
>  "

Moving yasm from CONFIG_ to HAVE_ effectively disables it if you don't
update places that reference it.

>  # options emitted with CONFIG_ prefix but not available on command line
> @@ -1163,6 +1164,7 @@
>  enable protocols
>  enable static
>  enable stripping
> +enable yasm
>  vhook="default"
>
>  # build settings
> @@ -1787,7 +1789,7 @@
>          macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
>          *)                    append YASMFLAGS "-DPREFIX"  ;;
>      esac
> -    check_yasm "pabsw xmm0, xmm0" && enable yasm
> +    enabled yasm && check_yasm "pabsw xmm0, xmm0"
>  fi
>
>  # check for assembler specific support

I like my fixed version better.

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




More information about the ffmpeg-devel mailing list