1 diff -Nur x264-snapshot-20051022-2245.orig/common/amd64/Makefile.am x264-snapshot-20051022-2245/common/amd64/Makefile.am
2 --- x264-snapshot-20051022-2245.orig/common/amd64/Makefile.am 1970-01-01 01:00:00.000000000 +0100
3 +++ x264-snapshot-20051022-2245/common/amd64/Makefile.am 2005-10-24 01:18:29.134240048 +0200
5 +SUFFIXES = .c .o .lo .asm
9 +LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_LDFLAGS) $(LDFLAGS) -o $@
11 +noinst_LTLIBRARIES = lib_x8664_yasm.la
13 +lib_x8664_yasm_la_SOURCES = dct-a.asm cpu-a.asm pixel-a.asm mc-a.asm \
14 + mc-a2.asm predict-a.asm pixel-sse2.asm quant-a.asm
16 +am_lib_x8664_yasm_la_OBJECTS = dct-a.lo cpu-a.lo pixel-a.lo mc-a.lo \
17 + mc-a2.lo predict-a.lo pixel-sse2.lo quant-a.lo
20 + $(YASM) $(YASMFLAGS) $< -o $@
23 + $(LIBTOOL) --mode=compile --tag=CC sh $(top_srcdir)/strip_fPIC.sh $(YASM) $(YASMFLAGS) $< -o $@
24 diff -Nur x264-snapshot-20051022-2245.orig/common/common.c x264-snapshot-20051022-2245/common/common.c
25 --- x264-snapshot-20051022-2245.orig/common/common.c 2005-10-22 22:45:02.000000000 +0200
26 +++ x264-snapshot-20051022-2245/common/common.c 2005-10-23 23:17:53.281256904 +0200
28 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
29 *****************************************************************************/
38 diff -Nur x264-snapshot-20051022-2245.orig/common/common.h x264-snapshot-20051022-2245/common/common.h
39 --- x264-snapshot-20051022-2245.orig/common/common.h 2005-10-22 22:45:02.000000000 +0200
40 +++ x264-snapshot-20051022-2245/common/common.h 2005-10-23 22:36:41.745987376 +0200
52 diff -Nur x264-snapshot-20051022-2245.orig/common/cpu.c x264-snapshot-20051022-2245/common/cpu.c
53 --- x264-snapshot-20051022-2245.orig/common/cpu.c 2005-10-22 22:45:02.000000000 +0200
54 +++ x264-snapshot-20051022-2245/common/cpu.c 2005-10-23 22:36:58.382458248 +0200
56 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
57 *****************************************************************************/
66 diff -Nur x264-snapshot-20051022-2245.orig/common/dct.c x264-snapshot-20051022-2245/common/dct.c
67 --- x264-snapshot-20051022-2245.orig/common/dct.c 2005-10-22 22:45:02.000000000 +0200
68 +++ x264-snapshot-20051022-2245/common/dct.c 2005-10-23 22:37:13.619141920 +0200
70 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
71 *****************************************************************************/
80 diff -Nur x264-snapshot-20051022-2245.orig/common/i386/dct-c.c x264-snapshot-20051022-2245/common/i386/dct-c.c
81 --- x264-snapshot-20051022-2245.orig/common/i386/dct-c.c 2005-10-22 22:45:02.000000000 +0200
82 +++ x264-snapshot-20051022-2245/common/i386/dct-c.c 2005-10-23 22:38:11.646320448 +0200
84 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
85 *****************************************************************************/
94 diff -Nur x264-snapshot-20051022-2245.orig/common/i386/Makefile.am x264-snapshot-20051022-2245/common/i386/Makefile.am
95 --- x264-snapshot-20051022-2245.orig/common/i386/Makefile.am 1970-01-01 01:00:00.000000000 +0100
96 +++ x264-snapshot-20051022-2245/common/i386/Makefile.am 2005-10-24 00:44:08.981430880 +0200
98 +SUFFIXES = .c .o .lo .asm
101 +NASMFLAGS=@NASMFLAGS@
104 +noinst_LTLIBRARIES = lib_x86.la lib_i386_nasm.la
106 +noinst_LTLIBRARIES = lib_x86.la
109 +noinst_HEADERS = dct.h mc.h pixel.h predict.h
111 +lib_x86_la_SOURCES = mc-c.c dct-c.c predict.c
113 +lib_i386_nasm_la_SOURCES = dct-a.asm cpu-a.asm pixel-a.asm mc-a.asm \
114 + mc-a2.asm predict-a.asm pixel-sse2.asm quant-a.asm
116 +am_lib_i386_nasm_la_OBJECTS = dct-a.lo cpu-a.lo pixel-a.lo mc-a.lo \
117 + mc-a2.lo predict-a.lo pixel-sse2.lo quant-a.lo
120 + $(NASM) $(NASMFLAGS) $< -o $@
123 + $(LIBTOOL) --mode=compile --tag=CC sh $(top_srcdir)/strip_fPIC.sh $(NASM) $(NASMFLAGS) $< -o $@
124 diff -Nur x264-snapshot-20051022-2245.orig/common/i386/mc-c.c x264-snapshot-20051022-2245/common/i386/mc-c.c
125 --- x264-snapshot-20051022-2245.orig/common/i386/mc-c.c 2005-10-22 22:45:02.000000000 +0200
126 +++ x264-snapshot-20051022-2245/common/i386/mc-c.c 2005-10-23 22:45:25.266400176 +0200
128 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
129 *****************************************************************************/
131 +#ifdef HAVE_CONFIG_H
138 diff -Nur x264-snapshot-20051022-2245.orig/common/i386/predict.c x264-snapshot-20051022-2245/common/i386/predict.c
139 --- x264-snapshot-20051022-2245.orig/common/i386/predict.c 2005-10-22 22:45:02.000000000 +0200
140 +++ x264-snapshot-20051022-2245/common/i386/predict.c 2005-10-23 22:45:59.850142648 +0200
142 /* XXX predict4x4 are inspired from ffmpeg h264 decoder
145 +#ifdef HAVE_CONFIG_H
152 diff -Nur x264-snapshot-20051022-2245.orig/common/Makefile.am x264-snapshot-20051022-2245/common/Makefile.am
153 --- x264-snapshot-20051022-2245.orig/common/Makefile.am 1970-01-01 01:00:00.000000000 +0100
154 +++ x264-snapshot-20051022-2245/common/Makefile.am 2005-10-24 01:27:56.205032184 +0200
158 +i386_LIB = $(top_builddir)/common/i386/lib_x86.la $(top_builddir)/common/i386/lib_i386_nasm.la
165 +x8664_subdir = i386 amd64
166 +x8664_LIB = $(top_builddir)/common/i386/lib_x86.la $(top_builddir)/common/amd64/lib_x8664_yasm.la
174 +ppc_LIB = $(top_srcdir)/common/ppc/lib_ppc.la
181 +sparc_subdir = sparc
182 +sparc_LIB = $(top_srcdir)/common/sparc/lib_sparc.la
188 +SUBDIRS = $(i386_subdir) $(x8664_subdir) $(ppc_subdir) $(sparc_subdir)
190 +common_SRCS = mc.c predict.c pixel.c macroblock.c \
191 + frame.c dct.c cpu.c cabac.c \
192 + common.c mdate.c csp.c set.c \
196 +vis_SRCS = common/visualize.c common/display-x11.c
201 +noinst_HEADERS = bs.h cabac.h clip1.h common.h cpu.h csp.h dct.h display.h \
202 + frame.h macroblock.h mc.h pixel.h predict.h quant.h set.h visualize.h \
205 +noinst_LTLIBRARIES = lib_common.la
207 +lib_common_la_SOURCES = $(common_SRCS) $(vis_SRCS)
208 +lib_common_la_LIBADD = $(i386_LIB) $(x8664_LIB) $(ppc_LIB) $(sparc_LIB)
209 diff -Nur x264-snapshot-20051022-2245.orig/common/mc.c x264-snapshot-20051022-2245/common/mc.c
210 --- x264-snapshot-20051022-2245.orig/common/mc.c 2005-10-22 22:45:02.000000000 +0200
211 +++ x264-snapshot-20051022-2245/common/mc.c 2005-10-23 23:15:59.521551008 +0200
213 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
214 *****************************************************************************/
216 +#ifdef HAVE_CONFIG_H
223 diff -Nur x264-snapshot-20051022-2245.orig/common/mdate.c x264-snapshot-20051022-2245/common/mdate.c
224 --- x264-snapshot-20051022-2245.orig/common/mdate.c 2005-10-22 22:45:02.000000000 +0200
225 +++ x264-snapshot-20051022-2245/common/mdate.c 2005-10-23 23:16:44.309742168 +0200
227 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
228 *****************************************************************************/
230 +#ifdef HAVE_CONFIG_H
237 diff -Nur x264-snapshot-20051022-2245.orig/common/pixel.c x264-snapshot-20051022-2245/common/pixel.c
238 --- x264-snapshot-20051022-2245.orig/common/pixel.c 2005-10-22 22:45:02.000000000 +0200
239 +++ x264-snapshot-20051022-2245/common/pixel.c 2005-10-23 23:16:49.766912552 +0200
241 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
242 *****************************************************************************/
244 +#ifdef HAVE_CONFIG_H
251 diff -Nur x264-snapshot-20051022-2245.orig/common/ppc/Makefile.am x264-snapshot-20051022-2245/common/ppc/Makefile.am
252 --- x264-snapshot-20051022-2245.orig/common/ppc/Makefile.am 1970-01-01 01:00:00.000000000 +0100
253 +++ x264-snapshot-20051022-2245/common/ppc/Makefile.am 2005-10-23 23:01:25.817374232 +0200
255 +noinst_LTLIBRARIES = lib_ppc.la
257 +noinst_HEADERS = mc.h pixel.h ppccommon.h
259 +lib_ppc_la_SOURCES = mc.c pixel.c
260 diff -Nur x264-snapshot-20051022-2245.orig/common/predict.c x264-snapshot-20051022-2245/common/predict.c
261 --- x264-snapshot-20051022-2245.orig/common/predict.c 2005-10-22 22:45:02.000000000 +0200
262 +++ x264-snapshot-20051022-2245/common/predict.c 2005-10-23 23:16:54.594178696 +0200
264 /* XXX predict4x4 are inspired from ffmpeg h264 decoder
267 +#ifdef HAVE_CONFIG_H
274 diff -Nur x264-snapshot-20051022-2245.orig/common/sparc/Makefile.am x264-snapshot-20051022-2245/common/sparc/Makefile.am
275 --- x264-snapshot-20051022-2245.orig/common/sparc/Makefile.am 1970-01-01 01:00:00.000000000 +0100
276 +++ x264-snapshot-20051022-2245/common/sparc/Makefile.am 2005-10-23 23:03:09.936545712 +0200
280 +noinst_LTLIBRARIES = lib_sparc.la
282 +noinst_HEADERS = pixel.h
284 +lib_sparc_la_SOURCES = pixel.asm
285 diff -Nur x264-snapshot-20051022-2245.orig/common/visualize.c x264-snapshot-20051022-2245/common/visualize.c
286 --- x264-snapshot-20051022-2245.orig/common/visualize.c 2005-10-22 22:45:02.000000000 +0200
287 +++ x264-snapshot-20051022-2245/common/visualize.c 2005-10-23 23:18:48.564852520 +0200
289 * pink blocks with a diagonal line are predicted using the planar function.
292 +#ifdef HAVE_CONFIG_H
299 diff -Nur x264-snapshot-20051022-2245.orig/configure.ac x264-snapshot-20051022-2245/configure.ac
300 --- x264-snapshot-20051022-2245.orig/configure.ac 1970-01-01 01:00:00.000000000 +0100
301 +++ x264-snapshot-20051022-2245/configure.ac 2005-10-24 01:03:37.053856880 +0200
303 +AC_INIT(libx264, 0.1.2)
305 +AC_CONFIG_SRCDIR([x264.c])
311 +AM_CONFIG_HEADER([config.h])
313 +# Checks for programs.
322 +AC_PATH_PROG(NASM,nasm)
323 +AC_PATH_PROG(YASM,yasm)
325 +# Checks for header files.
327 +AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/time.h sys/timeb.h])
329 +# Checks for typedefs, structures, and compiler characteristics.
335 +AC_DEFINE_UNQUOTED(X264_VERSION,["333M"],[X264 version])
337 +AH_TEMPLATE([CPU_i386],
338 + [Define as 1 if host is an IA32])
340 +AH_TEMPLATE([CPU_x8664],
341 + [Define as 1 if host is an X86_64])
343 +AH_TEMPLATE([ARCH_X86],
344 + [Define as 1 if host is a x86])
346 +AH_TEMPLATE([ARCH_X86_64],
347 + [Define as 1 if host is a x86_64])
349 +AH_TEMPLATE([ARCH_PPC],
350 + [Define as 1 if host is a ppc])
352 +AH_TEMPLATE([HAVE_MMXEXT],
353 + [Define as 1 if host supports MMX extensions])
355 +AH_TEMPLATE([HAVE_SSE2],
356 + [Define as 1 if host supports SSE2 extensions])
358 +AH_TEMPLATE([CPU_ppc],
359 + [Define as 1 if host is a ppc])
361 +AH_TEMPLATE([CPU_sparc],
362 + [Define as 1 if host is a sparc])
364 +AC_DEFINE(SYS_LINUX,1,[Define as 1 if os is Linux])
367 +case "$target_cpu" in
369 + AC_DEFINE(CPU_i386,1)
371 + AC_DEFINE(ARCH_X86,1)
373 + AC_DEFINE(HAVE_MMXEXT,1)
374 + AC_SUBST(HAVE_MMXEXT)
375 + AC_DEFINE(HAVE_SSE2,1)
376 + AC_SUBST(HAVE_SSE2)
379 + if test x"$NASM" = "x"; then
380 + AC_MSG_ERROR(nasm required for x86 build. Please Install it.)
384 + AC_DEFINE(CPU_x8664,1)
385 + AC_SUBST(CPU_x8664)
386 + AC_DEFINE(ARCH_X86_64,1)
387 + AC_SUBST(ARCH_X86_64)
388 + AC_DEFINE(HAVE_MMXEXT,1)
389 + AC_SUBST(HAVE_MMXEXT)
390 + AC_DEFINE(HAVE_SSE2,1)
391 + AC_SUBST(HAVE_SSE2)
392 + YASMFLAGS="-f elf -m amd64"
394 + if test x"$YASM" = "x"; then
395 + AC_MSG_ERROR(yasm required for x86_64 build. Please Install it.)
399 + AC_DEFINE(CPU_ppc,1)
401 + AC_DEFINE(ARCH_PPC,1)
404 + CFLAGS="$CFLAGS -maltivec -mabi=altivec"
411 +AM_CONDITIONAL(CPU_i386,[ test "$cputype" = "x86" ])
412 +AM_CONDITIONAL(CPU_x8664,[ test "$cputype" = "x8664" ])
413 +AM_CONDITIONAL(CPU_ppc,[ test "$cputype" = "ppc" ])
415 +AM_CONDITIONAL(CPU_sparc,[ false ])
417 +# Checks for library functions.
423 +AC_CHECK_FUNCS([gettimeofday memmove memset pow sqrt strcasecmp strchr strdup strstr strtol])
425 +AC_ARG_ENABLE(visualize, [--enable-visualize enable visualization],[vis="$enableval"],[vis=no])
426 +if test "$vis" = "yes" ; then
428 + LDFLAGS="$LDFLAGS $X_LIBS -lX11"
429 + AC_DEFINE(VISUALIZE,1,[Define as 1 to get visualization])
430 + CFLAGS="$CFLAGS $X_CFLAGS"
432 +AM_CONDITIONAL(VIS, [test "$vis" = "yes"])
434 +AC_CONFIG_FILES([Makefile
436 + common/amd64/Makefile
437 + common/i386/Makefile
438 + common/ppc/Makefile
439 + common/sparc/Makefile
441 +CFLAGS="$CFLAGS -D__X264__"
443 diff -Nur x264-snapshot-20051022-2245.orig/encoder/Makefile.am x264-snapshot-20051022-2245/encoder/Makefile.am
444 --- x264-snapshot-20051022-2245.orig/encoder/Makefile.am 1970-01-01 01:00:00.000000000 +0100
445 +++ x264-snapshot-20051022-2245/encoder/Makefile.am 2005-10-24 00:30:20.749341296 +0200
447 +noinst_LTLIBRARIES = lib_encoder.la
449 +lib_encoder_la_SOURCES = \
450 + analyse.c me.c ratecontrol.c set.c macroblock.c cabac.c \
451 + cavlc.c encoder.c eval.c
454 + analyse.h macroblock.h me.h ratecontrol.h set.h
455 diff -Nur x264-snapshot-20051022-2245.orig/encoder/set.c x264-snapshot-20051022-2245/encoder/set.c
456 --- x264-snapshot-20051022-2245.orig/encoder/set.c 2005-10-22 22:45:02.000000000 +0200
457 +++ x264-snapshot-20051022-2245/encoder/set.c 2005-10-24 00:31:10.081841616 +0200
459 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
460 *****************************************************************************/
462 +#ifdef HAVE_CONFIG_H
469 diff -Nur x264-snapshot-20051022-2245.orig/Makefile.am x264-snapshot-20051022-2245/Makefile.am
470 --- x264-snapshot-20051022-2245.orig/Makefile.am 1970-01-01 01:00:00.000000000 +0100
471 +++ x264-snapshot-20051022-2245/Makefile.am 2005-10-24 01:33:43.529230880 +0200
473 +SUBDIRS = common encoder
475 +lib_LTLIBRARIES = libx264.la
478 +libx264_la_SOURCES =
480 +include_HEADERS = x264.h
481 +noinst_HEADERS = matroska.h
483 +libx264_la_LIBADD = common/lib_common.la encoder/lib_encoder.la -lm
485 +x264_SOURCES = x264.c matroska.c
486 +x264_LDADD = libx264.la
487 diff -Nur x264-snapshot-20051022-2245.orig/strip_fPIC.sh x264-snapshot-20051022-2245/strip_fPIC.sh
488 --- x264-snapshot-20051022-2245.orig/strip_fPIC.sh 1970-01-01 01:00:00.000000000 +0100
489 +++ x264-snapshot-20051022-2245/strip_fPIC.sh 2005-10-23 22:43:57.648720088 +0200
493 +# taken from flac sources --qboosh
495 +# libtool assumes that the compiler can handle the -fPIC flag
496 +# This isn't always true (for example, nasm can't handle it)
499 + if [ "$1" != "-fPIC" ]; then
500 + if [ "$1" != "-DPIC" ]; then
501 + command="$command $1"
508 diff -Nur x264-snapshot-20051022-2245.orig/x264.h x264-snapshot-20051022-2245/x264.h
509 --- x264-snapshot-20051022-2245.orig/x264.h 2005-10-22 22:45:03.000000000 +0200
510 +++ x264-snapshot-20051022-2245/x264.h 2005-10-24 00:34:12.415122744 +0200
515 -#if !defined(_STDINT_H) && !defined(_STDINT_H_) && \
516 - !defined(_INTTYPES_H) && !defined(_INTTYPES_H_)
518 -# pragma message("You must include stdint.h or inttypes.h before x264.h")
520 -# warning You must include stdint.h or inttypes.h before x264.h
527 #define X264_BUILD 36