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