[theora-dev] Theora got extreamly slow (Makefile.am was changed)

R. P. Janaka rpjanaka at gmail.com
Wed Apr 23 06:34:10 PDT 2008


thanks Leonardo


In my application there are two threads. One is the theora encoder the other
is a bandwidth measuring program.

Both of them are working properly when they are separated. (theora is
obviously working properly, bandwidth measuring component also working
properly)

So this problem is occurred when both these are joined (encoder is the main
thread, bandwidth measurer is the child thread)

So i think that the problem is with my makefile. Please can anyone help me
to find the problem

If you want more information I can give it


thanks in advance




On Wed, Apr 23, 2008 at 5:08 PM, Leonardo de Paula Rosa Piga <
lpiga at terra.com.br> wrote:

> Janaka,
>
> The -O2 gcc optmizations are conservative. They don't change the
> behavior of  your programs, hence, there are good chances that you
> have bugs in your implementation.
>
> On Wed, Apr 23, 2008 at 7:17 AM, R. P. Janaka <rpjanaka at gmail.com> wrote:
> > I have tried to add a plunging to the "libtheora-1.0beta2" (network
> > bandwidth measuring component was added) and Got it success for some far
> >
> > now the problem is when it is added the encoding process get extremely
> slow
> > (around 20 seconds delay).
> >
> > I think that the problem is with my modified Makefile (some flag may
> have
> > missed).
> >
> > the following is my modified Makefile.am which is in the
> > "libtheora-1.0beta2/lib" directory.
> >
> > ******************************
> >  *********************************************************
> >
> > DEFS     = -DLINUX -DRETSIGTYPE=void -DHAVE_SIGACTION=1
> > LIBS     = -lpthread
> >  INCS     = -I.
> >
> >
> > INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib
> > -I$(top_srcdir)/lib/dec -I$(top_srcdir)/lib/enc
> >
> > EXTRA_DIST = \
> >         enc/x86_32/dct_decode_mmx.c \
> >          enc/x86_32/dsp_mmx.c \
> >         enc/x86_32/dsp_mmxext.c \
> >         enc/x86_32/recon_mmx.c \
> >         enc/x86_32/fdct_mmx.c \
> >         enc/x86_32/idct_mmx.c \
> >         enc/x86_64/dsp_mmx.c \
> >         enc/x86_64/dsp_mmxext.c \
> >          enc/x86_64/recon_mmx.c \
> >         enc/x86_64/fdct_mmx.c \
> >         enc/x86_64/idct_mmx.c \
> >         enc/x86_32_vs/dsp_mmx.c \
> >         enc/x86_32_vs/fdct_mmx.c \
> >         enc/x86_32_vs/recon_mmx.c \
> >          enc/dct_encode.c \
> >          enc/encode.c \
> >         enc/encoder_toplevel.c
> >
> > lib_LTLIBRARIES = libtheora.la
> >
> > if THEORA_DISABLE_ENCODE
> > encoder_sources = \
> >     enc/encoder_disabled.c
> >  else
> >  encoder_sources = \
> >     enc/dct_encode.c \
> >     enc/encode.c \
> >     enc/encoder_huffman.c \
> >     enc/encoder_idct.c \
> >     enc/encoder_toplevel.c \
> >     ../net/nbs_client.c \
> >      ../net/nbs_setsignal.c \
> >     enc/encoder_quant.c \
> >     enc/blockmap.c \
> >     enc/common.c \
> >     enc/dct.c \
> >     enc/dct_decode.c \
> >     enc/frarray.c \
> >     enc/frinit.c \
> >      enc/mcomp.c \
> >     enc/misc_common.c \
> >     enc/pb.c \
> >     enc/pp.c \
> >     enc/reconstruct.c \
> >     enc/scan.c \
> >     enc/dsp.c
> >
> > if CPU_x86_64
> > enc_arch_dir = enc/x86_64
> > encoder_arch_sources= \
> >      $(enc_arch_dir)/dct_decode_mmx.c \
> >     $(enc_arch_dir)/dsp_mmx.c \
> >     $(enc_arch_dir)/dsp_mmxext.c \
> >     $(enc_arch_dir)/recon_mmx.c \
> >     $(enc_arch_dir)/idct_mmx.c \
> >     $(enc_arch_dir)/fdct_mmx.c
> >  else
> > if CPU_x86_32
> > enc_arch_dir = enc/x86_32
> > encoder_arch_sources= \
> >     $(enc_arch_dir)/dct_decode_mmx.c \
> >     $(enc_arch_dir)/dsp_mmx.c \
> >     $(enc_arch_dir)/dsp_mmxext.c \
> >     $(enc_arch_dir)/recon_mmx.c \
> >      $(enc_arch_dir)/idct_mmx.c \
> >     $(enc_arch_dir)/fdct_mmx.c
> > endif
> > endif
> >
> > endif
> >
> > decoder_sources = \
> >     dec/apiwrapper.c \
> >     dec/decapiwrapper.c \
> >     dec/decinfo.c \
> >     dec/decode.c \
> >      dec/dequant.c \
> >     dec/fragment.c \
> >     dec/huffdec.c \
> >     dec/idct.c \
> >     dec/info.c \
> >     dec/internal.c \
> >     dec/quant.c \
> >     dec/state.c
> >
> > if CPU_x86_64
> > decoder_x86_sources = \
> >      dec/x86/mmxidct.c \
> >     dec/x86/mmxfrag.c \
> >     dec/x86/mmxstate.c \
> >     dec/x86/x86state.c
> > else
> > if CPU_x86_32
> > decoder_x86_sources = \
> >     dec/x86/mmxidct.c \
> >     dec/x86/mmxfrag.c \
> >     dec/x86/mmxstate.c \
> >      dec/x86/x86state.c
> > endif
> > endif
> >
> > libtheora_la_SOURCES = \
> >   cpu.c \
> >     $(decoder_x86_sources) \
> >     $(decoder_sources) \
> >     $(encoder_arch_sources) \
> >     $(encoder_sources) \
> >   Version_script
> >
> > noinst_HEADERS = \
> >     cpu.h \
> >     internal.h \
> >     enc/block_inline.h \
> >     enc/codec_internal.h \
> >     enc/encoder_lookup.h \
> >     enc/encoder_huffman.h \
> >     enc/hufftables.h \
> >     enc/pp.h \
> >      enc/quant_lookup.h \
> >     enc/toplevel_lookup.h \
> >     enc/dsp.h \
> >     dec/apiwrapper.h \
> >     dec/dct.h \
> >     dec/decint.h \
> >     dec/dequant.h \
> >     dec/enquant.h \
> >     dec/huffdec.h \
> >     dec/huffman.h \
> >      dec/idct.h \
> >     dec/ocintrin.h \
> >     dec/quant.h \
> >     dec/x86/x86int.h
> >
> > CFLAGS = -g -Wall $(DEFS) $(INCS)
> >
> >
> > libtheora_la_CFLAGS = $(OGG_CFLAGS)
> >  libtheora_la_LDFLAGS = -version-info
> > @TH_LIB_CURRENT@:@TH_LIB_REVISION@:@TH_LIB_AGE@ @THEORA_LDFLAGS@
> > libtheora_la_LIBADD = $(OGG_LIBS) $(LIBS)
> >
> > debug:
> >     $(MAKE) all CFLAGS="@DEBUG@" LDFLAGS="-lefence"
> >
> > profile:
> >     $(MAKE) all CFLAGS="@PROFILE@"
> >
> >
> ***************************************************************************************
> >
> > the green color lines are newly added or modified by me.
> >
> > As a solution I used gcc optimization options also (CFLAGS = -O2 -Wall
> > $(DEFS) $(INCS))
> > In this case I got some problelmes with not working some threads as I
> > expected.
> >
> > I think there is a way to chage this makefile to work properly but
> > unfortunately I have not do it.
> >
> > please can anyone help me to find what the wrong with me.
> >
> > if the information provided with this mail is not enough to decide what
> is
> > the error, please inform me what are the additional things should I
> > provides.
> >
> >
> > --
> > Regards,
> > R. P. Janaka
> > _______________________________________________
> >  theora-dev mailing list
> >  theora-dev at xiph.org
> >  http://lists.xiph.org/mailman/listinfo/theora-dev
> >
> >
>
>
>
> --
> Leonardo de Paula Rosa Piga
> Undergraduate Computer Engineering Student
> LSC - IC - UNICAMP
> http://lampiao.lsc.ic.unicamp.br/~piga<http://lampiao.lsc.ic.unicamp.br/%7Epiga>
>



-- 
Regards,
R. P. Janaka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080423/8babaf9a/attachment-0001.htm 


More information about the theora-dev mailing list