<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Fri, 10 Feb 2012 05:23:13 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/software-development-toolsuite-atom-kb/type/tips-and-techniques/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles Feed</title>
    <link>http://software.intel.com/en-us/articles/software-development-toolsuite-atom-kb/type/tips-and-techniques/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>How to find active speech level (audio level) using Intel® IPP function?</title>
      <description><![CDATA[ <p>Using the following piece of code, one can find audio level.</p>
<pre name="code" class="cpp">{
      Ipp32f tmpMinS,tmpMaxS;

      Ipp32f m_PeakAmpdB;

       ippsMinMax_32f(fileData, sizeSamples, &amp;tmpMinS, &amp;tmpMaxS);

      Ipp32f maxAbsSample = IPP_MAX(fabs(tmpMinS),fabs(tmpMaxS));

      if(maxAbsSample &gt; 0) {

            m_PeakAmpdB = 20.f * log10(maxAbsSample / 32768.f);

      } else {

      m_PeakAmpdB = -91.f;

      }

}

</pre>
<p><br />In this code, Amp(dB) = 20 lg(S/N), where S- random signal, N - noise. If S=1 then Amp(dB) = 20 lg(1/N) = -91 – this is silence.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/how-to-find-active-speech-level-audio-level-using-intel-ipp-function/</link>
      <pubDate>Sun, 23 Jan 2011 10:30:00 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/how-to-find-active-speech-level-audio-level-using-intel-ipp-function/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/how-to-find-active-speech-level-audio-level-using-intel-ipp-function/</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
      <category>Intel® Integrated Performance Primitives Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>Build Xorg X11 applications using Intel compiler on Moblin system</title>
      <description><![CDATA[     <br />    This article describes how to build the xorg x11 applications using Intel® compiler on Moblin system. The X.Org project provides an open source implementation of the X Window System. For more details related X applications, please visit <a href="http://www.x.org">http://www.x.org</a>. We use the latest Moblin2.1 image for netbooks as the OS system. The image can be found from http://moblin.org/downloads or you can download it directly from <a href="http://mirrors.kernel.org/moblin/releases/2.1/images/moblin-2.1-final-20091103-002.img">http://mirrors.kernel.org/moblin/releases/2.1/images/moblin-2.1-final-20091103-002.img</a>. <br /><br /><strong><span class="sectionHeading">1. Setup the build environment<br /></span><br />1.1 Setup yum.<br /></strong>    First of all, we need to setup the yum configuration to make the yum works. Yum is a very convenient tool to install the software and download the source. In this tutorial, we will download and install the applications from <a href="http://repo.moblin.org/moblin/releases/2.1/">http://repo.moblin.org/moblin/releases/2.1/</a>, and we will use the xorg x11 application sources downloaded from <a href="http://repo.moblin.org/moblin/releases/2.1/source/">http://repo.moblin.org/moblin/releases/2.1/source/</a>. <br /><br /><strong>1.2 Install gcc, gcc-c++ and other necessary applications.<br /></strong>    Once the yum is configured successfully, you can install the applications by “yum install” command. For example, we use the following command to install gcc and g++.<br />       $sudo yum install gcc gcc-c++<br />The gcc version we use in this tutorial is gcc 4.3.2.<br />    You may need to install lots of other applications such as make, autoconf, rpm-build etc using yum. However we won’t have to install it as of now. You can install the related applications during our build when the build system reports that xxx application is required.<br /><br /><strong><span class="sectionHeading">2. Prepare the xorg x11 application sources<br /></span><br />2.1 We use the following command</strong> to download the xorg x11 application sources.<br />       $ cd ~/Download<br />       $ yumdownloader –source xorg-x11*<br />    Total 78 application sources rpm package will be downloaded to your local folder. All rpm packages have a name with prefix “xorg-x11-“. Please refer to the reference section of this article for the detailed application list.<br /><br /><strong>2.2 Extract the sources<br /></strong>    We will use the tool “rpmbuild” to build the applications. If you don’t have ‘rpmbuild‘ command in your system, you can install it by “sudo yum install rpm-build”. In the ~/Download folder, execute:<br />        $ rpm –ivh *<br />then goto folder ~/rpmbuild/SPECS/, you will find lots of .spec files. We will use these spec files to build the xorg x11 applications.<br /><br /><strong class="sectionHeading">3. Build xorg x11 applications with gcc<br /></strong>    Now we are in the folder ~/rpmbuild/SPECS. We can use the following command to build one X org application like xorg-x11-apps.spec<br />        $ rpmbuild –bb –target=i586 xorg-x11-apps.spec<br />    The rpmbuild may report that ‘xxx’ is needed by xorg-x11-apps application. For example:<br />libX11-devel is needed by xorg-x11-apps-7.3.6-6.7.moblin2.src<br />    If the above error occurs, as we talked in previous section, we can just use ‘sudo yum install libX11-devel’ to install the necessary package. Sometimes, the required package name is not very clear for install, for example, it report that ‘xt’ is required, that actually request for package ‘libXt-devel’.<br />    If the package dependence issue was resolved, the build should start smoothly. The application source will be extracted to ~/rpmbuild/BUILD. After the build is successful, you will find the generated rpm packages in folder ~/rpmbuild/RPMS/i586/.<br />    For gcc build, all 78 applications are successfully built.<br /><br /><strong><span class="sectionHeading">4. Build xorg x11 applications with icc<br /></span><br />4.1 Install icc and set up icc build environment<br /></strong>    We use the Intel® C/C++ Compiler for linux 11.1.069 for build. Please make sure the compiler is successfully installed on the system. Before we start the build with icc, we need to call the following command to set up the build environment.<br />        $source /opt/intel/Compiler/11.1/069/bin/iccvars.sh ia32<br /><br /><strong>4.2 Build application with icc<br /></strong>    The application dependence has already been resolved during gcc build. We don’t need to install any new packages during icc build. <br />    In the folder ~/rpmbuild/SPECS, we do the following:<br />       a) $export CC=icc<br />       b) $export LDFLAGS=”$LDFLAGS -Wl,--build-id”<br />       c) $vi /usr/lib/rpm/redhat/macros<br />    The step a) is to set the build compiler to icc. <br />    The step b) is to set the linker options during icc build, otherwise you will find ‘no build ID note found’’ error during build. For details you can refer <a href="http://software.intel.com/en-us/articles/no-build-id-note-found-error-when-building-with-intel-compiler/">http://software.intel.com/en-us/articles/no-build-id-note-found-error-when-building-with-intel-compiler/</a>. <br />    In step c), in the file macros, we need to search __global_cflags, change the macro –D_FORTIFY_SOURCE=2 to –D_FORTIFY_SOURCE=0. The details in KB <a href="http://software.intel.com/en-us/articles/undefined-reference-to-_builtin_va_arg_pack-error/">http://software.intel.com/en-us/articles/undefined-reference-to-_builtin_va_arg_pack-error/</a>.  <br />    Similar as gcc build, we then call the following command to build the application:<br />        $ rpmbuild –bb –target=i586 xxx.spec<br />    There will have 76 applications built successfully and two applications built failed.<br />    For the xorg-x11-drv-keyboard application failure, please refer <a href="http://software.intel.com/en-us/articles/build-xorg-x11-drv-keyboard-using-intel-compiler/">http://software.intel.com/en-us/articles/build-xorg-x11-drv-keyboard-using-intel-compiler/</a>.  <br />    For the xorg-x11-font-utils application failure, please refer <a href="http://software.intel.com/en-us/articles/build-xorg-x11-font-utils-using-intel-compiler/">http://software.intel.com/en-us/articles/build-xorg-x11-font-utils-using-intel-compiler/</a>.  <br /><br /><strong>4.3 Build with –xSSE3_ATOM option<br /></strong>    We can add more advanced options for icc build. For example, we can add option –xSSE3_ATOM option for Intel® Atom™ architecture. Open the file /usr/lib/rpm/redhat/macros, add –xSSE3_ATOM option for macro ‘__global_cflags’ and rebuild the application with icc.<br /><br /><strong><span class="sectionHeading">5. Reference<br /></span><br />5.1 The related KBs for Xorg X11 applications build.</strong><br />    <a href="http://software.intel.com/en-us/articles/no-build-id-note-found-error-when-building-with-intel-compiler/">http://software.intel.com/en-us/articles/no-build-id-note-found-error-when-building-with-intel-compiler/</a><br />    <a href="http://software.intel.com/en-us/articles/undefined-reference-to-_builtin_va_arg_pack-error/">http://software.intel.com/en-us/articles/undefined-reference-to-_builtin_va_arg_pack-error/</a> <br />    <a href="http://software.intel.com/en-us/articles/build-xorg-x11-drv-keyboard-using-intel-compiler/">http://software.intel.com/en-us/articles/build-xorg-x11-drv-keyboard-using-intel-compiler/</a>  <br />    <a href="http://software.intel.com/en-us/articles/build-xorg-x11-font-utils-using-intel-compiler/">http://software.intel.com/en-us/articles/build-xorg-x11-font-utils-using-intel-compiler/</a>  <br /><br /><strong>5.2 The Xorg X11 application source list we built.</strong><br />xorg-x11-apps-7.3-6.7.moblin2.src.rpm<br />xorg-x11-drv-evdev-2.2.1-1.5.moblin2.src.rpm<br />xorg-x11-drv-evtouch-0.8.8-1.2.moblin2.src.rpm<br />xorg-x11-drv-intel-2.9.0-8.1.moblin2.src.rpm<br />xorg-x11-drv-keyboard-1.3.2-1.44.moblin2.src.rpm<br />xorg-x11-drv-kvm-1.2.1-1.8.moblin2.src.rpm<br />xorg-x11-drv-mouse-1.4.0-1.44.moblin2.src.rpm<br />xorg-x11-drv-synaptics-1.1.2-1.1.moblin2.src.rpm<br />xorg-x11-drv-vesa-2.2.0-1.4.moblin2.src.rpm<br />xorg-x11-drv-vmmouse-12.6.3-1.30.moblin2.src.rpm<br />xorg-x11-drv-vmware-10.16.5-1.8.moblin2.src.rpm<br />xorg-x11-drv-void-1.1.1-19.56.moblin2.src.rpm<br />xorg-x11-filesystem-7.3-3.112.moblin2.src.rpm<br />xorg-x11-font-utils-7.2-7.23.moblin2.src.rpm<br />xorg-x11-fonts-7.2-9.39.moblin2.src.rpm<br />xorg-x11-proto-bigreqsproto-1.0.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-compositeproto-0.4-2.30.moblin2.src.rpm<br />xorg-x11-proto-damageproto-1.1.0-2.30.moblin2.src.rpm<br />xorg-x11-proto-dmxproto-2.2.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-dri2proto-2.1-1.2.moblin2.src.rpm<br />xorg-x11-proto-evieext-1.0.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-fixesproto-4.0-2.30.moblin2.src.rpm<br />xorg-x11-proto-fontcacheproto-0.1.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-fontsproto-2.0.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-glproto-1.4.9-2.30.moblin2.src.rpm<br />xorg-x11-proto-inputproto-1.5.0-1.12.moblin2.src.rpm<br />xorg-x11-proto-kbproto-1.0.3-2.30.moblin2.src.rpm<br />xorg-x11-proto-randrproto-1.3.0-1.1.moblin2.src.rpm<br />xorg-x11-proto-recordproto-1.13.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-renderproto-0.9.3-2.30.moblin2.src.rpm<br />xorg-x11-proto-resourceproto-1.0.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-scrnsaverproto-1.1.0-2.30.moblin2.src.rpm<br />xorg-x11-proto-trapproto-3.4.3-3.18.moblin2.src.rpm<br />xorg-x11-proto-videoproto-2.2.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xcmiscproto-1.1.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xextproto-7.0.5-1.1.moblin2.src.rpm<br />xorg-x11-proto-xf86bigfontproto-1.1.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xf86dgaproto-2.0.3-2.30.moblin2.src.rpm<br />xorg-x11-proto-xf86driproto-2.0.4-2.30.moblin2.src.rpm<br />xorg-x11-proto-xf86miscproto-0.9.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xf86rushproto-1.1.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xf86vidmodeproto-2.2.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xineramaproto-1.1.2-2.30.moblin2.src.rpm<br />xorg-x11-proto-xproto-7.0.15-1.1.moblin2.src.rpm<br />xorg-x11-proto-xproxymanagementprotocol-1.0.2-2.30.moblin2.src.rpm<br />xorg-x11-server-1.6.4.901-7.10.moblin2.src.rpm<br />xorg-x11-server-utils-7.4-6.31.moblin2.src.rpm<br />xorg-x11-twm-1.0.4-3.66.moblin2.src.rpm<br />xorg-x11-util-macros-1.2.1-1.29.moblin2.src.rpm<br />xorg-x11-utils-7.4-8.1.moblin2.src.rpm<br />xorg-x11-utils-iceauth-1.0.2-2.28.moblin2.src.rpm<br />xorg-x11-utils-rgb-1.0.3-1.16.moblin2.src.rpm<br />xorg-x11-utils-sessreg-1.0.4-2.28.moblin2.src.rpm<br />xorg-x11-utils-xcmsdb-1.0.1-2.28.moblin2.src.rpm<br />xorg-x11-utils-xdpyinfo-1.0.3-1.7.moblin2.src.rpm<br />xorg-x11-utils-xdriinfo-1.0.2-1.8.moblin2.src.rpm<br />xorg-x11-utils-xev-1.0.2-1.6.moblin2.src.rpm<br />xorg-x11-utils-xfd-1.0.1-1.7.moblin2.src.rpm<br />xorg-x11-utils-xfontsel-1.0.2-1.7.moblin2.src.rpm<br />xorg-x11-utils-xgamma-1.0.2-2.27.moblin2.src.rpm<br />xorg-x11-utils-xhost-1.0.2-2.28.moblin2.src.rpm<br />xorg-x11-utils-xlsatoms-1.0.1-1.7.moblin2.src.rpm<br />xorg-x11-utils-xlsclients-1.0.1-1.7.moblin2.src.rpm<br />xorg-x11-utils-xlsfonts-1.0.2-1.6.moblin2.src.rpm<br />xorg-x11-utils-xmodmap-1.0.3-2.28.moblin2.src.rpm<br />xorg-x11-utils-xprop-1.0.4-1.6.moblin2.src.rpm<br />xorg-x11-utils-xrandr-1.3.0-1.5.moblin2.src.rpm<br />xorg-x11-utils-xrdb-1.0.5-2.27.moblin2.src.rpm<br />xorg-x11-utils-xrefresh-1.0.2-2.28.moblin2.src.rpm<br />xorg-x11-utils-xset-1.0.4-3.14.moblin2.src.rpm<br />xorg-x11-utils-xsetroot-1.0.2-2.27.moblin2.src.rpm<br />xorg-x11-utils-xvinfo-1.0.2-1.7.moblin2.src.rpm<br />xorg-x11-utils-xwininfo-1.0.4-1.7.moblin2.src.rpm<br />xorg-x11-xauth-1.0.3-2.27.moblin2.src.rpm<br />xorg-x11-xbitmaps-1.0.1-7.111.moblin2.src.rpm<br />xorg-x11-xinit-1.1.1-9.1.moblin2.src.rpm<br />xorg-x11-xkb-utils-7.2-8.19.moblin2.src.rpm<br />xorg-x11-xtrans-devel-1.2.3-1.1.moblin2.src.rpm<br /><br /><br />
<div id="art_pre_template"></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/build-xorg-x11-applications-using-intel-compiler-on-moblin-system/</link>
      <pubDate>Thu, 25 Mar 2010 09:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/build-xorg-x11-applications-using-intel-compiler-on-moblin-system/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/build-xorg-x11-applications-using-intel-compiler-on-moblin-system/</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>How to build ffmpeg to run under Moblin 2</title>
      <description><![CDATA[ <div class="Section1">
<p class="MsoNormal"><span class="sectionBodyText"><br />The application ‘ffmpeg’ consist of three executables and 5 libraries. All the sources can be downloaded using the following svn command:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal" ><span >Ø<span >      </span></span><span class="sectionBodyText">svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg </span></p>
<p class="MsoNormal"><span > </span><strong class="sectionHeading">Required patch</strong></p>
<p class="MsoNormal"><span class="sectionBodyText">One version which I tried ( download: svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg –r 17944)</span></p>
<p class="sectionBodyText">has a known problem with the sources. If you try to build the code, then you will get a compile time error:</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">libswscale/swscale.c:488: error: ‘PIX_FMT_YUV420PLE’ undeclared</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">The solution is solved by copying the contents of the libswscale directory from .</span><span ><span class="sectionBodyText">  </span> <a href="http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2" title="http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2" >http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2</a>    (see </span><span lang="EN" ><a href="http://www.ffmpeg.org/download.html" >http://www.ffmpeg.org/download.html</a>)</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Please Note, <b><i>only</i></b> the libswscale directory should be copied <b><i>over the top</i></b> of the existing files.</span></p>
<h3> </h3>
<h3><span class="sectionHeading" lang="FR">Build Instructions</span></h3>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Following instructions will help you build ffmpeg under a Linux system assuming that the tar ball from the download is copied to &lt;install_directory&gt;:<br /></span><br /> Ø      cd  &lt;install_directory&gt;<br /><br /> Ø      cd tar xvfz  ffmpeg.tar.gz   #Extract the tar ball to your local directory. You will find a directory tree under the name ffmpeg installed. All the required sources are installed within this tree provided that you are not enabling any additional third party libraries.<br /><br /> Ø      cd ffmpeg</p>
<p class="sectionBodyText"> Ø      ./configure –help &lt;cr&gt; # to show all the options available to rebuild ffmpeg. For a reference build with <b>gcc</b> there is no need to provide any parameters to configure. However if you would like to enable any third party libraries like ‘libfaad’, ‘libx264’ etc. then you need to add --enable-libfaad --enable-libx264 etc. as parameters to configure. If this is required make sure that you have these sources available on your development environment and that the third party libraries are rebuilt with the selected compiler / compiler options.</p>
<p class="sectionBodyText"> Ø      ./configure &lt;parameters as below&gt;</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      make &lt;cr&gt; #recommended sequence is ‘make clean’ followed by ‘make’. The rebuild will take several minutes (depending on your development environment). Two versions of each executable are produced: ex. ‘ffmpeg’ and ‘ffmpeg_g’. The ‘*_g’ contains the executable with debug information while the ‘*’ is the stripped version. In addition ‘ffplay, ffplay_g, ffserver and ffserver_g’ are produced as executables and libavutil, libavcodec, libavformat, libavdevice and libswscale are rebuilt.</p>
<p class="sectionHeadingText"> <b><span >Icc build</span></b>:</p>
<p class="MsoNormal"><span class="sectionBodyText">Depending on what version of icc you are using different configure parameters may be necessary.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">Using icc v10.1.xxx:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure cc=icc --extra-cflags=”-xL –O3” --extra-libs=-lsvml &lt;cr&gt; # Without linking in the extra library (libsvml.so) you get several references unresolved.</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">Using icc v11.0.xxx:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure cc=icc –extra-cflags=”-xSSE3_ATOM –O3” –extra-libs=-lsvml &lt;cr&gt; #  The option –xSSE3_ATOM do require that you run the code on a processor which does support the ‘movbe’ instruction. If you would like to test the code on a processor not supporting the ‘movbe’ instruction you can add the option ‘-minstruction=nomovbe’ in the extra-cflag part of the command line above.<br />Ø      Make sure that the LD (linker) options do not contain ‘–march=generic’ in the config.mak file. This option causes an error from the compiler.<br /><span class="sectionBodyText"><br />Using icc v11.1.xxx:<br /></span><br />Ø      To avoid a run time erratum following source change is needed:   Open file ./libavcodec/x86/dsputil_mmx.c and on line #2944 insert // before || __ICC &gt; 1100. The line is highlighted below.</p>
<p class="MsoNormal" ><span ><v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f" id="_x0000_t75"><v:stroke join></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></v:path><o:lock v:ext="edit" aspectratio="t"></o:lock></v:shapetype><v:shape type="#_x0000_t75" id="_x0000_s1025" ><v:imagedata src="new_page_21_files/image001.png"><img height="151" width="576" src="http://software.intel.com/file/22666" /></v:imagedata></v:shape></span><br /><br />Ø      After the change it will look like: #if ARCH_X86_64 || ! ( __ICC) // || __ICC &gt; 1100</p>
<p class="MsoNormal" ><span class="sectionBodyText"></span></p>
<p class="sectionBodyText" >Ø      ./configure cc=icc –extra-cflags=”-xSSE3_ATOM –O3” &lt;cr&gt; # This simple configure does work but you get better performance if you also add the ‘--extra-lib=-lsvml’. Additional compiler switches can be used to improve the performance – for example ‘-no-prec-div’, ‘-vec-‘. As the no-prec-div has an effect on the fp calculations please refer to the compiler documentation before it is used. In addition the ‘-xSSE3_ATOM’ switch are no longer requiring a processor with ‘movbe’ support.</p>
<p class="sectionHeadingText"> Cross compilation.</p>
<p class="MsoNormal"><span class="sectionBodyText">It is standard practice to build the library and executables on a development machine and then copy the resultant files to the MOBLIN target.  You can use the option --enable–cross-compile in this case.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal" ><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Once you have completed the configure stage you can just run the ‘make clean’ followed by ‘make’. You could expect additional warnings produced.</span></p>
<p class="MsoNormal"><span class="sectionHeading"></span></p>
<p class="MsoNormal"><b><span ><span class="sectionHeading">Building ffmpeg with third party libraries:</span></span></b></p>
<p class="MsoNormal"><b><span ><span class="sectionHeading"></span></span></b></p>
<p class="MsoNormal"><span class="sectionBodyText">The application can support 21 different external 3<sup>rd</sup> party libraries. Each of those are selected in the configure process by adding the option ‘--enable-&lt;library-name&gt;’. </span></p>
<p class="MsoNormal"><span class="sectionBodyText">Below is an example of using some of the different external libraries available:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure &lt;other options as above&gt; --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid<span class="sectionBodyText"> </span></p>
<p class="MsoNormal"><span class="sectionBodyText">The invocation above assumes that you will be using 6 external 3<sup>rd</sup> party libraries:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libfaac       # for example you can download ‘faac-1.28.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libfaad       # for example you can download ‘faad2-2.7.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libmp3lame # for example you can download ‘lame-398-2.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libtheora    # for example you can download ‘libtheora-1.0.tar.tar’ or later version from the web. Please note that you can not use ICC v 10.1 to rebuild this library due to a compiler issue. This has been fixed with 11.1 version of the compiler.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libx264      # for example you can download ‘x264-snapshot-20090117-2245.tar.bz2’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libxvid      # for example you can download ‘xvidcore-1.2.1.tar.gz’ or later version from the web.<br /></span><span class="sectionBodyText"><br /><strong>Performance Notes:</strong> <br /><br />Best option combination for ICC: “-xSSE3_ATOM –O3 –vec- -static –no-prec-div –ansi_alias”. Also make sure you add –extra-libs=-lsvml in your configure invocation.<br /><br />Two ways of improving the performance of ffmpeg:<br /><br />1) Use the external 3rd party libraries which are supported – 20+ are available. They are optimized for their specific field. You need to select the suitable library – download the code and build them using the ICC. <br /><br />2) Use PGO. Here it is important to produce a set of .dyn files for the most common conversion you will be using. The code size improves a bit and the performance also gets a boost provided that you use any of the conversions for which you generated a .dyn file. If you select a totally different conversion you actually could get a slower performance compared to both gcc and icc (general optimized version). For those who are not familiar with the PGO optimization this is a three step procedure:<br /><br />a. Add the option –prof-gen to the extra-cflags section for the configure generation. Build ffmpeg. <br /><br />b. Run the resulting binary on your target. Make sure you use representative input files and output formats. You may want to repeat this process several times. For each run you will have a .dyn file generated on the target. Copy these files over to your development system.<br /><br />c. Now use the options –prof-use and –prof-dir &lt;directory path where you have the .dyn files which you copied in step b&gt; [make sure to remove –prof-gen option]. Generate a new make file with configure and build your ffmpeg. You may see a number of warnings ‘missing .dpi information for &lt;file name.’ This is information only and can be ignored. The finally generated ffmpeg should be both smaller and faster. <br /><br /><br />
<table cellpadding="5" cellspacing="0" rules="none" border="1">
<tbody>
<tr>
<th align="left" valign="middle" >Optimization Notice</th>
</tr>
<tr bgcolor="#ccecff">
<td>
<p>Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.</p>
<p align="right">Notice revision #20110804</p>
</td>
</tr>
</tbody>
</table>
<br /><br /><br /><br /><br /></span></p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2/</link>
      <pubDate>Wed, 23 Sep 2009 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2/</guid>
      <category>Mobility</category>
      <category>Open Source</category>
      <category>Tools</category>
      <category>Intel® AppUp(SM) Developer Community</category>
      <category>MID</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>Building the Moblin Clutter Library with the Intel Compiler</title>
      <description><![CDATA[ <p><b>Building the Moblin Clutter Library with the Intel Compiler</b></p>
<p><b>Introduction</b></p>
<p><b>Build environment</b></p>
<p>The build instructions below are based on the assumption that the build environment is a Fedora10 installation. </p>
<p>A copy of the installation disks can be found here. <a href="http://fedoraproject.org/get-fedora">http://fedoraproject.org/get-fedora</a></p>
<p>It is important that the GCC tools are installed when the Fedora installation is installed.</p>
<p><b>Cross-development</b></p>
<p>The clutter libraries  and test environment  are first built on a Fedora installation, and then the resultant executables and libraries can then be copied over to a MOBLIN2 platform.</p>
<p><b>Virtualisation</b></p>
<p>The steps below can be undertaken on a virtual machine, the only restriction being that not all virtual machines support video acceleration  </p>
<p><b>The tests</b></p>
<p>There are a number of tests that can be used to benchmark the clutter library. The benchmark performance is measured by how many Frames Per Second (FPS) are achieved.<b><br clear="all" /></b></p>
<p><b>Building the Clutter Libraries</b></p>
<p><b>Downloading the sources</b></p>
<p>The sources for the clutter library can be obtained by using the following command.</p>
<p>In a development directory of your choosing download the sources</p>
<p>   git clone git://git.clutter-project.org/clutter</p>
<p>   git clone git://git.clutter-project.org/clutter-box2d</p>
<p>Progress for each download should be reported similar the following:</p>
<p> </p>
<p>$ git clone git://git.clutter-project.org/clutter<br /><br />Initialized empty Git repository in /home/intel/dv/clutter/clutter/.git/<br />remote: Counting objects: 25225, done.<br />remote: Compressing objects: 100% (10261/10261), done.<br />remote: Total 25225 (delta 20575), reused 18319 (delta 14944)<br />Receiving objects: 100% (25225/25225), 6.99 MiB | 104 KiB/s, done.<br />Resolving deltas: 100% (20575/20575), done.</p>
<p><b>Building the Sources</b></p>
<p>Directory structure should look similar to this:</p>
<p>             &lt;dev-dir&gt;/clutter/<br />            &lt;dev-dir&gt;/clutter-box2d</p>
<p> </p>
<p>In each of these sub directories build the libraries as follows:</p>
<p><b>Choosing which compiler </b></p>
<p><b>Building with GCC</b></p>
<p>For our installation, we'll use the environment variable  $PREFIX custom directory so as not to override any existing installation</p>
<p>     export PREFIX=/opt/custom/gcc<br />    ./autogen.sh --prefix=$PREFIX</p>
<p><b>Building with ICC</b></p>
<p>To build the library with the Intel compiler use the following commands</p>
<p>    export CC=icc<br />    export CXX=icc</p>
<p>   export PREFIX=/opt/custom/icc<br />  ./autogen.sh --prefix=$PREFIX</p>
<p><b>Continuing the build</b></p>
<p>When autogen has completed you should get a message similar to the display below </p>
<p>  <br />                                  Clutter    0.9.7<br />                         ====================<br />                                  prefix:   /opt/custom/gcc<br />                                Flavour:   glx/gl<br />                                 XInput:   no<br />                          GL headers:   GL/gl.h<br />                    Image backend:   gdk-pixbuf<br />                       Target library:   libclutter-glx-0.9.la<br />               Clutter debug level:   yes<br />                 COGL debug level:   minimum<br />                      Compiler flags:   -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wno-strict-aliasing -Wempty-body -Wformat-security -Winit-self<br />        Build API documentation:   no<br />  Build manual documentation:   no<br />         Build introspection data:   auto</p>
<p>  </p>
<p>Now build the source by calling make</p>
<p>The progress of the make will be reported, the last few lines looking similar to this:</p>
<p>   Making all in tools<br />     CC    disable-npots.o<br />     LINK  libdisable-npots-static.la<br />     LINK  libdisable-npots.la <br />   Making all in po</p>
<p><b>Installing the new library</b></p>
<p>To install the new library call:</p>
<p>make install</p>
<p>Note, depending on the permissions of the installation directory (set with the $PREFIX variable in the previous steps) you may need to do this as root.</p>
<p> </p>
<p><b>Building the tests</b></p>
<p>The test directory has a number of tests. The README describes the tests as follows </p>
<p><i>"The conform/ tests should be non-interactive unit-tests that verify a single feature is behaving as documented. See conform/ADDING_NEW_TESTS for more details.</i></p>
<p><i> </i><i>The micro-bench/ tests should be focused performance test, ideally testing a single metric. Please never forget that these tests are synthetic and if you are using them then you understand what metric is being tested. They probably don't reflect any real world application loads and the intention is that you use these tests once you have already determined the crux of your problem and need focused feedback that your changes are indeed improving matters. There is no exit status requirements for these tests, but they should give clear feedback as to their performance. If the frame rate is the feedback metric, then the test should forcibly enable FPS debugging.</i></p>
<p><i> </i><i>The interactive/ tests are any tests who's  status can not be determined without a user looking at some visual output, or providing some manual input etc. This covers most of the original Clutter tests. Ideally some of these tests will be migrated into the conformance/ directory so they can be used in automated nightly tests."</i></p>
<p>To build the tests, from the top level of the test directory do: </p>
<p>    make</p>
<p>The build will report:</p>
<p>    Making all in data <br />    Making all in conform<br />    Making all in interactive<br />    Making all in micro-bench<br />    Making all in tools</p>
<p><b>Running the tests</b></p>
<p>Having built the tests, each test can be run from the command line.</p>
<p><b>Automatic running of  tests.</b></p>
<p>Many of the tests do not run to completion, but keep running,  The script in the appendix below gives an example of how the tests can be automatically called and killed after a predefined time.</p>
<b><br clear="all" /></b>
<p><b>Appendix 1 -  Script to drive test cases</b></p>
<p>#!/usr/bin/perl<br /># list of tests <b>TODO: EDIT THESE TO YOUR REQUIREMENTS<br /></b>@Tests=("test-actors", "test-behave", "test-clip","test-cogl-offscreen","test-cogl-primitives","test-cogl-tex-convert","test-cogl-tex-foreign","test-cogl-tex-getset","test-cogl-tex-polygontest","test-cogl-tex-tile","test-depth","test-layout","test-multistage","test-pixmap","test-project","test-random-text","test-rotate","test-scale","test-script","test-sharder","test-text","test-texture-quality","test-textures","test-threads","test-unproject","test-viewport");<br /><br />#@Tests=("test-actors", "test-behave");<br />@Results=();<br /><br /># for each test run it for 10 seconds<br />my $Timeout = 10;<br />## chdir interactive;<br />my $bStarted = 0;<br /><br />foreach my $Test (@Tests)<br />{<br />    # print "executing $Test\n ";<br />    eval {<br />        local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required<br />        alarm $Timeout;<br />        # system("./$Test --clutter-show-fps &gt; res.$Test.txt");<br /><br />        # mark end of prev test<br />        push @Results, "END" if $bStarted;<br />        push @Results, "TEST:$Test\n-----------------------\n";<br />        $bStarted = 1;<br />        open (RUN,"./$Test --clutter-show-fps &amp;|");<br />        while(&lt;RUN&gt;)<br />        {<br />            push @Results, $_;<br />        }<br />        alarm 0;<br />    };<br />    if ($@) <br />    {<br />        die unless $@ eq "alarm\n"; # propagate unexpected errors<br />        # timed out<br />        system("killall -9 lt-test-interactive");<br />     }<br />}<br /># mark the end of the last test<br />push @Results, "END" if $bStarted;<br /><br /># process the results<br />my $NumTests = 0;<br />my $Total = 0;<br />my $Max = 0;<br />my $Min = 9999;<br />my $TestName="";<br /><br />print "\nName Min Max NumTests Average\n";<br />foreach my $Line (@Results)<br />{<br />    if($Line=~/^TEST:(.*)/)<br />    {<br />        # print "IN TEST $Line";<br />        $TestName= $1;<br />        chomp $TestName;<br />        $NumTests = 0;<br />        $Total = 0;<br />        $Max = 0;<br />        $Min = 9999;<br />    }<br /><br />    if($Line=~/END/)<br />    {<br />        # print "IN END :$Line";<br />        $Average = 0;<br />        $Average = $Total/$NumTests if $NumTests &gt; 0;<br />        print "$TestName $Min $Max $NumTests $Average\n";<br />    }<br /><br />    if($Line=~/\*\*\* FPS: (.*) \*\*\*/)<br />    {<br />        # print "IN FPS: $Line";<br />        $NumTests++;<br />        $Total = $Total + $1;<br />        $Max = $1 if $1 &gt; $Max;<br />        $Min = $1 if $1 &lt; $Min;<br />    }<br />}<br /><br />print "exiting ..\n";<br /> </p>
<p> </p>
<b><br clear="all" /></b>
<p><b> Appendix 2 - Essential notes on installing Fedora  </b></p>
<p>When installing Fedora you must install the Software Development tools.</p>
<p> </p>
<p> </p> ]]></description>
      <link>http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler/</link>
      <pubDate>Sun, 14 Jun 2009 16:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler/</guid>
      <category>Mobility</category>
      <category>Tools</category>
      <category>MID</category>
      <category>Intel® Compilers</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
  </channel></rss>
