<?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 Re: H.263 decoder crash in release mode in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915725#M15100</link>
    <description>Thank you for your reply.
I will try IPP 5.3 library and samples.
I hope you understand my poor English.

Thanks,
Fukugawa</description>
    <pubDate>Thu, 28 Feb 2008 02:48:30 GMT</pubDate>
    <dc:creator>fukugawa</dc:creator>
    <dc:date>2008-02-28T02:48:30Z</dc:date>
    <item>
      <title>H.263 decoder crash in release mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915723#M15098</link>
      <description>&lt;P&gt;If I use H.263 Decoder of IPP 5.2 for Windows, the application will crash.&lt;BR /&gt;If the application is crashed, it crashed in "H263VideoDecoder::GetFrame()" function.&lt;BR /&gt;Exception 0x0000005 is generated by function "ippiv8-5.2.dll!0115df34()".&lt;BR /&gt;It is strange, and if the application is built in Debug mode, it does't crash.&lt;BR /&gt;If the application is built in Release mode, it crash.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Program overview:&lt;BR /&gt;This program is a program that tests encode and decode of H.263.&lt;BR /&gt;The source file using H.263 to encode and decode the BMP file.&lt;/P&gt;
&lt;P&gt;1)Read RGB data from BMP file.&lt;BR /&gt;2)RGB data is converted into YUV420 format.&lt;BR /&gt;3)YUV420 data is encoded into H.263 bitstream.&lt;BR /&gt;4)H.263 bitstream is decoded into YUV420 format.&lt;BR /&gt;5)YUV420 data is converted into RGB data.&lt;BR /&gt;6)RGB data save to BMP file.&lt;/P&gt;
&lt;P&gt;This processing is repeated ten times.&lt;BR /&gt;During the 10 times loop, the application will crash in the second loop or the third loop.&lt;BR /&gt;If the application is built in the Debug mode, the application runs well and the BMP file will be saved sucessfully.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Environment:&lt;BR /&gt;IPP : IPP 5.2 for Windows IA-32&lt;BR /&gt;IDE : Visual Studio 2005 Pro&lt;BR /&gt;OS : Windows XP Home&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Application SourceCode:&lt;/P&gt;
&lt;P&gt;#include "stdafx.h"&lt;BR /&gt;#include &lt;WINDOWS.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;WINSOCK2.H&gt;&lt;BR /&gt;#include "ipp.h"&lt;BR /&gt;#include "umc_video_data.h"&lt;BR /&gt;#include "umc_h263_video_encoder.h"&lt;BR /&gt;#include "umc_h263_video_decoder.h"&lt;/WINSOCK2.H&gt;&lt;/STDLIB.H&gt;&lt;/WINDOWS.H&gt;&lt;/P&gt;
&lt;P&gt;using namespace UMC;&lt;/P&gt;
&lt;P&gt;IppiSize imgSize = {176,144};&lt;BR /&gt;unsigned char bitstreamBuff[10000];&lt;BR /&gt;unsigned char codecBuff[176 * 144 * 3 * 2];&lt;BR /&gt;unsigned char rgbBuff[176 * 144 * 3];&lt;/P&gt;
&lt;P&gt;int func() {&lt;/P&gt;
&lt;P&gt;H263VideoEncoder *pEncoder = NULL;&lt;BR /&gt;VideoEncoderParams *pEncoderParams = NULL;&lt;BR /&gt;VideoData* inEnc = NULL;&lt;BR /&gt;MediaData* outEnc = NULL;&lt;/P&gt;
&lt;P&gt;H263VideoDecoder *pDecoder = NULL;&lt;BR /&gt;VideoDecoderParams *pDecoderParams = NULL;&lt;BR /&gt;MediaData* inDec = NULL;&lt;BR /&gt;VideoData* outDec = NULL;&lt;/P&gt;
&lt;P&gt;Status umcSt;&lt;BR /&gt;IppStatus ippSt;&lt;BR /&gt;FILE *outputFp;&lt;BR /&gt;FILE *inputFp;&lt;BR /&gt;BITMAPFILEHEADER bmpFileHdr;&lt;BR /&gt;BITMAPINFOHEADER bmpInfoHdr;&lt;BR /&gt;int bitstreamSize;&lt;BR /&gt;Ipp8u* dst[3];&lt;/P&gt;
&lt;P&gt;// Read Bitmap File&lt;BR /&gt;inputFp = fopen("input.bmp","rb");&lt;BR /&gt;if(inputFp == NULL) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;BR /&gt;fread(&amp;amp;bmpFileHdr,sizeof(BITMAPFILEHEADER),1,inputFp);&lt;BR /&gt;fread(&amp;amp;bmpInfoHdr,sizeof(BITMAPINFOHEADER),1,inputFp);&lt;BR /&gt;fseek(inputFp,bmpFileHdr.bfOffBits,SEEK_SET);&lt;BR /&gt;fread(rgbBuff,sizeof(rgbBuff),1,inputFp);&lt;BR /&gt;fclose(inputFp);&lt;BR /&gt;&lt;BR /&gt;// H.263 Encode --------------------------------------------------------&lt;BR /&gt;pEncoder = new H263VideoEncoder();&lt;BR /&gt;pEncoderParams = new H263EncoderParams();&lt;BR /&gt;umcSt = pEncoderParams-&amp;gt;ReadParamFile((const vm_char*)"h263.par");&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;pEncoderParams-&amp;gt;info.clip_info.width = imgSize.width;&lt;BR /&gt;pEncoderParams-&amp;gt;info.clip_info.height = imgSize.height;&lt;BR /&gt;pEncoderParams-&amp;gt;info.color_format = YUV420;&lt;/P&gt;
&lt;P&gt;umcSt = pEncoder-&amp;gt;Init(pEncoderParams);&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;BR /&gt;umcSt = pEncoder-&amp;gt;GetInfo(pEncoderParams);&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;dst[0] = (Ipp8u*)malloc(imgSize.width * imgSize.height);&lt;BR /&gt;dst[1] = (Ipp8u*)malloc(imgSize.width * imgSize.height);&lt;BR /&gt;dst[2] = (Ipp8u*)malloc(imgSize.width * imgSize.height);&lt;/P&gt;
&lt;P&gt;inEnc = new VideoData();&lt;BR /&gt;outEnc = new MediaData();&lt;/P&gt;
&lt;P&gt;inEnc-&amp;gt;SetColorFormat(YUV420);&lt;BR /&gt;inEnc-&amp;gt;Init(imgSize.width,imgSize.height,YUV420,8);&lt;BR /&gt;inEnc-&amp;gt;Alloc();&lt;/P&gt;
&lt;P&gt;outEnc-&amp;gt;SetBufferPointer(codecBuff,sizeof(codecBuff));&lt;/P&gt;
&lt;P&gt;// RGB -&amp;gt; YUV420&lt;BR /&gt;ippSt = ippiRGBToYUV420_8u_C3P3(rgbBuff,dst,imgSize);&lt;BR /&gt;if(ippSt != ippStsNoErr) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// YUV -&amp;gt; VideoData&lt;BR /&gt;memcpy(inEnc-&amp;gt;GetPlanePointer(0),dst[0],imgSize.width * imgSize.height);&lt;BR /&gt;memcpy(inEnc-&amp;gt;GetPlanePointer(1),dst[1],imgSize.width * imgSize.height / 4);&lt;BR /&gt;memcpy(inEnc-&amp;gt;GetPlanePointer(2),dst[2],imgSize.width * imgSize.height / 4);&lt;/P&gt;
&lt;P&gt;// Encode!!!&lt;BR /&gt;umcSt = pEncoder-&amp;gt;GetFrame(inEnc,outEnc);&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// Get H.263 bitstream&lt;BR /&gt;memcpy(bitstreamBuff,outEnc-&amp;gt;GetDataPointer(),outEnc-&amp;gt;GetDataSize());&lt;BR /&gt;bitstreamSize = outEnc-&amp;gt;GetDataSize();&lt;/P&gt;
&lt;P&gt;inEnc-&amp;gt;Close();&lt;BR /&gt;outEnc-&amp;gt;Close();&lt;BR /&gt;delete inEnc;&lt;BR /&gt;delete outEnc;&lt;/P&gt;
&lt;P&gt;free(dst[0]);&lt;BR /&gt;free(dst[1]);&lt;BR /&gt;free(dst[2]);&lt;/P&gt;
&lt;P&gt;delete(pEncoderParams);&lt;BR /&gt;pEncoder-&amp;gt;Close();&lt;BR /&gt;delete(pEncoder);&lt;/P&gt;
&lt;P&gt;// H.263 Encode --------------------------------------------------------&lt;BR /&gt;pDecoder = new H263VideoDecoder();&lt;BR /&gt;pDecoderParams = new VideoDecoderParams();&lt;/P&gt;
&lt;P&gt;pDecoderParams-&amp;gt;info.clip_info.width = imgSize.width;&lt;BR /&gt;pDecoderParams-&amp;gt;info.clip_info.height = imgSize.height;&lt;BR /&gt;pDecoderParams-&amp;gt;info.color_format = YUV420;&lt;/P&gt;
&lt;P&gt;umcSt = pDecoder-&amp;gt;Init(pDecoderParams);&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;umcSt = pDecoder-&amp;gt;GetInfo(pDecoderParams);&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// Set H.263 bitstream&lt;BR /&gt;inDec = new MediaData();&lt;BR /&gt;umcSt = inDec-&amp;gt;Alloc(bitstreamSize * 8);&lt;BR /&gt;memcpy(inDec-&amp;gt;GetDataPointer(),bitstreamBuff,bitstreamSize);&lt;BR /&gt;umcSt = inDec-&amp;gt;SetDataSize(bitstreamSize);&lt;/P&gt;
&lt;P&gt;outDec = new VideoData();&lt;BR /&gt;umcSt = outDec-&amp;gt;Init(imgSize.width,imgSize.height,YUV420,8);&lt;BR /&gt;umcSt = outDec-&amp;gt;Alloc();&lt;BR /&gt;umcSt = outDec-&amp;gt;SetColorFormat(YUV420);&lt;BR /&gt;umcSt = outDec-&amp;gt;SetBufferPointer(codecBuff,sizeof(codecBuff));&lt;/P&gt;
&lt;P&gt;// Decode!!!&lt;BR /&gt;umcSt = pDecoder-&amp;gt;GetFrame(inDec,outDec);// &amp;lt;-- crash point!!!&lt;BR /&gt;if(umcSt != UMC_OK) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// YUV420 -&amp;gt; RGB&lt;BR /&gt;dst[0] = (Ipp8u*)outDec-&amp;gt;GetPlanePointer(0);&lt;BR /&gt;dst[1] = (Ipp8u*)outDec-&amp;gt;GetPlanePointer(1);&lt;BR /&gt;dst[2] = (Ipp8u*)outDec-&amp;gt;GetPlanePointer(2);&lt;/P&gt;
&lt;P&gt;ippSt = ippiYUV420ToRGB_8u_P3C3(dst,rgbBuff,imgSize);&lt;BR /&gt;if(ippSt != ippStsNoErr) {&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;// Save to Bitmap File&lt;BR /&gt;outputFp = fopen("output.bmp","wb");&lt;BR /&gt;if(outputFp != NULL) {&lt;BR /&gt;BITMAPFILEHEADER bmpFileHdr;&lt;BR /&gt;BITMAPINFOHEADER bmpInfoHdr;&lt;BR /&gt;&amp;amp;n
bsp;memset(&amp;amp;bmpFileHdr,0,sizeof(BITMAPFILEHEADER));&lt;BR /&gt;memset(&amp;amp;bmpInfoHdr,0,sizeof(BITMAPINFOHEADER));&lt;BR /&gt;bmpFileHdr.bfType = 'B' + ('M'&amp;lt;&amp;lt;8); // 'BM'&lt;BR /&gt;bmpFileHdr.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);&lt;BR /&gt;bmpFileHdr.bfSize = bmpFileHdr.bfOffBits + imgSize.width * imgSize.height * 3;&lt;BR /&gt;bmpInfoHdr.biSize = sizeof(BITMAPINFOHEADER);&lt;BR /&gt;bmpInfoHdr.biHeight = imgSize.height;&lt;BR /&gt;bmpInfoHdr.biWidth = imgSize.width;&lt;BR /&gt;bmpInfoHdr.biPlanes = 1;&lt;BR /&gt;bmpInfoHdr.biBitCount = 24;&lt;BR /&gt;bmpInfoHdr.biCompression = BI_RGB;&lt;BR /&gt;bmpInfoHdr.biSizeImage = imgSize.width * imgSize.height * 3;&lt;BR /&gt;fwrite(&amp;amp;bmpFileHdr,sizeof(BITMAPFILEHEADER),1,outputFp);&lt;BR /&gt;fwrite(&amp;amp;bmpInfoHdr,sizeof(BITMAPINFOHEADER),1,outputFp);&lt;BR /&gt;fwrite(rgbBuff,sizeof(rgbBuff),1,outputFp);&lt;BR /&gt;fclose(outputFp);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;outDec-&amp;gt;Close();&lt;BR /&gt;inDec-&amp;gt;Close();&lt;BR /&gt;delete outDec;&lt;BR /&gt;delete inDec;&lt;/P&gt;
&lt;P&gt;delete(pDecoderParams);&lt;BR /&gt;pDecoder-&amp;gt;Close();&lt;BR /&gt;//delete(pDecoder);&lt;/P&gt;
&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;void main() {&lt;/P&gt;
&lt;P&gt;for(int i=0;i&amp;lt;10;i++)&lt;BR /&gt;func();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2008 11:38:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915723#M15098</guid>
      <dc:creator>fukugawa</dc:creator>
      <dc:date>2008-02-27T11:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: H.263 decoder crash in release mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915724#M15099</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would recommend you to move to IPP 5.3 library and samples. By the way, UMC documentation was extended with simple sample of decoder's use in IPP 5.3 release&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2008 18:55:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915724#M15099</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-02-27T18:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: H.263 decoder crash in release mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915725#M15100</link>
      <description>Thank you for your reply.
I will try IPP 5.3 library and samples.
I hope you understand my poor English.

Thanks,
Fukugawa</description>
      <pubDate>Thu, 28 Feb 2008 02:48:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915725#M15100</guid>
      <dc:creator>fukugawa</dc:creator>
      <dc:date>2008-02-28T02:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: H.263 decoder crash in release mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915726#M15101</link>
      <description>&lt;P&gt;Hi Fukugawa,&lt;/P&gt;
&lt;P&gt;What the question! I'm hoping you also understand my not 'the best of the west' language :)&lt;/P&gt;
&lt;P&gt;I'm sure engineeners can always talk to each other regardless language barriers.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2008 06:18:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915726#M15101</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-02-28T06:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: H.263 decoder crash in release mode</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915727#M15102</link>
      <description>When I use IPP 5.3 library, the application did not crash.
Thank you for your help.
Fukugawa</description>
      <pubDate>Thu, 28 Feb 2008 12:19:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/H-263-decoder-crash-in-release-mode/m-p/915727#M15102</guid>
      <dc:creator>fukugawa</dc:creator>
      <dc:date>2008-02-28T12:19:38Z</dc:date>
    </item>
  </channel>
</rss>

