<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic newbie question about Remap in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801647#M3280</link>
    <description>I am just learning IPP and I also don't know very much about image processing yet, so this is probably a very basic question.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Anyway, I am using frei0r to call the IPP remap function. This function takes three inputs and has an output. Then, I call this function in gstreamer. However, gstreamer is saying I get a segfault in this code, and I don't know what I am doing wrong, although I am almost positive it has to do with the parameters I am supplying to remap. I'm pretty sure the problem is with the srcSize argument, because if I changed it to 0 it works. Anything else causes it to fail. However, I don't understand why that would happen..&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is my function:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[bash]void f0r_update2(f0r_instance_t instance,
		 double time,
		 const uint32_t* inframe1,
		 const uint32_t* inframe2,
		 const uint32_t* inframe3,
		 uint32_t* outframe)
{
  assert(instance);
  composition_instance_t* inst = (composition_instance_t*)instance;
  unsigned int w = inst-&amp;gt;width; //this is in pixels
  unsigned int h = inst-&amp;gt;height; //this is in pixels

  unsigned char *ps1, *ps2, *pd, *pd_end;
  ps1 = (unsigned char *)inframe2;
  ps2 = (unsigned char *)inframe1;
  pd = (unsigned char *)outframe;
  pd_end = pd + ( w * h * 4 );
  IppiSize sz = {w, h};
  IppiRect rect = {0, 0, w*4, w*4};
  ippiRemap_8u_AC4R((const Ipp8u *) inframe1, sz, w*4, rect, (const Ipp32f *) inframe2, w*h, 
      (const Ipp32f *) inframe3, w*h, (Ipp8u *) outframe, w*4, sz, IPPI_INTER_NN); 
}[/bash]&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 15 Feb 2011 00:31:39 GMT</pubDate>
    <dc:creator>moduspwnens</dc:creator>
    <dc:date>2011-02-15T00:31:39Z</dc:date>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801647#M3280</link>
      <description>I am just learning IPP and I also don't know very much about image processing yet, so this is probably a very basic question.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Anyway, I am using frei0r to call the IPP remap function. This function takes three inputs and has an output. Then, I call this function in gstreamer. However, gstreamer is saying I get a segfault in this code, and I don't know what I am doing wrong, although I am almost positive it has to do with the parameters I am supplying to remap. I'm pretty sure the problem is with the srcSize argument, because if I changed it to 0 it works. Anything else causes it to fail. However, I don't understand why that would happen..&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is my function:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[bash]void f0r_update2(f0r_instance_t instance,
		 double time,
		 const uint32_t* inframe1,
		 const uint32_t* inframe2,
		 const uint32_t* inframe3,
		 uint32_t* outframe)
{
  assert(instance);
  composition_instance_t* inst = (composition_instance_t*)instance;
  unsigned int w = inst-&amp;gt;width; //this is in pixels
  unsigned int h = inst-&amp;gt;height; //this is in pixels

  unsigned char *ps1, *ps2, *pd, *pd_end;
  ps1 = (unsigned char *)inframe2;
  ps2 = (unsigned char *)inframe1;
  pd = (unsigned char *)outframe;
  pd_end = pd + ( w * h * 4 );
  IppiSize sz = {w, h};
  IppiRect rect = {0, 0, w*4, w*4};
  ippiRemap_8u_AC4R((const Ipp8u *) inframe1, sz, w*4, rect, (const Ipp32f *) inframe2, w*h, 
      (const Ipp32f *) inframe3, w*h, (Ipp8u *) outframe, w*4, sz, IPPI_INTER_NN); 
}[/bash]&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Feb 2011 00:31:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801647#M3280</guid>
      <dc:creator>moduspwnens</dc:creator>
      <dc:date>2011-02-15T00:31:39Z</dc:date>
    </item>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801648#M3281</link>
      <description>Hello &lt;BR /&gt;&lt;BR /&gt;The problem may be the parameter of ippiRemaps, especially this one &lt;BR /&gt;IppiRectrect={0,0,w*4,w*4};&lt;BR /&gt;itseems notw*4 and w*4. in general, if with the wholeimage, it should be {0, 0, w, h}, (AC4 mean 4channel, the memory layout are RGBA,RGBA,RGBA...).&lt;BR /&gt;and otherparameters, like w*4 may notcorrect too ifinput framehaspadded at image border.&lt;BR /&gt;and if inframe1, inframe2, inframe3 are same inputtype, may be have same width in bytes, additionally change inframe2, inframe3to 32f*, the stride is 4, so w*hmaynot correct too. &lt;BR /&gt;&lt;BR /&gt;You may readthe article &lt;A href="http://software.intel.com/en-us/articles/descriptor-codes-for-ippi-functions/"&gt;&lt;B&gt;Descriptor Codes and Parameters for ippi Functions&lt;/B&gt;&lt;/A&gt;&lt;A target="_blank" href="http://software.intel.com/en-us/articles/descriptor-codes-for-ippi-functions/feed/"&gt;&lt;/A&gt; tocheck theseparamters and get correct result.&lt;BR /&gt;&lt;BR /&gt;BestWishes,&lt;BR /&gt;Ying&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Feb 2011 07:18:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801648#M3281</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2011-02-15T07:18:32Z</dc:date>
    </item>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801649#M3282</link>
      <description>Hmm, should the dimensions of IppiRect not be in bytes? w and h are in pixels. &lt;BR /&gt;&lt;BR /&gt;Also, I can't change the function parameters, unfortunately as it is part of frei0r. However, I did something similar with the AlphaComp function so I know the casting works. &lt;BR /&gt;&lt;BR /&gt;Since this is a part of frei0r, I also know for a fact that there is not image padding as frei0r is particular about that.</description>
      <pubDate>Thu, 17 Feb 2011 00:32:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801649#M3282</guid>
      <dc:creator>moduspwnens</dc:creator>
      <dc:date>2011-02-17T00:32:27Z</dc:date>
    </item>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801650#M3283</link>
      <description>&lt;P&gt;Hello m, &lt;BR /&gt;&lt;BR /&gt;Yes, ippiRect is in pixel, not in bytes.&lt;BR /&gt;&lt;BR /&gt;You mentioned, "I can't change the function parameters and However, I did something similar with the AlphaComp function so I know the casting works", Can you provide the details, like what is the inframe1 and inframe2, imframe3?&lt;BR /&gt;&lt;BR /&gt;I attached one smallsample code for your reference, youmay try them andalign/modify all of parameters of ippiRemapwithyour external parameter. &lt;BR /&gt;for example, &lt;BR /&gt;constuint32_t*inframe1, // but the value in the memory space should be RGBARGBA&lt;BR /&gt;constuint32_t*inframe2,// the value in the memory space should be x-coordinates&lt;BR /&gt;constuint32_t*inframe3, // the value in the memory space should be y coordinates&lt;BR /&gt;You can cast them to IPP 8u* or IPP32f*, butthexMapStep, yMapStepseems not correct . why are they w*h, could be w*h*sizeof(Ipp32f)? &lt;BR /&gt;&lt;BR /&gt;/ Image_Transpose.cpp: Transpose a image or rotate image with 90 or 270 degree &lt;/P&gt;&lt;P&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;/IOSTREAM&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#include "ipp.h"&lt;BR /&gt;int LOOP=1000;&lt;BR /&gt;using namespace std;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;int SRC_WIDTH= 512;&lt;BR /&gt;int SRC_HEIGHT=512; &lt;BR /&gt;&lt;BR /&gt;//Destination image size &lt;BR /&gt;int TARGET_WIDTH =SRC_HEIGHT;&lt;BR /&gt;int TARGET_HEIGHT =SRC_WIDTH;&lt;BR /&gt; &lt;BR /&gt;//Create Map coordinate ( dst(x,y) = src( y,x), Rotate 90 degree)&lt;BR /&gt; int nTableSize= SRC_HEIGHT * SRC_WIDTH; &lt;BR /&gt;float* pXTable = (float*) malloc(sizeof(float)*nTableSize);&lt;BR /&gt;float* pYTable = (float*) malloc(sizeof(float)*nTableSize); &lt;/P&gt;&lt;P&gt;for( int iMap=0; iMap&lt;TARGET_HEIGHT&gt;&lt;/TARGET_HEIGHT&gt;for( int jMap=0; jMap&amp;lt; TARGET_WIDTH; jMap++ ) &lt;BR /&gt;{&lt;BR /&gt;pXTable[iMap*TARGET_WIDTH+jMap] = iMap;&lt;BR /&gt;pYTable[iMap*TARGET_WIDTH+jMap] = jMap;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /* Performs image transpose by IPPRemap */&lt;/P&gt;&lt;P&gt;const IppLibraryVersion* lib = ippiGetLibVersion();&lt;BR /&gt;printf(" IPP version:%s %s %d.%d.%d.%d\n",lib-&amp;gt;Name, lib-&amp;gt;Version,lib-&amp;gt;major,lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IppiRect roiRect={0,0, SRC_WIDTH,SRC_HEIGHT};&lt;BR /&gt;IppiSize srcSize={ SRC_WIDTH, SRC_HEIGHT};&lt;BR /&gt;IppiSize dstSize={ SRC_HEIGHT, SRC_WIDTH};&lt;BR /&gt; int dstwidthStep ;&lt;BR /&gt; int srcwidthStep; &lt;BR /&gt; Ipp8u* pSrcImg=ippiMalloc_8u_C3(SRC_WIDTH, SRC_HEIGHT, &amp;amp;srcwidthStep);&lt;BR /&gt; ippiImageJaehne_8u_C3R(pSrcImg,srcwidthStep, srcSize);&lt;BR /&gt; Ipp8u* pDstImgIPP = ippiMalloc_8u_C3(SRC_HEIGHT,SRC_WIDTH, &amp;amp;dstwidthStep);&lt;BR /&gt; &lt;BR /&gt;double timeCalcIPP = (double)ippGetCpuClocks();&lt;BR /&gt;for (int my=0;my&lt;LOOP&gt;&lt;/LOOP&gt;ippiRemap_8u_C3R((Ipp8u*) pSrcImg, srcSize, srcwidthStep, roiRect, &lt;BR /&gt; pXTable, sizeof(float)*TARGET_WIDTH,&lt;BR /&gt; pYTable, sizeof(float)*TARGET_WIDTH,&lt;BR /&gt; (Ipp8u*) pDstImgIPP, dstwidthStep, dstSize, &lt;BR /&gt; IPPI_INTER_NN);&lt;/P&gt;&lt;P&gt;timeCalcIPP = (double)ippGetCpuClocks() - timeCalcIPP;&lt;BR /&gt; printf( " IPP calculating time = %gms\n", timeCalcIPP/(1.0*1000. * 100.0) );&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;build with&lt;BR /&gt;g++ -m32 -o ImageTranspose ImageTranspose_ipp.cpp -I/opt/intel/ipp/include -L/opt/intel/ipp/lib/ia32 -lippi_l -lipps_l -lippcore_l -lm&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ying &lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2011 08:58:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801650#M3283</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2011-02-17T08:58:29Z</dc:date>
    </item>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801651#M3284</link>
      <description>These are the parameters to the frei0r function:&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;TABLE cellpadding="0" cellspacing="2" border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;EM&gt;instance&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the effect instance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;/TD&gt;&lt;TD valign="top"&gt;&lt;EM&gt;time&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the application time in seconds but with subsecond resolution (e.g. milli-second resolution). The resolution should be at least the inter-frame period of the application.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;/TD&gt;&lt;TD valign="top"&gt;&lt;EM&gt;inframe1&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the first incoming video frame (can be zero for sources)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;/TD&gt;&lt;TD valign="top"&gt;&lt;EM&gt;inframe2&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the second incoming video frame (can be zero for sources and filters)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;/TD&gt;&lt;TD valign="top"&gt;&lt;EM&gt;inframe3&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the third incoming video frame (can be zero for sources, filters and mixer2)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top"&gt;&lt;/TD&gt;&lt;TD valign="top"&gt;&lt;EM&gt;outframe&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;the resulting video frame&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV&gt;inframe2 and inframe3 are not really meant to take xmap and ymap, but I think that I can still pass them in and use them that way.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Anyways, after I posted I realized that the x and ymapsteps should bew*h*sizeof(Ipp32f), however the problem is not with those parameters. The problem is with the srcStep parameter. It segfaults if I set it to anything other than 0, and I am wondering what might cause that.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;EDIT: Actually, I don't understand why you are saying the x and ymapsteps should be w*h*sizeof(IpP32f). In your code you just do width*(sizeof(IPP32f)), so shouldn't I do the same?&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:50:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801651#M3284</guid>
      <dc:creator>moduspwnens</dc:creator>
      <dc:date>2011-02-18T18:50:49Z</dc:date>
    </item>
    <item>
      <title>newbie question about Remap</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801652#M3285</link>
      <description>Hello Moduspwnens,&lt;BR /&gt;&lt;BR /&gt; It is not correct to set srcStep =0. If you add the Return Valuesst=ippiRemap , you actaully will get the error : ippStsStepErr. Indicates an error condition if one of the srcStep,dstStep, xMapStep, or yMapStep has a zero or negative value. &lt;BR /&gt;Yes,x/ymapsteps shouldbewidth*(sizeof(IPP32f)). &lt;BR /&gt;&lt;BR /&gt;Anyway,it could behelpfultofinding the cause in quick wayif youcan provide usthe real input.&lt;BR /&gt;Would you pleasewrite( or print)the dataininframe1/inframe2/inframe3 to some files and attachedthem (by click Add Files)? (Ifthe inputframes are limited for public, you can sendby mark the post Private)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ying</description>
      <pubDate>Wed, 02 Mar 2011 04:47:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/newbie-question-about-Remap/m-p/801652#M3285</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2011-03-02T04:47:42Z</dc:date>
    </item>
  </channel>
</rss>

