photos

15/Apr/2010 PA
12/Apr/2009 Sunrise Circus
15/Mar/2009 Lego
08/Mar/2009 Moomba
13/Feb/2009 Car Smokey Sunset
26/Jan/2009 Fireworks
26/Oct/2008 Synchrotron
07/Jun/2008 Model Trains
06/Jun/2008 Wedding
04/Jun/2008 Central Coast Trip
more photos...

lavtools

03/Nov/2011 yuvvalues
03/Nov/2011 yuvrfps
03/Nov/2011 yuvdiff
03/Nov/2011 yuvaddetect
03/Nov/2011 yuv2jpeg
more lavtools...

Creativity

The TRIP is the mental projection of my digital self. Including all areas of digital work I have been involved with, including Music, video, photography...

All good web pages must have the collection of absolutely useless pictures. Designed for no purpose other than to consume kilobits. And hopefully show off some of my Photographic skills. Web design skills, and uses one php script to drive the whole index. Also see the Photography section of the Silicontrip Website.

The Creative section of the TRIP is my imagination trying to run free. I have a fascination with sexual, spiritual and meta physical abilities, and these stories show it.

Part of the images directory contains some of my digital artwork. These images have been created or enhanced by myself, with the help of the 1s and 0s machine.

album

23/Feb/2011 Trace
17/Jan/2010 Food
30/Oct/2009 Airbrush
18/Jun/2009 Focal
01/Jun/2009 Transport
01/Jun/2009 Misc
31/May/2009 Artwork
24/Apr/2009 AirbrushScales
18/Apr/2009 Probe
10/Jan/2009 Scanimation
more album...

blog

27/Jan/2012 ZFS for OSX
14/Dec/2011 Scripting Bridge
02/Dec/2011 Core Audio Units
01/Mar/2011 A useful bit of code
22/Dec/2010 Larger than 4G files on FAT for OSX
08/Dec/2009 Time machine on non HFS drives
21/Oct/2009 My Strengths
27/Aug/2009 Train Hitchiking
11/Jul/2009 A litre of onions
19/Jun/2009 FSCK for NTFS
18/Jun/2009 Automated Focal Deconstruction
12/Jun/2009 Perl code to write BMPs
07/Jun/2009 More Lego
01/Jun/2009 Latest Airbrushing
30/May/2009 Happy Birthday to me
24/May/2009 Comments Engine
09/May/2009 Skills Matrix
24/Apr/2009 Airbrush simulator
19/Apr/2009 Ben 10 Board game
29/Mar/2009 How fresh is your fresh food?
more blog...

BACK

25/Jun/2008

More universal madness

Still trying to work out the best way to build mjpegutils as a universal library? These are some more detailed instructions.

I would recommend against doing this as the mjpegutil configure scripts detect CPU options, such as g4/g5 optimisations and Alitvec/MMX optimisations. These optimisations must be left out for a universal build. Ideally the best way would be to build for each platform individually and then use lipo to join them together. I'll look at doing this later...

I have access to a g4, g5, core duo and core 2 duo machines I should be able to find out the ideal flags for each of these builds. However as the configure script detects cpu optimsations automatically and then generates make files for all sub projects. Finding out how to trick configure into using tunings for each Apple architecture might be difficult

Make sure universal libjpeg is built and installed, this is not optional. If you have libpng installed make sure it's universal or use the --disable-libpng configure option. And same with all other support libraries, make sure they are universal or disable them.

replace cpuinfo.sh with the following script:

#!/bin/sh
echo "-arch ppc -arch i386"

configure mjpegutils. include the opposite architectures build flags Don't forget your --prefix flag if you are installing in places other than /usr/local

./configure --enable-shared --enable-static --disable-dependency-tracking --build=i386-apple-darwin
Use --build=ppc-apple-darwin for i386 machines

hack libtool, adding the LDFLAGS to the archive_cmds variable, there are two places for archive_cmds

archive_cmds="\$CC -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring"
archive_cmds="\$CC -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -dynamiclib -single_module \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring"

Hack config.h removing CPU specific options.

/* Inline PPC Altivec primitives available */
/* #undef HAVE_ALTIVEC */

/* Inline MMX assembly accepted by C compiler */
/* #undef HAVE_ASM_MMX */

/* Compiling for PowerPC CPU */
/* #undef HAVE_PPCCPU */

/* Compiling for x86-64 architecture CPU */
/* #undef HAVE_X86CPU */

Fortunately it appears that no code makes use of WORDS_BIGENDIAN

Now you must build each sub directory seperately

For Libraries use:

make CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" LDFLAGS="-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" 

and Use the following for executables:

make CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" LDFLAGS="-Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" 

mjpeg utils is made up of several packages.

utils mpeg2enc lavtools aenc mplex yuvcorrect yuvscaler yuvdenoise yuvfilters yuvdeinterlace y4mdenoise y4munsharp y4mutils

UTILS

utils contains the libmjpegutils library and builds cleanly with the library make command.

mpeg2enc

mpeg2enc is the mpeg2 encoder binary. I highly recommend building this with optimisations as it makes heavy use of SIMD/MMX or Altivec instructions. mpeg2enc is written in c++ and makes use of the CXXFLAGS although it appears we can ignore this.
Build with Library make command first.
When you see the error:
unrecognized option '-syslibroot' use the executable make command

AENC

aenc is the mpeg audio layer 2 encoder. Builds cleanly with the execute make command

MPLEX

mplex is the mpeg program stream multiplexer, it builds libmpeg first, so start with the library make command then switch to the executable build.

LAVTOOLS

Lavtools uses libpng (I haven't yet built a universal libpng)

YUVCORRECT

yuvcorrect builds an executable, use the executable make only.

YUVSCALER

yuvscaler builds an executable, use the executable make only.

yuvdenoise

yuvdenoise builds an executable, use the executable make only.

y4munsharp

y4munsharp builds an executable, use the executable make only.

y4mutils

y4mutils builds several executables, use the executable make only.

You should be now ready to install.

if you see the error: /usr/bin/libtool: can't open file: 2 (No such file or directory) Means you should switch to the Library make command.


Comments

Your name:

Your comments: