<?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 Resizing interlaced frame in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805201#M3541</link>
    <description>&lt;BR /&gt;Hi Steve, &lt;BR /&gt;&lt;BR /&gt;the input paramter ofippiResizeGetBufSize() function should be the same as ROI size ( xsize, ysize/2).&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;</description>
    <pubDate>Thu, 16 Jun 2011 10:29:39 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2011-06-16T10:29:39Z</dc:date>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805195#M3535</link>
      <description>Hi&lt;BR /&gt;I have asked this in another thread but since I had no answers I thought I would start a new thread with this specific problem and code sample.&lt;BR /&gt;&lt;BR /&gt;I am trying to resize an interlaced (padded) frame from SD to HD and am getting a crash. The idea is to use the src/dst Step to first resize the even lines and then the odd lines into the same buffer. In my main code it does actually work and look OK, howver, it crashes. I have isolated the code down to this:&lt;BR /&gt;Note that &lt;BR /&gt;a) I want to flip the image when I resize&lt;BR /&gt;b) The src frame is padded at the end of each line (32bytes)&lt;BR /&gt;c) The program crashes on first call to ippiResizeSqrPixel_8u_C1R&lt;BR /&gt;d) If I valgrind it it tells me I have an invalid read of 1 byte.&lt;BR /&gt;&lt;BR /&gt;I can't for the life of me work out whats wrong &lt;BR /&gt;&lt;BR /&gt;#include &lt;IPP.H&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;Ipp8u *resizeLBuffer = NULL;&lt;BR /&gt;Ipp8u *tmpBufferY = NULL;&lt;BR /&gt;&lt;BR /&gt;int xSize = 720;&lt;BR /&gt;int yActualSize = 576;&lt;BR /&gt;int vxsize = 1920;&lt;BR /&gt;int vysize = 1080;&lt;BR /&gt;uint8_t *data;&lt;BR /&gt;int linesize = 752;&lt;BR /&gt;double xFactor = (double)vxsize/(double)xSize;&lt;BR /&gt;double yFactor = (double)vysize/(double)yActualSize;&lt;BR /&gt;int scaleFilter = IPPI_INTER_NN;&lt;BR /&gt;&lt;BR /&gt;int main(int argc,char **argv)&lt;BR /&gt;{&lt;BR /&gt; IppiRect srcLRect = {0,0,linesize,yActualSize};&lt;BR /&gt; IppiRect dstLRect = {0,0,vxsize,vysize};&lt;BR /&gt; int bufsize;&lt;BR /&gt;&lt;BR /&gt; data = (uint8_t *)malloc(linesize*yActualSize*sizeof(uint8_t));&lt;BR /&gt;&lt;BR /&gt; ippiResizeGetBufSize( srcLRect, dstLRect, 1, scaleFilter, &amp;amp;bufsize );&lt;BR /&gt; resizeLBuffer = ippsMalloc_8u( bufsize );&lt;BR /&gt;&lt;BR /&gt; tmpBufferY = (Ipp8u *)ippMalloc(vxsize*vysize*sizeof(Ipp8u));&lt;BR /&gt;&lt;BR /&gt; Ipp8u *pSrcE = data+((yActualSize-1)*linesize);&lt;BR /&gt; Ipp8u *pSrcO = data+((yActualSize-2)*linesize);&lt;BR /&gt; IppStatus retVal = ippStsNoErr;&lt;BR /&gt;&lt;BR /&gt; IppiSize srcL1Size = {linesize,yActualSize};&lt;BR /&gt; IppiRect srcL1Rect = {0,0,xSize,yActualSize};&lt;BR /&gt; IppiRect dstL1Rect = {0,0,vxsize,vysize-1};&lt;BR /&gt;&lt;BR /&gt; retVal = ippiResizeSqrPixel_8u_C1R(pSrcE, srcL1Size, -linesize*2, srcL1Rect, tmpBufferY, vxsize*2, dstL1Rect, xFactor, yFactor, 0, 0, scaleFilter, resizeLBuffer);&lt;BR /&gt; retVal = ippiResizeSqrPixel_8u_C1R(pSrcO, srcL1Size, -linesize*2, srcL1Rect, tmpBufferY+vxsize, vxsize*2, dstL1Rect, xFactor, yFactor, 0, 0, scaleFilter, resizeLBuffer);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated&lt;BR /&gt;Is this at all achievable?&lt;BR /&gt;Steve&lt;BR /&gt;&lt;/IOSTREAM&gt;&lt;/IPP.H&gt;</description>
      <pubDate>Tue, 14 Jun 2011 18:30:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805195#M3535</guid>
      <dc:creator>BatterseaSteve</dc:creator>
      <dc:date>2011-06-14T18:30:29Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805196#M3536</link>
      <description>Well...&lt;BR /&gt;Any suggestions - anyone - at all?&lt;BR /&gt;Anyone else interested in knowing the answer?&lt;BR /&gt;I'ts a fairly simple question - and if I had source could answer myself.&lt;BR /&gt;I know it's probably something obvious - but the trees in the wood&lt;BR /&gt;keep getting in the way.&lt;BR /&gt;&lt;BR /&gt;I'm at the point now where I chuck this away and do it by hand...&lt;BR /&gt;...having just forked out for 10 IPP licenses.&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jun 2011 09:29:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805196#M3536</guid>
      <dc:creator>BatterseaSteve</dc:creator>
      <dc:date>2011-06-15T09:29:23Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805197#M3537</link>
      <description>Steve, &lt;BR /&gt;&lt;BR /&gt;I am trying to reproduce this problem now. Which version of IPP are you using now? Windows/Linux, 32bit or 64 bit? &lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;Chao &lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jun 2011 09:37:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805197#M3537</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-06-15T09:37:42Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805198#M3538</link>
      <description>&lt;P&gt;Steve, &lt;/P&gt;&lt;P&gt;By reviewing this code, if it only need handle odd/even data, I think the image height should be yActualSize/2, and vysize/2 for src, and dst: &lt;/P&gt;&lt;P&gt;srcLRect = {0,0,linesize,yActualSize/2};&lt;BR /&gt;dstLRect = {0,0,vxsize,vysize/2};&lt;BR /&gt;srcL1Size = {linesize,yActualSize/2};&lt;BR /&gt;srcL1Rect = {0,0,xSize,yActualSize/2};&lt;BR /&gt;dstL1Rect = {0,0,vxsize,vysize/2};&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Is this the problem? &lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2011 15:11:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805198#M3538</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-06-15T15:11:45Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805199#M3539</link>
      <description>Hi Chao&lt;BR /&gt;Sorry, yes it's Latest 191.4 version Linux 64 bit&lt;BR /&gt;And /2 does fix this - so thanks for that.&lt;BR /&gt;I have to say that /2 is not immediately obvious!&lt;BR /&gt;Cheers&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 15 Jun 2011 15:29:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805199#M3539</guid>
      <dc:creator>BatterseaSteve</dc:creator>
      <dc:date>2011-06-15T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805200#M3540</link>
      <description>One more question - what size should the reqize buffer be&lt;BR /&gt;i.e.&lt;BR /&gt;Should the width in the src ROI in the ippiResizeGetBufSize be xsize or padded line size?&lt;BR /&gt;Should the height in the src ROI in the ippiResizeGetBufSize be ysize or ysize/2?&lt;BR /&gt;Cheers&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 15 Jun 2011 16:30:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805200#M3540</guid>
      <dc:creator>BatterseaSteve</dc:creator>
      <dc:date>2011-06-15T16:30:19Z</dc:date>
    </item>
    <item>
      <title>Resizing interlaced frame</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805201#M3541</link>
      <description>&lt;BR /&gt;Hi Steve, &lt;BR /&gt;&lt;BR /&gt;the input paramter ofippiResizeGetBufSize() function should be the same as ROI size ( xsize, ysize/2).&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jun 2011 10:29:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Resizing-interlaced-frame/m-p/805201#M3541</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2011-06-16T10:29:39Z</dc:date>
    </item>
  </channel>
</rss>

