]> git.sesse.net Git - x264/commitdiff
BeOS fixes (no stdint.h, no libm)
authorEric Petit <titer@videolan.org>
Wed, 28 Jul 2004 21:39:06 +0000 (21:39 +0000)
committerEric Petit <titer@videolan.org>
Wed, 28 Jul 2004 21:39:06 +0000 (21:39 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@15 df754926-b1dd-0310-bc7b-ec298dee348c

25 files changed:
Jamfile
core/cabac.c
core/common.c
core/common.h
core/cpu.c
core/csp.c
core/dct.c
core/frame.c
core/i386/dct-c.c
core/i386/mc-c.c
core/i386/predict.c
core/macroblock.c
core/mc.c
core/mdate.c
core/pixel.c
core/predict.c
encoder/analyse.c
encoder/cabac.c
encoder/cavlc.c
encoder/encoder.c
encoder/macroblock.c
encoder/me.c
encoder/ratecontrol.c
encoder/set.c
x264.c

diff --git a/Jamfile b/Jamfile
index 43b0a5369e930d530935fdd825526b2e0a129a97..370aa3b2e19668a0410ad214017cf9864f6d9b1f 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -40,11 +40,17 @@ if $(OSPLAT) = X86
     SOURCES_X264 += $(SOURCES_X86) ;
     ASFLAGS       = -f elf ;
 
+    if $(OS) != BEOS
+    {
+        DEFINES += HAVE_STDINT_H ;
+    }
+
     # Don't ask
     NOARUPDATE = false ;
 }
 if $(OSPLAT) = PPC
 {
+    DEFINES      += HAVE_STDINT_H ;
     SOURCES_X264 += $(SOURCES_ALTIVEC) ;
     OPTIM        += -falign-loops=16 ;
 
@@ -60,7 +66,10 @@ if $(OSPLAT) = PPC
 Library libx264 : $(SOURCES_X264) ;
 
 # x264
-LINKLIBS += -lm ;
+if $(OS) != BEOS
+{
+    LINKLIBS += -lm ;
+}
 LinkLibraries x264 : libx264.a ;
 Main x264 : x264.c ;
 
index 51a06e2c6c42fa760d91a7af54a2b0e8bc81bac0..27d7d0c0edff4f974406ab8bae04b87b07cd0149 100644 (file)
@@ -20,9 +20,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
+
 #include <stdlib.h>
 #include <string.h>
-#include <stdint.h>
 #include <stdio.h>
 
 #include "common.h"
index b44d9cd6bdc9201f306d3bc0445e61857d39a493..a4a21d443b6465e9d91e956fbadd9c24bd3d16ec 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
index e5c85c05217f81132c00b4b432d998631a1395ae..11b9fae9187f3e100f7207929a2808bddac34deb 100644 (file)
 #ifndef _COMMON_H
 #define _COMMON_H 1
 
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 
 #include "../x264.h"
 #include "bs.h"
index 9df01da4b94b02393bf04042008e87e3bded149e..5cce5db0f5b6bdd2f86d50951a0162f36805bd14 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../x264.h"
 #include "cpu.h"
index 1dda6b603c54a22db967d129f12eaea36b1ec208..dbd990f2ea942a08c2927cce88d9289a9ce4f457 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <stdint.h>
 #include <string.h>
 
 #include "common.h"
index 6e3a16fc158ff314d62ab1b771289983588b537e..da018287a113b20d11a3e47d3fa03814639d8f26 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
 
 #include "x264.h"
 
index 2e926176aa1c5487e3a7a86293e923f83dd919b8..02a5b540f47a5cc2fa6b6bb2b55dc10ea8c1c319 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "common.h"
 #include "macroblock.h"
index d824a23f16d624cb70940ce38844c854c2b7b877..368603e0d04b29a36b90564b24ec0c8c44933724 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
 
 #include "x264.h"
 
index bec61db45738f99cd88197f7262730274cf62acc..08207c177b8c1ca64fd95fdf5148cc2e8ef28088 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "x264.h"   /* DECLARE_ALIGNED */
 #include "../mc.h"
index 587416bda261bcf840356646efe93a3d182fa41c..ef1a027d8b46ce8a1dc49f33e7eadf889fcff9fb 100644 (file)
 /* XXX predict4x4 are inspired from ffmpeg h264 decoder
  */
 
-#include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
 
 #include "x264.h"   /* for keyword inline */
 #include "../predict.h"
index d03413c61a9e7e3e09e00488dbe8512b2d3e0f08..4d305737c4d97bf86aa1a1f7a018fba8e728d962 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "common.h"
 #include "macroblock.h"
index fbb548d5a17b7c459daebeb582b47fe33cfe91aa..ae9c668521d76198c50a95fe6ea4d883f8ce45f4 100644 (file)
--- a/core/mc.c
+++ b/core/mc.c
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../x264.h"
 
index 5b4a2a91f3688e183af2dc8f6c8893be512a9a30..2ce92b6580f3683d4ca21fef7d88e35a7a8904ff 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
 
 #if !(defined(_MSC_VER) || defined(__MINGW32__))
 #include <sys/time.h>
index 7fa93f2a4af69f7fab80c995a3d29624fa33b807..056491caa33e330c2e302115f21caf6e227aa013 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 #include <stdlib.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../x264.h"
 #include "pixel.h"
index 6a799a09fdef6bd21afe7268a7d984e1b63aaf54..2df2739456767e48195cd149c1d662382dc369c7 100644 (file)
 /* XXX predict4x4 are inspired from ffmpeg h264 decoder
  */
 
-#include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#include <stdlib.h>
 
 #include "x264.h"
 #include "predict.h"
index e4a7a0253c3ad293d5cc8bbb641e54d78913be85..aaca97e07cd4a96e5385d90ef4a3f64ca71877ab 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 #include <math.h>
 
 #include "../core/common.h"
index 8b1f396593f48fe69ad72ba265a0485f421fe2bb..cbb806a100f0f05fe02a4a9f84a54c9aa4f780c5 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../core/common.h"
 #include "macroblock.h"
index de7ba547517d08c81a1efc084267b08c498fc089..5560b24993f7f3cfe32f703bf80215023a0b023f 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../core/common.h"
 #include "../core/vlc.h"
index 3188bb737af0f94d325442e690b0ca53716b0461..f9c031051ea343f1c110ec75d12eac052cd95f35 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include <math.h>
 
index 17bea963621737b47f90a3724467dd4ef5c9ac93..21a097e9f4da8d0443f40b4fa345e4bece6c9016 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../core/common.h"
 #include "macroblock.h"
index b1653754cdb95fe450e833e96df8c98fbf5e8e62..86396f3b5d55edb73bb62da92b48cc378c1a63b8 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../core/common.h"
 #include "me.h"
index 56a5af9b3883401b062215429493c0786c66497b..fc0226e7f6b5acc81371b77241e64de9e1778918 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../core/common.h"
 #include "ratecontrol.h"
index 562846422d5f3bda08054afea5f56333ff92090b..9b4a8de5873008db55debcdabcadd85642187733 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include "../x264.h"
 #include "../core/bs.h"
diff --git a/x264.c b/x264.c
index 75c347b67d959507052d3a836c083fddcb9a90fd..57254eacf8362198a1bacb905d237e7bf9fc3413 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdint.h>
 
 #include <math.h>
 
@@ -37,8 +36,8 @@
 #include <fcntl.h>  /* _O_BINARY */
 #endif
 
-#include "x264.h"
 #include "core/common.h"
+#include "x264.h"
 
 #define DATA_MAX 3000000
 uint8_t data[DATA_MAX];