mirror of https://github.com/sipwise/jitsi.git
- Add updated JNI libraries; - Add "long-time" patch to compile x264 on *BSD.cusax-fix
parent
c995f95647
commit
353c53e7a6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,270 @@
|
||||
diff -Nru a/version.sh b/version.sh
|
||||
--- a/version.sh 2009-12-08 22:45:08.000000000 +0100
|
||||
+++ b/version.sh 2010-01-19 19:10:23.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
git rev-list HEAD | sort > config.git-hash
|
||||
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
|
||||
if [ $LOCALVER \> 1 ] ; then
|
||||
diff -Nru a/Makefile b/Makefile
|
||||
--- a/Makefile 2009-12-08 22:45:08.000000000 +0100
|
||||
+++ b/Makefile 2010-01-19 19:10:40.000000000 +0100
|
||||
@@ -10,7 +10,8 @@
|
||||
common/quant.c common/vlc.c \
|
||||
encoder/analyse.c encoder/me.c encoder/ratecontrol.c \
|
||||
encoder/set.c encoder/macroblock.c encoder/cabac.c \
|
||||
- encoder/cavlc.c encoder/encoder.c encoder/lookahead.c
|
||||
+ encoder/cavlc.c encoder/encoder.c encoder/lookahead.c \
|
||||
+ bsdlogf.c
|
||||
|
||||
SRCCLI = x264.c input/yuv.c input/y4m.c output/raw.c \
|
||||
output/matroska.c output/matroska_ebml.c \
|
||||
diff -Nru a/bsdlog.h b/bsdlog.h
|
||||
--- a/bsdlog.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/bsdlog.h 2010-01-19 19:08:07.000000000 +0100
|
||||
@@ -0,0 +1,143 @@
|
||||
+/*
|
||||
+ * ====================================================
|
||||
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
|
||||
+ * Permission to use, copy, modify, and distribute this
|
||||
+ * software is freely granted, provided that this notice
|
||||
+ * is preserved.
|
||||
+ * ====================================================
|
||||
+ */
|
||||
+
|
||||
+#ifndef bsdlog_headerfile
|
||||
+#define bsdlog_headerfile
|
||||
+
|
||||
+#include <math.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
+
|
||||
+float log2f(float);
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+#if (__BYTE_ORDER == __LITTLE_ENDIAN) && !defined(__arm__)
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+double value;
|
||||
+struct
|
||||
+{
|
||||
+u_int32_t lsw;
|
||||
+u_int32_t msw;
|
||||
+} parts;
|
||||
+} ieee_double_shape_type;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+#if (__BYTE_ORDER == __BIG_ENDIAN) || defined(__arm__)
|
||||
+
|
||||
+/* this should be on a BIG ENDIAN platform instead of the previous code */
|
||||
+/* I commented this because my compiler have a mess with macros *_ENDIAN */
|
||||
+
|
||||
+/*
|
||||
+typedef union
|
||||
+{
|
||||
+double value;
|
||||
+struct
|
||||
+{
|
||||
+u_int32_t msw;
|
||||
+u_int32_t lsw;
|
||||
+} parts;
|
||||
+} ieee_double_shape_type;
|
||||
+*/
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+#define EXTRACT_WORDS(ix0,ix1,d) \
|
||||
+do { \
|
||||
+ieee_double_shape_type ew_u; \
|
||||
+ew_u.value = (d); \
|
||||
+(ix0) = ew_u.parts.msw; \
|
||||
+(ix1) = ew_u.parts.lsw; \
|
||||
+} while (0)
|
||||
+/* Get the more significant 32 bit int from a double. */
|
||||
+
|
||||
+#define GET_HIGH_WORD(i,d) \
|
||||
+do { \
|
||||
+ieee_double_shape_type gh_u; \
|
||||
+gh_u.value = (d); \
|
||||
+(i) = gh_u.parts.msw; \
|
||||
+} while (0)
|
||||
+
|
||||
+/* Get the less significant 32 bit int from a double. */
|
||||
+
|
||||
+#define GET_LOW_WORD(i,d) \
|
||||
+do { \
|
||||
+ieee_double_shape_type gl_u; \
|
||||
+gl_u.value = (d); \
|
||||
+(i) = gl_u.parts.lsw; \
|
||||
+} while (0)
|
||||
+
|
||||
+/* Set a double from two 32 bit ints. */
|
||||
+
|
||||
+
|
||||
+/* Set the more significant 32 bits of a double from an int. */
|
||||
+
|
||||
+#define SET_HIGH_WORD(d,v) \
|
||||
+do { \
|
||||
+ieee_double_shape_type sh_u; \
|
||||
+sh_u.value = (d); \
|
||||
+sh_u.parts.msw = (v); \
|
||||
+(d) = sh_u.value; \
|
||||
+} while (0)
|
||||
+
|
||||
+/* Set the less significant 32 bits of a double from an int. */
|
||||
+
|
||||
+#define SET_LOW_WORD(d,v) \
|
||||
+do { \
|
||||
+ieee_double_shape_type sl_u; \
|
||||
+sl_u.value = (d); \
|
||||
+sl_u.parts.lsw = (v); \
|
||||
+(d) = sl_u.value; \
|
||||
+} while (0)
|
||||
+
|
||||
+
|
||||
+
|
||||
+/* A union which permits us to convert between a float and a 32 bit
|
||||
+int. */
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+float value;
|
||||
+u_int32_t word;
|
||||
+} ieee_float_shape_type;
|
||||
+
|
||||
+/* Get a 32 bit int from a float. */
|
||||
+
|
||||
+#define GET_FLOAT_WORD(i,d) \
|
||||
+do { \
|
||||
+ieee_float_shape_type gf_u; \
|
||||
+gf_u.value = (d); \
|
||||
+(i) = gf_u.word; \
|
||||
+} while (0)
|
||||
+
|
||||
+/* Set a float from a 32 bit int. */
|
||||
+
|
||||
+#define SET_FLOAT_WORD(d,i) \
|
||||
+do { \
|
||||
+ieee_float_shape_type sf_u; \
|
||||
+sf_u.word = (i); \
|
||||
+(d) = sf_u.value; \
|
||||
+} while (0)
|
||||
+
|
||||
+
|
||||
+
|
||||
+#endif
|
||||
diff -Nru a/bsdlogf.c b/bsdlogf.c
|
||||
--- a/bsdlogf.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/bsdlogf.c 2010-01-19 19:08:07.000000000 +0100
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@xxxxxxxxxxx
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * ====================================================
|
||||
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
+ * Permission to use, copy, modify, and distribute this
|
||||
+ * software is freely granted, provided that this notice
|
||||
+ * is preserved.
|
||||
+ * ====================================================
|
||||
+ */
|
||||
+
|
||||
+#include "bsdlog.h"
|
||||
+
|
||||
+
|
||||
+static const float
|
||||
+ln2 = 0.6931471805599452862268,
|
||||
+two25 = 3.355443200e+07, /* 0x4c000000 */
|
||||
+Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
|
||||
+Lg2 = 4.0000000596e-01, /* 3ECCCCCD */
|
||||
+Lg3 = 2.8571429849e-01, /* 3E924925 */
|
||||
+Lg4 = 2.2222198546e-01, /* 3E638E29 */
|
||||
+Lg5 = 1.8183572590e-01, /* 3E3A3325 */
|
||||
+Lg6 = 1.5313838422e-01, /* 3E1CD04F */
|
||||
+Lg7 = 1.4798198640e-01; /* 3E178897 */
|
||||
+
|
||||
+static const float zero = 0.0;
|
||||
+
|
||||
+
|
||||
+
|
||||
+float log2f(float x)
|
||||
+{
|
||||
+ float hfsq,f,s,z,R,w,t1,t2,dk;
|
||||
+ int32_t k,ix,i,j;
|
||||
+
|
||||
+ GET_FLOAT_WORD(ix,x);
|
||||
+
|
||||
+ k=0;
|
||||
+ if (ix < 0x00800000) { /* x < 2**-126 */
|
||||
+ if ((ix&0x7fffffff)==0)
|
||||
+ return -two25/zero; /* log(+-0)=-inf */
|
||||
+ if (ix<0) return (x-x)/zero; /* log(-#) = NaN */
|
||||
+ k -= 25; x *= two25; /* subnormal number, scale up x */
|
||||
+ GET_FLOAT_WORD(ix,x);
|
||||
+ }
|
||||
+ if (ix >= 0x7f800000) return x+x;
|
||||
+ k += (ix>>23)-127;
|
||||
+ ix &= 0x007fffff;
|
||||
+ i = (ix+(0x95f64<<3))&0x800000;
|
||||
+ SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */
|
||||
+ k += (i>>23);
|
||||
+ dk = (float)k;
|
||||
+ f = x-(float)1.0;
|
||||
+ if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */
|
||||
+ if (f==zero)
|
||||
+ return (dk);
|
||||
+ R = f*f*((float)0.5-(float)0.33333333333333333*f);
|
||||
+ return (dk-(R-f)/ln2);
|
||||
+ }
|
||||
+ s = f/((float)2.0+f);
|
||||
+ z = s*s;
|
||||
+ i = ix-(0x6147a<<3);
|
||||
+ w = z*z;
|
||||
+ j = (0x6b851<<3)-ix;
|
||||
+ t1= w*(Lg2+w*(Lg4+w*Lg6));
|
||||
+ t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
|
||||
+ i |= j;
|
||||
+ R = t2+t1;
|
||||
+ if(i>0) {
|
||||
+ hfsq=(float)0.5*f*f;
|
||||
+ return (dk-(hfsq-s*(hfsq+R)-f)/ln2);
|
||||
+ } else
|
||||
+ return (dk-((s*(f-R))-f)/ln2);
|
||||
+}
|
||||
diff -Nru a/configure b/configure
|
||||
--- a/configure 2009-12-08 22:45:08.000000000 +0100
|
||||
+++ b/configure 2010-01-19 19:10:14.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
|
||||
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
||||
|
||||
diff -Nru a/encoder/analyse.c b/encoder/analyse.c
|
||||
--- a/encoder/analyse.c 2009-12-08 22:45:08.000000000 +0100
|
||||
+++ b/encoder/analyse.c 2010-01-19 19:08:07.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "ratecontrol.h"
|
||||
#include "analyse.h"
|
||||
#include "rdo.c"
|
||||
+#include "../bsdlog.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Loading…
Reference in new issue