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. 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080410/61c8f03a/attachment.htm
thanks very much, It was really optimized. Now the encoding time is half. thanks again. On Thu, Apr 10, 2008 at 4:46 PM, Leonardo de Paula Rosa Piga < lpiga at terra.com.br> wrote:> Janaka, > > The -g flag adds debug information to your binary. And if you aren't > debugging it is unnecessary. In addition, if you are using gcc, by > default it doesn't make any optimization try use -O3 flag. > > The new CFLAGS could be: > > CFLAGS = -O3 -Wall $(DEFS) $(INCS) > > > Cheers, Piga > > On Thu, Apr 10, 2008 at 6:46 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. > > > > 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://www.students.ic.unicamp.br/~ra033956<http://www.students.ic.unicamp.br/%7Era033956> >-- ----------- Regards, R. P. Janaka -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080410/13df14c3/attachment-0001.htm
by inserting optimization options i was able to reduce the running time. but some functions (new thread was created for another calculation while encoding is continuing) are not working at the same time. so i tried with -O1 and -O2 also. but the results were same as before. please can anyone help me to solve this problem. On Thu, Apr 10, 2008 at 4:46 PM, Leonardo de Paula Rosa Piga < lpiga at terra.com.br> wrote:> Janaka, > > The -g flag adds debug information to your binary. And if you aren't > debugging it is unnecessary. In addition, if you are using gcc, by > default it doesn't make any optimization try use -O3 flag. > > The new CFLAGS could be: > > CFLAGS = -O3 -Wall $(DEFS) $(INCS) > > > Cheers, Piga > > On Thu, Apr 10, 2008 at 6:46 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. > > > > 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://www.students.ic.unicamp.br/~ra033956<http://www.students.ic.unicamp.br/%7Era033956> >-- Regards, R. P. Janaka -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080422/385a0b14/attachment.htm