[prev in list] [next in list] [prev in thread] [next in thread] 

List:       theora-dev
Subject:    Re: [theora-dev] Delay occurred when the makefile change
From:       "R. P. Janaka" <rpjanaka () gmail ! com>
Date:       2008-04-22 6:50:21
Message-ID: de1942f0804212350w3a3433dcy725ec209a9e5edd8 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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@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

[Attachment #5 (text/html)]

by inserting optimization options i was able to reduce the running time.<br><br>but \
some functions (new thread was created for another calculation while encoding is \
continuing) are not working at the same time.<br><br>so i tried with -O1 and -O2 \
also. but the results were same as before.<br> <br>please can anyone help me to solve \
this problem.<br><br><br><br><div class="gmail_quote">On Thu, Apr 10, 2008 at 4:46 \
PM, Leonardo de Paula Rosa Piga &lt;<a \
href="mailto:lpiga@terra.com.br">lpiga@terra.com.br</a>&gt; 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 -g flag adds debug information to your binary. And if you aren&#39;t<br>
debugging it is unnecessary. In addition, if you are using gcc, by<br>
default it doesn&#39;t make any optimization try use -O3 flag.<br>
<br>
The new CFLAGS could be:<br>
<br>
CFLAGS = -O3 -Wall $(DEFS) $(INCS)<br>
<br>
<br>
Cheers, Piga<br>
<div><div></div><div class="Wj3C7c"><br>
On Thu, Apr 10, 2008 at 6:46 AM, R. P. Janaka &lt;<a \
href="mailto:rpjanaka@gmail.com">rpjanaka@gmail.com</a>&gt; wrote:<br> &gt; I have \
tried to add a plunging to the &quot;libtheora-1.0beta2&quot; (network<br> &gt; \
bandwidth measuring component was added) and Got it success for some far<br> &gt;<br>
&gt; now the problem is when it is added the encoding process get extremely slow<br>
&gt; (around 20 seconds delay).<br>
&gt;<br>
&gt; I think that the problem is with my modified Makefile (some flag may have<br>
&gt; missed).<br>
&gt;<br>
&gt; the following is my modified Makefile.am which is in the<br>
&gt; &quot;libtheora-1.0beta2/lib&quot; directory.<br>
&gt;<br>
&gt; ***************************************************************************************<br>
 &gt;<br>
&gt; DEFS &nbsp; &nbsp; = -DLINUX -DRETSIGTYPE=void -DHAVE_SIGACTION=1<br>
&gt; LIBS &nbsp; &nbsp; = -lpthread<br>
&gt; &nbsp;INCS &nbsp; &nbsp; = -I.<br>
&gt;<br>
&gt;<br>
&gt; INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib<br>
&gt; -I$(top_srcdir)/lib/dec -I$(top_srcdir)/lib/enc<br>
&gt;<br>
&gt; EXTRA_DIST = \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32/dct_decode_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enc/x86_32/dsp_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32/dsp_mmxext.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32/recon_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32/fdct_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32/idct_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_64/dsp_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_64/dsp_mmxext.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enc/x86_64/recon_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_64/fdct_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_64/idct_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32_vs/dsp_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32_vs/fdct_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/x86_32_vs/recon_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/dct_encode.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enc/encode.c \<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; enc/encoder_toplevel.c<br>
&gt;<br>
&gt; lib_LTLIBRARIES = <a href="http://libtheora.la" \
target="_blank">libtheora.la</a><br> &gt;<br>
&gt; if THEORA_DISABLE_ENCODE<br>
&gt; encoder_sources = \<br>
&gt; &nbsp; &nbsp; enc/encoder_disabled.c<br>
&gt; else<br>
&gt; &nbsp;encoder_sources = \<br>
&gt; &nbsp; &nbsp; enc/dct_encode.c \<br>
&gt; &nbsp; &nbsp; enc/encode.c \<br>
&gt; &nbsp; &nbsp; enc/encoder_huffman.c \<br>
&gt; &nbsp; &nbsp; enc/encoder_idct.c \<br>
&gt; &nbsp; &nbsp; enc/encoder_toplevel.c \<br>
&gt; &nbsp; &nbsp; ../net/nbs_client.c \<br>
&gt; &nbsp; &nbsp; &nbsp;../net/nbs_setsignal.c \<br>
&gt; &nbsp; &nbsp; enc/encoder_quant.c \<br>
&gt; &nbsp; &nbsp; enc/blockmap.c \<br>
&gt; &nbsp; &nbsp; enc/common.c \<br>
&gt; &nbsp; &nbsp; enc/dct.c \<br>
&gt; &nbsp; &nbsp; enc/dct_decode.c \<br>
&gt; &nbsp; &nbsp; enc/frarray.c \<br>
&gt; &nbsp; &nbsp; enc/frinit.c \<br>
&gt; &nbsp; &nbsp; &nbsp;enc/mcomp.c \<br>
&gt; &nbsp; &nbsp; enc/misc_common.c \<br>
&gt; &nbsp; &nbsp; enc/pb.c \<br>
&gt; &nbsp; &nbsp; enc/pp.c \<br>
&gt; &nbsp; &nbsp; enc/reconstruct.c \<br>
&gt; &nbsp; &nbsp; enc/scan.c \<br>
&gt; &nbsp; &nbsp; enc/dsp.c<br>
&gt;<br>
&gt; if CPU_x86_64<br>
&gt; enc_arch_dir = enc/x86_64<br>
&gt; encoder_arch_sources= \<br>
&gt; &nbsp; &nbsp; &nbsp;$(enc_arch_dir)/dct_decode_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/dsp_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/dsp_mmxext.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/recon_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/idct_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/fdct_mmx.c<br>
&gt; &nbsp;else<br>
&gt; if CPU_x86_32<br>
&gt; enc_arch_dir = enc/x86_32<br>
&gt; encoder_arch_sources= \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/dct_decode_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/dsp_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/dsp_mmxext.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/recon_mmx.c \<br>
&gt; &nbsp; &nbsp; &nbsp;$(enc_arch_dir)/idct_mmx.c \<br>
&gt; &nbsp; &nbsp; $(enc_arch_dir)/fdct_mmx.c<br>
&gt; endif<br>
&gt; endif<br>
&gt;<br>
&gt; endif<br>
&gt;<br>
&gt; decoder_sources = \<br>
&gt; &nbsp; &nbsp; dec/apiwrapper.c \<br>
&gt; &nbsp; &nbsp; dec/decapiwrapper.c \<br>
&gt; &nbsp; &nbsp; dec/decinfo.c \<br>
&gt; &nbsp; &nbsp; dec/decode.c \<br>
&gt; &nbsp; &nbsp; &nbsp;dec/dequant.c \<br>
&gt; &nbsp; &nbsp; dec/fragment.c \<br>
&gt; &nbsp; &nbsp; dec/huffdec.c \<br>
&gt; &nbsp; &nbsp; dec/idct.c \<br>
&gt; &nbsp; &nbsp; dec/info.c \<br>
&gt; &nbsp; &nbsp; dec/internal.c \<br>
&gt; &nbsp; &nbsp; dec/quant.c \<br>
&gt; &nbsp; &nbsp; dec/state.c<br>
&gt;<br>
&gt; if CPU_x86_64<br>
&gt; decoder_x86_sources = \<br>
&gt; &nbsp; &nbsp; &nbsp;dec/x86/mmxidct.c \<br>
&gt; &nbsp; &nbsp; dec/x86/mmxfrag.c \<br>
&gt; &nbsp; &nbsp; dec/x86/mmxstate.c \<br>
&gt; &nbsp; &nbsp; dec/x86/x86state.c<br>
&gt; else<br>
&gt; if CPU_x86_32<br>
&gt; decoder_x86_sources = \<br>
&gt; &nbsp; &nbsp; dec/x86/mmxidct.c \<br>
&gt; &nbsp; &nbsp; dec/x86/mmxfrag.c \<br>
&gt; &nbsp; &nbsp; dec/x86/mmxstate.c \<br>
&gt; &nbsp; &nbsp; &nbsp;dec/x86/x86state.c<br>
&gt; endif<br>
&gt; endif<br>
&gt;<br>
&gt; libtheora_la_SOURCES = \<br>
&gt; &nbsp; cpu.c \<br>
&gt; &nbsp; &nbsp; $(decoder_x86_sources) \<br>
&gt; &nbsp; &nbsp; $(decoder_sources) \<br>
&gt; &nbsp; &nbsp; $(encoder_arch_sources) \<br>
&gt; &nbsp; &nbsp; $(encoder_sources) \<br>
&gt; &nbsp; Version_script<br>
&gt;<br>
&gt; noinst_HEADERS = \<br>
&gt; &nbsp; &nbsp; cpu.h \<br>
&gt; &nbsp; &nbsp; internal.h \<br>
&gt; &nbsp; &nbsp; enc/block_inline.h \<br>
&gt; &nbsp; &nbsp; enc/codec_internal.h \<br>
&gt; &nbsp; &nbsp; enc/encoder_lookup.h \<br>
&gt; &nbsp; &nbsp; enc/encoder_huffman.h \<br>
&gt; &nbsp; &nbsp; enc/hufftables.h \<br>
&gt; &nbsp; &nbsp; enc/pp.h \<br>
&gt; &nbsp; &nbsp; &nbsp;enc/quant_lookup.h \<br>
&gt; &nbsp; &nbsp; enc/toplevel_lookup.h \<br>
&gt; &nbsp; &nbsp; enc/dsp.h \<br>
&gt; &nbsp; &nbsp; dec/apiwrapper.h \<br>
&gt; &nbsp; &nbsp; dec/dct.h \<br>
&gt; &nbsp; &nbsp; dec/decint.h \<br>
&gt; &nbsp; &nbsp; dec/dequant.h \<br>
&gt; &nbsp; &nbsp; dec/enquant.h \<br>
&gt; &nbsp; &nbsp; dec/huffdec.h \<br>
&gt; &nbsp; &nbsp; dec/huffman.h \<br>
&gt; &nbsp; &nbsp; &nbsp;dec/idct.h \<br>
&gt; &nbsp; &nbsp; dec/ocintrin.h \<br>
&gt; &nbsp; &nbsp; dec/quant.h \<br>
&gt; &nbsp; &nbsp; dec/x86/x86int.h<br>
&gt;<br>
&gt; CFLAGS = -g -Wall $(DEFS) $(INCS)<br>
&gt;<br>
&gt;<br>
&gt; libtheora_la_CFLAGS = $(OGG_CFLAGS)<br>
&gt; &nbsp;libtheora_la_LDFLAGS = -version-info<br>
&gt; @TH_LIB_CURRENT@:@TH_LIB_REVISION@:@TH_LIB_AGE@ @THEORA_LDFLAGS@<br>
&gt; libtheora_la_LIBADD = $(OGG_LIBS) $(LIBS)<br>
&gt;<br>
&gt; debug:<br>
&gt; &nbsp; &nbsp; $(MAKE) all CFLAGS=&quot;@DEBUG@&quot; \
LDFLAGS=&quot;-lefence&quot;<br> &gt;<br>
&gt; profile:<br>
&gt; &nbsp; &nbsp; $(MAKE) all CFLAGS=&quot;@PROFILE@&quot;<br>
&gt;<br>
&gt; ***************************************************************************************<br>
 &gt;<br>
&gt; the green color lines are newly added or modified by me.<br>
&gt;<br>
&gt; please can anyone help me to find what the wrong with me.<br>
&gt;<br>
&gt; if the information provided with this mail is not enough to decide what is<br>
&gt; the error, please inform me what are the additional things should I<br>
&gt; provides.<br>
&gt;<br>
&gt; --<br>
&gt; -----------<br>
&gt; Regards,<br>
&gt; R. P. Janaka<br>
</div></div>&gt; _______________________________________________<br>
&gt; &nbsp;theora-dev mailing list<br>
&gt; &nbsp;<a href="mailto:theora-dev@xiph.org">theora-dev@xiph.org</a><br>
&gt; &nbsp;<a href="http://lists.xiph.org/mailman/listinfo/theora-dev" \
target="_blank">http://lists.xiph.org/mailman/listinfo/theora-dev</a><br> &gt;<br>
&gt;<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://www.students.ic.unicamp.br/%7Era033956" \
target="_blank">http://www.students.ic.unicamp.br/~ra033956</a><br> \
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>R. P. Janaka



_______________________________________________
theora-dev mailing list
theora-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic