x264 patch

Tomek tomek at slimaczek.pl
Mon Mar 2 03:59:15 PST 2009


Hello

I was trying to compile a new x264 package from source and found some
difficulties:
- there is no log2f() function in mathematical library
- some asm code (SSSE3) doesn't want to compile -- GCC 4.2.1 shipped
  with FreeBSD doesn't understand such instructions like 'pmaddubsw'

I've made a patch to solve these problems:
- add a log2f() function - fast but less accurate (thanks to the Sun Microsystems)
  (added files: bsdlog.h, bsdlogf.c)
- add --disable-asm-gcc-ssse3 to the configure script

How to applay:
$ git clone git://git.videolan.org/x264.git
$ patch -p0 < x264.bsd.patch
$ cd x264
$ ./configure --extra-cflags="-mmmx -msse -msse2 -msse3 -I/usr/local/include -fPIC" --extra-ldflags="-L/usr/local/lib" --enable-shared --enable-mp4-output --enable-pthread --disable-asm-gcc-ssse3
  If your CPU does't have sse3 just simply remove -msse3 from --extra-cflags
$ gmake

# gmake install

$ x264 --version
x264 0.66.1115M 11863ac
built on Mar  1 2009, gcc: 4.2.1 20070719  [FreeBSD]

Tested on i386 and amd64 with FreeBSD 7.1. On big endian platforms
must be changed ieee_double_shape_type union (declared in bsdlog.h)
but I don't have such a platform to make tests.

-- 
Tomasz Sowa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x264.bsd.patch
Type: application/octet-stream
Size: 8991 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20090302/602f1b22/x264.bsd.obj


More information about the freebsd-multimedia mailing list