<?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: VC1Decoder Problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859707#M7601</link>
    <description>&lt;DIV style="margin:0px;"&gt;Hello&lt;BR /&gt;&lt;BR /&gt;In the code I sent which follows the example in the documentation, if you follow the while loop it keeps looping if GetFrame returns UMC_ERR_NOT_ENOUGH_DATA until VC1Splitter.GetNextData returns UMC_ERR_END_OF_STREAM. After that a call to GetFrame with the first parameter set to NULL still does not work.&lt;BR /&gt;&lt;/DIV&gt;
I think the code sample you wrote does essentially the same thing.&lt;BR /&gt;&lt;BR /&gt;Dennis&lt;BR /&gt;</description>
    <pubDate>Tue, 29 Sep 2009 12:19:48 GMT</pubDate>
    <dc:creator>Dennis_W</dc:creator>
    <dc:date>2009-09-29T12:19:48Z</dc:date>
    <item>
      <title>VC1Decoder Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859705#M7599</link>
      <description>I am starting up in using the the VC1Encoder and VC1Decoder and using version 6.1.&lt;BR /&gt;I created a test app where I have a 24 bit RGB DIB I convert it to YUV420, encode it, decode it and convert the YUV420 to 24 bit RGB DIB.&lt;BR /&gt;I know the coverters are working and it appears that the encoder works, but when I try to decode, GetFrame returns UMC_ERR_NOT_ENOUGH_DATA. The buffers seem to indicate that the data is there. &lt;BR /&gt;&lt;BR /&gt;I tried to follow the example in the documentation. Below is the essence of the code. Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;void&lt;BR /&gt;IntelVC1ImageFileAdapter::ConvertFromRGBToYUV(BitmapInterface::DecompressedImageFrameBitmap* imageFrame)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;Ipp8u* pSrc = (Ipp8u*)imageFrame-&amp;gt;bitmapBits();&lt;BR /&gt;IppiSize roiSize;&lt;BR /&gt;roiSize.width = imageFrame-&amp;gt;width();&lt;BR /&gt;roiSize.height = imageFrame-&amp;gt;height();&lt;BR /&gt;IppStatus stat= ippiRGBToYUV420_8u_C3P3(pSrc,&lt;BR /&gt;(Ipp8u**)mRGBToYUVBuffer, roiSize);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void &lt;BR /&gt;IntelVC1ImageFileAdapter::IntelVC1CompressFrame(BitmapInterface::DecompressedImageFrameBitmap* imageFrame, &lt;BR /&gt;void** compressedFrame, size_t&amp;amp; compressedFrameSize)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;UMC::Status err = UMC::UMC_OK;&lt;BR /&gt;mVC1Encoder = new UMC::VC1VideoEncoder();&lt;BR /&gt;UMC::VC1EncoderParams *params = new UMC::VC1EncoderParams();&lt;BR /&gt;params-&amp;gt;info.clip_info.width = imageFrame-&amp;gt;width();&lt;BR /&gt;params-&amp;gt;info.clip_info.height = imageFrame-&amp;gt;height();&lt;BR /&gt;params-&amp;gt;info.bitrate = 1000000;&lt;BR /&gt;params-&amp;gt;info.framerate = 30.00;&lt;BR /&gt;params-&amp;gt;numThreads = 1;&lt;BR /&gt;params-&amp;gt;m_uiNumFrames = 1;&lt;BR /&gt;params-&amp;gt;info.stream_type = UMC::VC1_VIDEO;&lt;BR /&gt;params-&amp;gt;info.stream_subtype = UMC::VC1_VIDEO_VC1;&lt;BR /&gt;4:50 PM 9/28/2009&lt;BR /&gt;//params-&amp;gt;key_frame_controls.method=1;&lt;BR /&gt;err = mVC1Encoder-&amp;gt;Init(params);&lt;BR /&gt;delete params;&lt;BR /&gt;&lt;BR /&gt;UMC::Status err;&lt;BR /&gt;UMC::VideoData in;&lt;BR /&gt;err = in.Init((Ipp32s) imageFrame-&amp;gt;width(), (Ipp32s) imageFrame-&amp;gt;height(),&lt;BR /&gt;3, 8);&lt;BR /&gt;err = in.SetFrameType(UMC::FrameType::VIDEO_FRAME);&lt;BR /&gt;size_t size = imageFrame-&amp;gt;width()*imageFrame-&amp;gt;height()*3/2;&lt;BR /&gt;err = in.SetColorFormat(UMC::ColorFormat::YUV420);&lt;BR /&gt;&lt;BR /&gt;err = in.SetPlaneBitDepth(8, 0);&lt;BR /&gt;err = in.SetPlaneBitDepth(8, 1);&lt;BR /&gt;err = in.SetPlaneBitDepth(8, 2);&lt;BR /&gt;err = in.SetPlanePointer((Ipp8u*)mRGBToYUVBuffer[0], 0);&lt;BR /&gt;err = in.SetPlanePointer((Ipp8u*)mRGBToYUVBuffer[1], 1);&lt;BR /&gt;err = in.SetPlanePointer((Ipp8u*)mRGBToYUVBuffer[2], 2);&lt;BR /&gt;UMC::MediaData out;&lt;BR /&gt;err = out.SetFrameType(UMC::FrameType::VIDEO_FRAME);&lt;BR /&gt;&lt;BR /&gt;*compressedFrame = Malloc(size);&lt;BR /&gt;out.SetBufferPointer((Ipp8u*)(*compressedFrame), size);&lt;BR /&gt;&lt;BR /&gt;err = mVC1Encoder-&amp;gt;GetFrame(&amp;amp;in, &amp;amp;out);&lt;BR /&gt;*compressedFrame = out.GetDataPointer();&lt;BR /&gt;&lt;BR /&gt;compressedFrameSize = out.GetDataSize();&lt;BR /&gt;UMC::FileWriterParams params;&lt;BR /&gt;UMC::FileWriter writer;&lt;BR /&gt;vm_string_strcpy(params.m_file_name, "d:\\output_file.dat");&lt;BR /&gt;params.m_portion_size = 0;&lt;BR /&gt;err = writer.Init(&amp;amp;params);&lt;BR /&gt;Ipp32s iSize = out.GetDataSize();&lt;BR /&gt;err = writer.PutData(*compressedFrame, iSize);&lt;BR /&gt;err = writer.Close();&lt;BR /&gt;err = mVC1Encoder-&amp;gt;Close();&lt;BR /&gt;delete mVC1Encoder;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BOOL &lt;BR /&gt;IntelVC1ImageFileAdapter::IntelVC1DecompressFrame(void* inputFrame, size_t sizeOfFrame,&lt;BR /&gt;BitmapInterface::DecompressedImageFrameBitmap* imageFrame)&lt;BR /&gt;{&lt;BR /&gt;UMC::Status umcSts;&lt;BR /&gt;UMC::FileReader* fileReader = new UMC::FileReader();&lt;BR /&gt;UMC::FileReaderParams fileParams;&lt;BR /&gt;UMC::SplitterParams splParams;&lt;BR /&gt;UMC::VideoDecoderParams params;&lt;BR /&gt;UMC::MediaDataEx mediaData;&lt;BR /&gt;UMC::VideoData yuv_data;&lt;BR /&gt;&lt;BR /&gt;if(fileReader == NULL)&lt;BR /&gt;{&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;fileParams.m_portion_size = 0;&lt;BR /&gt;vm_string_strcpy(fileParams.m_file_name, "d:\\output_file.dat");&lt;BR /&gt;umcSts = fileReader-&amp;gt;Init(&amp;amp;fileParams);&lt;BR /&gt;if(umcSts != UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;//SPLITTER&lt;BR /&gt;UMC::VC1Splitter* splitter = new UMC::VC1Splitter();&lt;BR /&gt;if(splitter == NULL)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;splParams.m_pDataReader = fileReader;&lt;BR /&gt;splParams.m_lFlags = UMC::FLAG_VSPL_4BYTE_ACCESS;&lt;BR /&gt;umcSts = splitter-&amp;gt;Init(splParams);&lt;BR /&gt;if(umcSts != UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;UMC::SplitterInfo* splInfo = new UMC::SplitterInfo();&lt;BR /&gt;if(splInfo == NULL)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;//DECODER&lt;BR /&gt;mVC1Decoder = new UMC::VC1VideoDecoder;&lt;BR /&gt;if(mVC1Decoder == NULL)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;//return sequence header&lt;BR /&gt;umcSts = splitter-&amp;gt;GetNextData(&amp;amp;mediaData,0);&lt;BR /&gt;if(umcSts != UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;//return splitter parameters&lt;BR /&gt;umcSts = splitter-&amp;gt;GetInfo(&amp;amp;splInfo);&lt;BR /&gt;params.m_pData = &amp;amp;mediaData;&lt;BR /&gt;UMC::VideoStreamInfo* videoInfo = (UMC::VideoStreamInfo*)(splInfo-&amp;gt;m_ppTrackInfo[0]-&amp;gt;m_pStreamInfo);&lt;BR /&gt;params.info.clip_info.height = videoInfo-&amp;gt;clip_info.height;&lt;BR /&gt;params.info.clip_info.width = videoInfo-&amp;gt;clip_info.width;&lt;BR /&gt;params.lFlags = splInfo-&amp;gt;m_splitter_flags;&lt;BR /&gt;params.info.stream_type = videoInfo-&amp;gt;stream_type;&lt;BR /&gt;params.info.stream_subtype = videoInfo-&amp;gt;stream_subtype;&lt;BR /&gt;params.info.interlace_type = videoInfo-&amp;gt;interlace_type;&lt;BR /&gt;params.info.color_format = videoInfo-&amp;gt;color_format;&lt;BR /&gt;//params.info.clip_info.height = splInfo-&amp;gt;m_video_info.clip_info.height;&lt;BR /&gt;//params.streamName = (Ipp8u*)argv[1];&lt;BR /&gt;umcSts = mVC1Decoder-&amp;gt;Init(&amp;amp;params);&lt;BR /&gt;if(umcSts != UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;delete mVC1Decoder;&lt;BR /&gt;return FALSE;//UMC::UMC_ERR_FAILED;&lt;BR /&gt;}&lt;BR /&gt;//main cycle&lt;BR /&gt;UMC::Status umcSpl = UMC::UMC_OK;&lt;BR /&gt;int frameCount = 0;&lt;BR /&gt;while(umcSpl == UMC::UMC_OK)&lt;BR /&gt;{&lt;BR /&gt;//get new frame&lt;BR /&gt;umcSpl = splitter-&amp;gt;GetNextData(&amp;amp;mediaData, 0);&lt;BR /&gt;if(umcSpl!= UMC::UMC_OK)&lt;BR /&gt;break;&lt;BR /&gt;//decoding}&lt;BR /&gt;umcSts = mVC1Decoder-&amp;gt;GetFrame(&amp;amp;mediaData, &amp;amp;yuv_data);&lt;BR /&gt;switch(umcSts)&lt;BR /&gt;{&lt;BR /&gt;case UMC::UMC_ERR_NOT_ENOUGH_DATA:&lt;BR /&gt;umcSts = mVC1Decoder-&amp;gt;GetFrame(&amp;amp;mediaData, &amp;amp;yuv_data);&lt;BR /&gt;break;&lt;BR /&gt;case UMC::UMC_OK:&lt;BR /&gt;{&lt;BR /&gt;frameCount++;&lt;BR /&gt;// yuv_data contains decoding result&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;umcSpl = umcSts;&lt;BR /&gt;printf("Frame decoding error\n");&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;//get last frame from decoder internal buffer&lt;BR /&gt;//umcSts = mVC1Decoder-&amp;gt; GetFrame (NULL, &amp;amp;yuv_data); &lt;BR /&gt;mDecoderOutputBuffer[0] = yuv_data.GetPlanePointer(0);&lt;BR /&gt;mDecoderOutputBuffer[1] = yuv_data.GetPlanePointer(1);&lt;BR /&gt;mDecoderOutputBuffer[2] = yuv_data.GetPlanePointer(2);&lt;BR /&gt;mVC1Decoder-&amp;gt;Close();&lt;BR /&gt;splitter-&amp;gt;Close();&lt;BR /&gt;fileReader-&amp;gt;Close();&lt;BR /&gt;delete fileReader;&lt;BR /&gt;delete splitter;&lt;BR /&gt;delete mVC1Decoder;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;void&lt;BR /&gt;IntelVC1ImageFileAdapter::ConvertFromYUVToRGB(BitmapInterface::DecompressedImageFrameBitmap* imageFrame)&lt;BR /&gt;{&lt;BR /&gt;IppiSize roiSize;&lt;BR /&gt;roiSize.width = imageFrame-&amp;gt;width();&lt;BR /&gt;roiSize.height = imageFrame-&amp;gt;height();&lt;BR /&gt;IppStatus stat= ippiYUV420ToRGB_8u_P3C3((const Ipp8u**)mDecoderOutputBuffer,&lt;BR /&gt;(Ipp8u*)mYUVToRGBBuffer, roiSize);&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;buffers had been allocated earlier in the codeas&lt;BR /&gt;&lt;BR /&gt;BITMAPINFO* pBitmapInfo = &lt;BR /&gt;imageFrame-&amp;gt;pbitmapInfo();&lt;BR /&gt;size_t size = imageFrame-&amp;gt;width()*imageFrame-&amp;gt;height();&lt;BR /&gt;BYTE* arrays&lt;BR /&gt;mRGBToYUVBuffer[0] = Malloc(size);&lt;BR /&gt;mRGBToYUVBuffer[1] = Malloc(size/4);&lt;BR /&gt;mRGBToYUVBuffer[2] = Malloc(size/4);&lt;BR /&gt;&lt;BR /&gt;mDecoderOutputBuffer[0] = Malloc(size);&lt;BR /&gt;mDecoderOutputBuffer[1] = Malloc(size/4);&lt;BR /&gt;mDecoderOutputBuffer[2] = Malloc(size/4);&lt;BR /&gt;&lt;BR /&gt;BYTE*&lt;BR /&gt;mYUVToRGBBuffer = Malloc(size*3);&lt;BR /&gt;&lt;BR /&gt;The data pointer from the compress function is passed to the decompress function.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Sep 2009 21:10:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859705#M7599</guid>
      <dc:creator>Dennis_W</dc:creator>
      <dc:date>2009-09-28T21:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: VC1Decoder Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859706#M7600</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Hello Dennis, &lt;BR /&gt;&lt;BR /&gt;When does theflagUMC_ERR_NOT_ENOUGH_DATA show? at your last frame orat eachGetFrame call,thus cause the decode can't continue? &lt;BR /&gt;You may check ifthere are VC1 decoding error by writing the streamof encoder's output to one file, then check if it can be decode by simple_player. &lt;BR /&gt;&lt;BR /&gt;In general,UMC doesn't takeUMC_ERR_NOT_ENOUGH_DATA aserror or quitconditionif GetFrame returnUMC_ERR_NOT_ENOUGH_DATA because the decoder doesn't start to decode untill the decodebuffer is full.&lt;BR /&gt;&lt;BR /&gt;For example, you may always see thegetFrame returns UMC_ERR_NOT_ENOUGH_DATA at first severalcall GetFrame() in the sample&lt;A href="http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/"&gt;http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;You have code &lt;BR /&gt;switch(umcSts)&lt;BR /&gt;{&lt;BR /&gt;case UMC::UMC_ERR_NOT_ENOUGH_DATA:&lt;BR /&gt;umcSts = mVC1Decoder-&amp;gt;GetFrame(&amp;amp;mediaData, &amp;amp;yuv_data);&lt;BR /&gt;break;&lt;BR /&gt;What is the purpose?&lt;BR /&gt;&lt;BR /&gt;How about if change the decoderlogic as the code inumc_h264_dec_con&lt;BR /&gt;&lt;BR /&gt;for (Ipp32s i = 0; ; i++)&lt;BR /&gt;{&lt;BR /&gt; if ((3 &amp;gt; in-&amp;gt;GetDataSize()) &amp;amp;&amp;amp;&lt;BR /&gt; (false == bEndOfStream))&lt;BR /&gt; {&lt;BR /&gt; Status statusHelper = splitter-&amp;gt;GetNextData(in.get(), 0);&lt;BR /&gt; if(UMC_OK != statusHelper){&lt;BR /&gt; bEndOfStream = true;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt; Status ret = h264Decoder-&amp;gt;GetFrame((bEndOfStream) ? (NULL) : (in.get()), out.get());&lt;BR /&gt;&lt;BR /&gt; if (UMC_ERR_NOT_ENOUGH_DATA == ret)&lt;BR /&gt; {&lt;BR /&gt; if (bEndOfStream)&lt;BR /&gt; break;&lt;BR /&gt; else&lt;BR /&gt; continue;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt; if (UMC_OK != ret)&lt;BR /&gt; continue;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;
Regards,&lt;BR /&gt;Ying</description>
      <pubDate>Tue, 29 Sep 2009 09:26:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859706#M7600</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2009-09-29T09:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: VC1Decoder Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859707#M7601</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hello&lt;BR /&gt;&lt;BR /&gt;In the code I sent which follows the example in the documentation, if you follow the while loop it keeps looping if GetFrame returns UMC_ERR_NOT_ENOUGH_DATA until VC1Splitter.GetNextData returns UMC_ERR_END_OF_STREAM. After that a call to GetFrame with the first parameter set to NULL still does not work.&lt;BR /&gt;&lt;/DIV&gt;
I think the code sample you wrote does essentially the same thing.&lt;BR /&gt;&lt;BR /&gt;Dennis&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Sep 2009 12:19:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859707#M7601</guid>
      <dc:creator>Dennis_W</dc:creator>
      <dc:date>2009-09-29T12:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: VC1Decoder Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859708#M7602</link>
      <description>&lt;DIV style="margin:0px;"&gt;It looks like I solved it&lt;BR /&gt;the output VideoData object needed to be initialized like so&lt;BR /&gt;&lt;BR /&gt;umcSts = yuv_data.Init((Ipp32s) imageFrame-&amp;gt;width(), (Ipp32s) imageFrame-&amp;gt;height(),&lt;BR /&gt;UMC::ColorFormat::YUV420, 8);&lt;BR /&gt;umcSts = yuv_data.Alloc();&lt;BR /&gt;&lt;BR /&gt;This way the 3 planes are initialized and their buffers allocated.&lt;BR /&gt;&lt;BR /&gt;Dennis&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Sep 2009 13:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/VC1Decoder-Problem/m-p/859708#M7602</guid>
      <dc:creator>Dennis_W</dc:creator>
      <dc:date>2009-09-29T13:35:22Z</dc:date>
    </item>
  </channel>
</rss>

