[xiph-commits] r11068 - in experimental/derf/theora-exp: . examples include/theora lib unix

giles at svn.xiph.org giles at svn.xiph.org
Tue Mar 28 18:28:37 PST 2006


Author: giles
Date: 2006-03-28 18:28:34 -0800 (Tue, 28 Mar 2006)
New Revision: 11068

Modified:
   experimental/derf/theora-exp/examples/Makefile.am
   experimental/derf/theora-exp/include/theora/codec.h
   experimental/derf/theora-exp/include/theora/theoradec.h
   experimental/derf/theora-exp/include/theora/theoraenc.h
   experimental/derf/theora-exp/lib/Makefile.am
   experimental/derf/theora-exp/theoradec.pc.in
   experimental/derf/theora-exp/theoraenc.pc.in
   experimental/derf/theora-exp/unix/Makefile
Log:
Merge libtheorabase into libtheoradec. This means you link to just 
libtheoradec for decoder support and both libtheoraenc and libtheoradec 
for encoder support.

While the common api is useful on its own, a great deal of the included 
code was not (like the idct implementation). I believe that the 
simplicity of having only two libraries overrides the value of the 
separate, shared base library. Since libtheoradec and libtheorabase
were about the same size, this double the size of the dependency for
people using only the shared API. On the other hand, much of the shared 
API code, like theora_packet_isfoo() and the comment manipulation 
routines, is small enough to poach if the footprint is an issue, or the 
client can just link statically. Likewise, this change adds about 40 kB
to the size of encoder-only applications.

I have updated the autoconf and GNU make ("unix") builds, and 
(hopefully) all the documentation. Someone else will have to
make the corresponding change to the win32 project files.


Modified: experimental/derf/theora-exp/examples/Makefile.am
===================================================================
--- experimental/derf/theora-exp/examples/Makefile.am	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/examples/Makefile.am	2006-03-29 02:28:34 UTC (rev 11068)
@@ -2,7 +2,7 @@
 
 AM_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(OPTIMIZATION_CFLAGS)
 
-LDADD = ../lib/libtheoradec.la ../lib/libtheoraenc.la ../lib/libtheorabase.la -lm $(OGG_LIBS)
+LDADD = ../lib/libtheoradec.la ../lib/libtheoraenc.la -lm $(OGG_LIBS)
 
 bin_PROGRAMS = dump_video encoder_example $(BUILDABLE_EXAMPLES)
 

Modified: experimental/derf/theora-exp/include/theora/codec.h
===================================================================
--- experimental/derf/theora-exp/include/theora/codec.h	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/include/theora/codec.h	2006-03-29 02:28:34 UTC (rev 11068)
@@ -35,13 +35,9 @@
  * - <tt>libtheoraenc</tt>, containing routines exclusive to the encoder.
  *   You must link to this if you use any of the functions listed in
  *    \ref encfuncs.
- * - <tt>libtheoradec</tt>, containing routines exclusive to the decoder.
+ * - <tt>libtheoradec</tt>, contains the decoder and shared routines.
  *   You must link to this if you use any of the functions listed in
- *    \ref decfuncs.
- * - <tt>libtheorabase</tt>, containing routines shared by the encoder and the
- *    decoder.
- *   You must link to this if you use any of the functions in this API, not
- *    not just those listed in \ref basefuncs.*/
+ *    this API.*/
 
 /**\file
  * The shared <tt>libtheora</tt> C API.*/

Modified: experimental/derf/theora-exp/include/theora/theoradec.h
===================================================================
--- experimental/derf/theora-exp/include/theora/theoradec.h	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/include/theora/theoradec.h	2006-03-29 02:28:34 UTC (rev 11068)
@@ -149,8 +149,8 @@
 /**\defgroup decfuncs Functions for Decoding*/
 /*@{*/
 /**\name Functions for decoding
- * You must link to <tt>libtheorabase</tt> and <tt>libtheoradec</tt> if you use
- *  any of the functions in this section.
+ * You must link to <tt>libtheoradec</tt> if you use any of the 
+ * functions in this section.
  *
  * The functions are listed in the order they are used in a typical decode.
  * The basic steps are:

Modified: experimental/derf/theora-exp/include/theora/theoraenc.h
===================================================================
--- experimental/derf/theora-exp/include/theora/theoraenc.h	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/include/theora/theoraenc.h	2006-03-29 02:28:34 UTC (rev 11068)
@@ -248,8 +248,8 @@
 /**\defgroup encfuncs Functions for Encoding*/
 /*@{*/
 /**\name Functions for encoding
- * You must link to <tt>libtheorabase</tt> and <tt>libtheoraenc</tt> if you use
- *  any of the functions in this section.
+ * You must link to <tt>libtheoraenc</tt> and <tt>libtheoradec</tt>
+ *  if you use any of the functions in this section.
  *
  * The functions are listed in the order they are used in a typical encode.
  * The basic steps are:

Modified: experimental/derf/theora-exp/lib/Makefile.am
===================================================================
--- experimental/derf/theora-exp/lib/Makefile.am	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/lib/Makefile.am	2006-03-29 02:28:34 UTC (rev 11068)
@@ -1,4 +1,4 @@
-lib_LTLIBRARIES = libtheorabase.la libtheoraenc.la libtheoradec.la
+lib_LTLIBRARIES = libtheoradec.la libtheoraenc.la
 
 INCLUDES = -I $(top_srcdir)/include
 AM_CFLAGS = $(OGG_CFLAGS) $(OPTIMIZATION_CFLAGS)
@@ -38,8 +38,12 @@
 	x86/cpu.h \
 	x86/x86int.h
 
-libtheorabase_la_SOURCES = \
+libtheoradec_la_SOURCES = \
+	decinfo.c \
+	decode.c \
+	dequant.c \
 	fragment.c \
+	huffdec.c \
 	idct.c \
 	info.c \
 	internal.c \
@@ -47,8 +51,9 @@
 	state.c  \
 	$(X86ASM_FILES)
 
-libtheorabase_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@
 
+libtheoradec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@
+
 libtheoraenc_la_SOURCES = \
 	bitrate.c \
 	encinfo.c \
@@ -64,10 +69,3 @@
 
 libtheoraenc_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@
 
-libtheoradec_la_SOURCES = \
-	decinfo.c \
-	decode.c \
-	dequant.c \
-	huffdec.c
-
-libtheoradec_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ @OGG_LIBS@

Modified: experimental/derf/theora-exp/theoradec.pc.in
===================================================================
--- experimental/derf/theora-exp/theoradec.pc.in	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/theoradec.pc.in	2006-03-29 02:28:34 UTC (rev 11068)
@@ -10,5 +10,5 @@
 Version: @VERSION@
 Requires: ogg >= 1.1.1
 Conflicts:
-Libs: -L${libdir} -ltheoradec -ltheorabase
+Libs: -L${libdir} -ltheoradec
 Cflags: -I${includedir}

Modified: experimental/derf/theora-exp/theoraenc.pc.in
===================================================================
--- experimental/derf/theora-exp/theoraenc.pc.in	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/theoraenc.pc.in	2006-03-29 02:28:34 UTC (rev 11068)
@@ -10,5 +10,5 @@
 Version: @VERSION@
 Requires: ogg >= 1.1.1
 Conflicts:
-Libs: -L${libdir} -ltheoraenc -ltheorabase
+Libs: -L${libdir} -ltheoraenc -ltheoradec
 Cflags: -I${includedir}

Modified: experimental/derf/theora-exp/unix/Makefile
===================================================================
--- experimental/derf/theora-exp/unix/Makefile	2006-03-29 01:35:18 UTC (rev 11067)
+++ experimental/derf/theora-exp/unix/Makefile	2006-03-29 02:28:34 UTC (rev 11068)
@@ -3,7 +3,6 @@
 TARGETBINDIR = .
 TARGETLIBDIR = .
 # Name of the targets
-LIBTHEORABASE_TARGET = libtheorabase.a
 LIBTHEORAENC_TARGET = libtheoraenc.a
 LIBTHEORADEC_TARGET = libtheoradec.a
 DUMP_VIDEO_TARGET = dump_video
@@ -22,8 +21,8 @@
 # You may get speed increases by including flags such as -O2 or -O3 or
 #  -ffast-math, or additional flags, depending on your system and compiler.
 # The -g flag will generally include debugging information.
-#CFLAGS = -O3 -fforce-addr -fomit-frame-pointer -DOC_X86ASM
-CFLAGS = -g
+CFLAGS = -O3 -fforce-addr -fomit-frame-pointer -DOC_X86ASM
+#CFLAGS = -g
 # Libraries to link with, and the location of library files.
 # Add -lpng -lz if you want to use -DOC_DUMP_IMAGES.
 LIBS = -logg -lvorbis -lvorbisenc `sdl-config --libs`
@@ -35,20 +34,6 @@
 WORKDIR = objs
 
 # C source file lists
-LIBTHEORABASE_CSOURCES = \
-fragment.c \
-idct.c \
-info.c \
-internal.c \
-quant.c \
-state.c \
-$(if $(findstring -DOC_X86ASM,${CFLAGS}), \
-x86/mmxstate.c \
-x86/x86state.c \
-x86/mmxidct.c \
-x86/mmxfrag.c \
-x86/cpu.c \
-)
 
 LIBTHEORABASE_CHEADERS = \
 dct.h \
@@ -63,7 +48,20 @@
 decinfo.c \
 decode.c \
 dequant.c \
+fragment.c \
 huffdec.c \
+idct.c \
+info.c \
+internal.c \
+quant.c \
+state.c \
+$(if $(findstring -DOC_X86ASM,${CFLAGS}), \
+x86/mmxstate.c \
+x86/x86state.c \
+x86/mmxidct.c \
+x86/mmxfrag.c \
+x86/cpu.c \
+)
 
 LIBTHEORADEC_CHEADERS =   \
 ${LIBTHEORABASE_CHEADERS} \
@@ -98,19 +96,16 @@
 PLAYER_EXAMPLE_CSOURCES = player_example.c
 
 # Create object file list.
-LIBTHEORABASE_OBJS:= ${LIBTHEORABASE_CSOURCES:%.c=${WORKDIR}/%.o}
 LIBTHEORADEC_OBJS:= ${LIBTHEORADEC_CSOURCES:%.c=${WORKDIR}/%.o}
 LIBTHEORAENC_OBJS:= ${LIBTHEORAENC_CSOURCES:%.c=${WORKDIR}/%.o}
 DUMP_VIDEO_OBJS:= ${DUMP_VIDEO_CSOURCES:%.c=${WORKDIR}/%.o}
 ENCODER_EXAMPLE_OBJS:= ${ENCODER_EXAMPLE_CSOURCES:%.c=${WORKDIR}/%.o}
 PLAYER_EXAMPLE_OBJS:= ${PLAYER_EXAMPLE_CSOURCES:%.c=${WORKDIR}/%.o}
-ALL_OBJS:= ${LIBTHEORABASE_OBJS} ${LIBTHEORADEC_OBJS} ${LIBTHEORAENC_OBJS} \
+ALL_OBJS:= ${LIBTHEORADEC_OBJS} ${LIBTHEORAENC_OBJS} \
  ${DUMP_VIDEO_OBJS} ${ENCODER_EXAMPLE_OBJS} ${PLAYER_EXAMPLE_OBJS}
 # Create the dependency file list
 ALL_DEPS:= ${ALL_OBJS:%.o=%.d}
 # Prepend source path to file names.
-LIBTHEORABASE_CSOURCES:= ${LIBTHEORABASE_CSOURCES:%=${LIBSRCDIR}/%}
-LIBTHEORABASE_CHEADERS:= ${LIBTHEORABASE_CHEADERS:%=${LIBSRCDIR}/%}
 LIBTHEORADEC_CSOURCES:= ${LIBTHEORADEC_CSOURCES:%=${LIBSRCDIR}/%}
 LIBTHEORADEC_CHEADERS:= ${LIBTHEORADEC_CHEADERS:%=${LIBSRCDIR}/%}
 LIBTHEORAENC_CSOURCES:= ${LIBTHEORAENC_CSOURCES:%=${LIBSRCDIR}/%}
@@ -118,28 +113,21 @@
 DUMP_VIDEO_CSOURCES:= ${DUMP_VIDEO_CSOURCES:%=${BINSRCDIR}/%}
 ENCODER_EXAMPLE_CSOURCES:= ${ENCODER_EXAMPLE_CSOURCES:%=${BINSRCDIR}/%}
 PLAYER_EXAMPLE_CSOURCES:= ${PLAYER_EXAMPLE_CSOURCES:%=${BINSRCDIR}/%}
-ALL_CSOURCES:= ${LIBTHEORABASE_CSOURCES} ${LIBTHEORADEC_CSOURCES} \
- ${LIBTHEORAENC_CSOURCES} ${DUMP_VIDEO_CSOURCES} ${ENCODER_EXAMPLE_CSOURCES} \
- ${PLAYER_EXAMPLE_CSOURCES}
+ALL_CSOURCES:= ${LIBTHEORADEC_CSOURCES} ${LIBTHEORAENC_CSOURCES} \
+ ${DUMP_VIDEO_CSOURCES} ${ENCODER_EXAMPLE_CSOURCES} ${PLAYER_EXAMPLE_CSOURCES}
 # Prepand target path to file names.
-LIBTHEORABASE_TARGET:= ${TARGETLIBDIR}/${LIBTHEORABASE_TARGET}
 LIBTHEORADEC_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC_TARGET}
 LIBTHEORAENC_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC_TARGET}
 DUMP_VIDEO_TARGET:= ${TARGETBINDIR}/${DUMP_VIDEO_TARGET}
 ENCODER_EXAMPLE_TARGET:= ${TARGETBINDIR}/${ENCODER_EXAMPLE_TARGET}
 PLAYER_EXAMPLE_TARGET:= ${TARGETBINDIR}/${PLAYER_EXAMPLE_TARGET}
-ALL_TARGETS:= ${LIBTHEORABASE_TARGET} ${LIBTHEORADEC_TARGET} \
- ${LIBTHEORAENC_TARGET} ${DUMP_VIDEO_TARGET} ${ENCODER_EXAMPLE_TARGET} \
- ${PLAYER_EXAMPLE_TARGET}
+ALL_TARGETS:= ${LIBTHEORADEC_TARGET} ${LIBTHEORAENC_TARGET} \
+ ${DUMP_VIDEO_TARGET} ${ENCODER_EXAMPLE_TARGET} ${PLAYER_EXAMPLE_TARGET}
 
 # Targets:
 # Everything (default)
 all: ${ALL_TARGETS}
 
-# libtheorabase
-${LIBTHEORABASE_TARGET}: ${LIBTHEORABASE_OBJS}
-	mkdir -p ${TARGETLIBDIR}
-	ar cqs $@ ${LIBTHEORABASE_OBJS}
 # libtheoradec
 ${LIBTHEORADEC_TARGET}: ${LIBTHEORADEC_OBJS}
 	mkdir -p ${TARGETLIBDIR}
@@ -150,25 +138,23 @@
 	ar cqs $@ ${LIBTHEORAENC_OBJS}
 
 # dump_video
-${DUMP_VIDEO_TARGET}: ${DUMP_VIDEO_OBJS} ${LIBTHEORABASE_TARGET} \
-                       ${LIBTHEORADEC_TARGET}
+${DUMP_VIDEO_TARGET}: ${DUMP_VIDEO_OBJS} ${LIBTHEORADEC_TARGET}
 	mkdir -p ${TARGETBINDIR}
 	${CC} ${CFLAGS} -o $@ ${DUMP_VIDEO_OBJS} ${LIBS} \
-         ${LIBTHEORADEC_TARGET} ${LIBTHEORABASE_TARGET}
+         ${LIBTHEORADEC_TARGET}
 
 # encoder_example
-${ENCODER_EXAMPLE_TARGET}: ${ENCODER_EXAMPLE_OBJS} ${LIBTHEORABASE_TARGET} \
+${ENCODER_EXAMPLE_TARGET}: ${ENCODER_EXAMPLE_OBJS} ${LIBTHEORADEC_TARGET} \
                             ${LIBTHEORAENC_TARGET}
 	mkdir -p ${TARGETBINDIR}
 	${CC} ${CFLAGS} -o $@ ${ENCODER_EXAMPLE_OBJS} ${LIBS} \
-         ${LIBTHEORAENC_TARGET} ${LIBTHEORABASE_TARGET}
+         ${LIBTHEORAENC_TARGET} ${LIBTHEORADEC_TARGET}
 
 # player_example
-${PLAYER_EXAMPLE_TARGET}: ${PLAYER_EXAMPLE_OBJS} ${LIBTHEORABASE_TARGET} \
-                           ${LIBTHEORADEC_TARGET}
+${PLAYER_EXAMPLE_TARGET}: ${PLAYER_EXAMPLE_OBJS} ${LIBTHEORADEC_TARGET}
 	mkdir -p ${TARGETBINDIR}
 	${CC} ${CFLAGS} -o $@ ${PLAYER_EXAMPLE_OBJS} ${LIBS} \
-         ${LIBTHEORADEC_TARGET} ${LIBTHEORABASE_TARGET}
+         ${LIBTHEORADEC_TARGET}
 
 # Remove all targets.
 clean:



More information about the commits mailing list