[FFmpeg-devel] [PATCH] nasm support
Måns Rullgård
mans
Fri Sep 3 19:21:11 CEST 2010
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> Hello,
> this allows compiling FFmpeg asm code with nasm.
> Advantages:
> 1) nasm support OS/2 OMF format
> 2) there's a Cygwin package for nasm
> Tested on 64 bit Linux, compiles and passes tests.
> Obviously it would be a good idea for someone to test it
> on 32 bit...
What was the reason for only supporting yasm in the first place?
> Index: configure
> ===================================================================
> --- configure (revision 24867)
> +++ configure (working copy)
> @@ -2347,6 +2347,7 @@
> strip="lxlite"
> ln_s="cp -f"
> add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
> + objformat="obj"
> SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
> FFSERVERLDFLAGS=""
> LIBSUF="_s.a"
> @@ -2569,8 +2570,21 @@
> elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
> esac
> if ! disabled yasm; then
> - check_yasm "pabsw xmm0, xmm0" && enable yasm ||
> - warn "yasm not found, performance will suffer"
> + check_yasm "pabsw xmm0, xmm0" && enable yasm
> + if ! enabled yasm ; then
> + yasmexe="nasm"
> + if enabled x86_64 ; then
> + case "$objformat" in
> + elf) objformat=elf64 ;;
> + win32) objformat=win64 ;;
> + esac
> + fi
> + YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
> + enabled pic && append YASMFLAGS "-DPIC"
> + test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
> + check_yasm "pabsw xmm0, xmm0" && enable yasm ||
> + warn "yasm/nasm not found, performance will suffer"
> + fi
> fi
This diff is not against current svn, and such duplication is not
acceptable.
> @@ -270,6 +270,7 @@
> %define mova movaps
>
> %define Z(x) [r0+mmsize*x]
> +%define Z2(x) [r0+mmsize*x]
Why?
> @@ -388,7 +389,8 @@
> FFT48_3DN _3dn
>
>
> -%define Z(x) [zq + o1q*(x&6)*((x/6)^1) + o3q*(x/6) + mmsize*(x&1)]
> +%define Z(x) [zq + o1q*(x&6) + mmsize*(x&1)]
> +%define Z2(x) [zq + o3q + mmsize*(x&1)]
What is the problem with the existing macro? The change isn't exactly
obvious to me.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list