From a message set by Michel Talon to freebsd-ports on Oct 9 2008: "Trying to encode with mencoder and the xvid codec, I discovered that it is awfully slow (around 3 frames/s on my P4 machine). So I played a little bit with the options in the Makefile without any success. Finally I understood that the cause was that the build system requires nasm, but doesn't use it! There are several assembly files in the xvid codec which are not used due to that. The solution i have found by looking at the configure script is to install the yasm port. Then the build system picks the yasm dependency and compiles the assembly files, which enables SSE instructions. The net result is that, without any other tweak, i now encode the same stuff at 11 frames/s. So to be short, multimedia/xvid should require a dependency on yasm." Sean Winn noted that the problem comes because the configure script tries to use the -r option which yasm has but not nasm. So the xvid people had really yasm in view when doing their work. Fixing the configure script should be done upstream, but it seems that the xvid project is somewhat asleep, so better use yasm in the Makefile on which there is control. I (Casantos) gave it a try and found that configure needs some help on AMD64 because it expects the architecture name to be "x86_64", not "amd64". Fix: The attached patch fixes the build in order to use yasm. According to Michel Talon, "the performance improvement obtained by using SSE instructions in the assembly files is astounding. I could not beleive what i was seeing, basically an x 4 improvement, that is the code perfectly parallelizes the computations on the 128 bits registers." The patch also eliminates the pkg-plist file, using PLIST_FILES instead, since the port installs only three files and one symbolic link. Patch attached with submission follows: How-To-Repeat: Build multimedia/xvid version 1.1.3_1.
Hi Carlos, just a quick note: you probably meant to increment PORTREVISION in the Makefile, not PORTEPOCH. Regards, Stefan
On Mon, Oct 13, 2008 at 4:07 AM, Stefan Walter <stefan@freebsd.org> wrote: > Hi Carlos, > > just a quick note: you probably meant to increment PORTREVISION in the > Makefile, not PORTEPOCH. > > Regards, > Stefan Yes, that was the intention. Thanks for spotting it. -- cd /usr/ports/sysutils/life make clean
Responsible Changed From-To: freebsd-ports-bugs->amdmi3 I'll take it.
State Changed From-To: open->closed Committed. Thanks!
amdmi3 2008-10-13 12:49:38 UTC FreeBSD ports repository Modified files: multimedia/xvid Makefile Removed files: multimedia/xvid pkg-plist Log: - Fix port to actually use assembly on i386 and amd64, providing up to 4x coding speedup - Change pkg-plist to PLIST_FILES as there are only 4 files in there PR: 128042 Submitted by: Carlos Santos <unixmania at gmail dot com> Revision Changes Path 1.30 +14 -3 ports/multimedia/xvid/Makefile 1.7 +0 -4 ports/multimedia/xvid/pkg-plist (dead) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"