Changeset 8

Show
Ignore:
Timestamp:
06/15/06 19:03:52 (2 years ago)
Author:
gbooker
Message:

Fixed an endian issue as well as the ability to build a universal on intel

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/FFusionCodec.c

    r3 r8  
    3838#include "bswap.h" 
    3939 
     40#ifdef __BIG_ENDIAN__ 
     41#define make_big_32(x) (x) 
     42#else 
     43#ifdef __LITTLE_ENDIAN__ 
     44#define make_big_32(x) bswap_32(x) 
     45#else 
     46#error Endian is unknown 
     47#endif //Little 
     48#endif //Big 
     49 
    4050//--------------------------------------------------------------------------- 
    4151// Types 
     
    11081118     
    11091119    // if ya can't set da poiners, set da offsets 
    1110     planar->componentInfoY.offset = bswap_32(picture->data[0] - baseAddr); 
    1111     planar->componentInfoCb.offset =  bswap_32(picture->data[1] - baseAddr); 
    1112     planar->componentInfoCr.offset =  bswap_32(picture->data[2] - baseAddr); 
     1120    planar->componentInfoY.offset = make_big_32(picture->data[0] - baseAddr); 
     1121    planar->componentInfoCb.offset =  make_big_32(picture->data[1] - baseAddr); 
     1122    planar->componentInfoCr.offset =  make_big_32(picture->data[2] - baseAddr); 
    11131123     
    11141124    // for the 16/32 add look at EDGE in mpegvideo.c 
    1115     planar->componentInfoY.rowBytes = bswap_32(picture->linesize[0]); 
    1116     planar->componentInfoCb.rowBytes = bswap_32(picture->linesize[1]); 
    1117     planar->componentInfoCr.rowBytes = bswap_32(picture->linesize[2]); 
     1125    planar->componentInfoY.rowBytes = make_big_32(picture->linesize[0]); 
     1126    planar->componentInfoCb.rowBytes = make_big_32(picture->linesize[1]); 
     1127    planar->componentInfoCr.rowBytes = make_big_32(picture->linesize[2]); 
    11181128     
    11191129    return err; 
  • trunk/Perian.xcodeproj/project.pbxproj

    r6 r8  
    280280                        runOnlyForDeploymentPostprocessing = 0; 
    281281                        shellPath = /bin/sh; 
    282                         shellScript = "BUILDDIR=\"$SYMROOT/ppc\"\nmkdir \"$BUILDDIR\"\n\ncd \"$BUILDDIR\"\nif [ `arch` = ppc ] ; then\n\t\"$SRCROOT/ffmpeg/configure\" --enable-pp --enable-gpl\nelse\n\t../ffmpeg/configure --enable-pp --enable-gpl --cpu=ppc  --extra-cflags='-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk' --extra-ldflags='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc'\n\n\t#construct the \"fake\" config.mak and config.h files to work around the brokenness of cross-compiles\n\trm \"$BUILDDIR/config.h\"\n\tcp \"$SRCROOT/ppc-configured/config.h\" \"$BUILDDIR\"\n\trm \"$BUILDDIR/config.mak\"\n\tcp \"$SRCROOT/ppc-configured/config.mak\" \"$BUILDDIR\"\nfi\nmake\n\n"; 
     282                        shellScript = "BUILDDIR=\"$SYMROOT/ppc\"\nmkdir \"$BUILDDIR\"\n\ncd \"$BUILDDIR\"\nif [ `arch` = ppc ] ; then\n\t\"$SRCROOT/ffmpeg/configure\" --enable-pp --enable-gpl\nelse\n\t\"$SRCROOT/ffmpeg/configure\" --enable-pp --enable-gpl --cpu=ppc  --extra-cflags='-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk' --extra-ldflags='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc'\n\n\t#construct the \"fake\" config.mak and config.h files to work around the brokenness of cross-compiles\n\trm \"$BUILDDIR/config.h\"\n\tcp \"$SRCROOT/ppc-configured/config.h\" \"$BUILDDIR\"\n\trm \"$BUILDDIR/config.mak\"\n\tcp \"$SRCROOT/ppc-configured/config.mak\" \"$BUILDDIR\"\nfi\nmake\n\n"; 
    283283                }; 
    284284                8F9B11470A41D10F00083569 /* ShellScript */ = { 
  • trunk/ppc-configured/config.mak

    r4 r8  
    1111STRIP=strip -x 
    1212INSTALLSTRIP= 
    13 OPTFLAGS=-O3 -g  -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare -faltivec -Wdeclaration-after-statement -Wall -Wno-switch -mdynamic-no-pic 
    14 SHCFLAGS=-O3 -g  -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare -faltivec -Wdeclaration-after-statement -Wall -Wno-switch 
    15 LDFLAGS=-Wl,-dynamic,-search_paths_first  
     13OPTFLAGS=-O3 -g  -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare -faltivec -Wdeclaration-after-statement -Wall -Wno-switch -mdynamic-no-pic 
     14SHCFLAGS=-O3 -g  -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare -faltivec -Wdeclaration-after-statement -Wall -Wno-switch 
     15LDFLAGS=-Wl,-dynamic,-search_paths_first -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc 
    1616LDCONFIG=ldconfig 
    1717FFSLDFLAGS=-Wl,-bind_at_load