<?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: mpeg4 decoder, problems with large avis in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895684#M12054</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/61463"&gt;vdudnik&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;Our expert recommend to replace UMC::FIOReader with UMC::FileReader which use vm_file wrappers to support files with more than 2 Gb lenght&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;SPAN style="font-size: 11pt; font-family: " calibri=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Now it works great!&lt;/P&gt;
&lt;P&gt;Thanks a lot Vladimir! &lt;BR /&gt;By the way, is there any documentation for FileReader or FIOReader? I had no idea this could be the problem.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Nov 2008 16:02:08 GMT</pubDate>
    <dc:creator>persorner2</dc:creator>
    <dc:date>2008-11-25T16:02:08Z</dc:date>
    <item>
      <title>mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895680#M12050</link>
      <description>&lt;PRE&gt;[sectionBodyText]I have a problem with using multiple mpeg4 encoded videostream avis. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]Decoding the first 2 gigabytes of my recordings work fine, but about 2.1 gigs (suspiciously close to 2^31) in to the recording&lt;BR /&gt;getFrame from the decoder starts returning UMC_ERR_SYNC and UMC_WRN_INVALID_STREAM alternatingly. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]My video contains 3 videostreams (DX50) and no sound. If I decode just one of the video streams, I have no problems. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]If I ignore the errors, I will get a messed up video that looks like it contains some video data from the beginning of the recording instead. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]It also seems to be from a different video stream than expected (i.e stuff from stream 2 can be found in stream 1). &lt;BR /&gt;To me it looks like some kind of overflow error. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]My videos are recorded with a mpeg4 encoder board and muxed into one avi using directshow. [/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]I can play them in VLC or Media Player classic without problems.[/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[sectionBodyText]Here's some code that should reproduce the error:[/sectionBodyText]&lt;/PRE&gt;
&lt;PRE&gt;[cpp][/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]int decodeAVI(char * filename, char * smafilename, int maxFrames)
{

  UMC::Status sts, sSts;
  UMC::FIOReader Reader;
  UMC::AVISplitter Splitter;
  UMC::SplitterInfo *StreamInfo;
  UMC::MPEG4VideoDecoder Decoder[3]; // one per stream
 
  UMC::MediaData in[3]; // one per stream
  UMC::VideoData out[3]; // one per stream

  // Initialize data reader component

  UMC::FileReaderParams FileParams;
  FileParams.m_portion_size = 0;
  vm_string_strcpy(FileParams.m_file_name, filename);
  sts = Reader.Init(&amp;amp;FileParams);

  if (sts != UMC::UMC_OK) {
    printf("Reader Init error ");
    return 1;
  }

  // Initialize splitter component

  UMC::SplitterParams SplParams;

  SplParams.m_lFlags = UMC::VIDEO_SPLITTER; // extract only video
  SplParams.m_pDataReader = &amp;amp;Reader;

  sts = Splitter.Init(SplParams);

  if (sts != UMC::UMC_OK) {

    printf("Splitter Init error ");
    return 1;

  }

  sts = Splitter.Run();

  if (sts != UMC::UMC_OK) {

    printf("Splitter Run error ");
    return 1;

  }

  // Get stream info

  sts = Splitter.GetInfo(&amp;amp;StreamInfo);

  if (sts != UMC::UMC_OK) {

    printf("Splitter GetInfo error ");
    return 1;

  }
  else
  {
    printf("Found %d TrackstStream Length: %.4fsn",StreamInfo-&amp;gt;m_nOfTracks,StreamInfo-&amp;gt;m_dDuration);
  }

  // find all MPEG4 video-tracks

  std::vector&lt;IPP32U&gt; videoTracks;

  for (Ipp32u videoTrack = 0; videoTrack &amp;lt; StreamInfo-&amp;gt;m_nOfTracks; videoTrack++) {
    if (videoTracks.size()==3)
      break;
    if (StreamInfo-&amp;gt;m_ppTrackInfo[videoTrack]-&amp;gt;m_Type == UMC::TRACK_MPEG4V)
      videoTracks.push_back(videoTrack);

  }
  if (videoTracks.size() == 0) 
  {
    printf("AVI does not contain MPEG-4 video ");
    return 1;
  }
  
  UMC::VideoStreamInfo videoTrackInfo[3];
  UMC::VideoDecoderParams VDecParams[3];
  
  for (Ipp32u track=0;track&lt;VIDEOTRACKS.SIZE&gt;m_ppTrackInfo[videoTracks[track]]-&amp;gt;m_pStreamInfo);

    // Initialize video decoder component

    VDecParams[track].info = videoTrackInfo[track];
    VDecParams[track].lFlags = UMC::FLAG_VDEC_REORDER;
    VDecParams[track].numThreads = 1;
    VDecParams[track].m_pData = StreamInfo-&amp;gt;m_ppTrackInfo[videoTracks[track]]-&amp;gt;m_pDecSpecInfo;
    sts = Decoder[track].Init(&amp;amp;VDecParams[track]);

    if (sts != UMC::UMC_OK) {

      printf("Decoder Init error ");
      return 1;
    }

    if (videoTrackInfo[track].color_format != UMC::YV12) 
    { 
      printf("Expected YV12 Format");
    }

    // allocate memory for video data
    out[track].Init(videoTrackInfo[track].clip_info.width,videoTrackInfo[track].clip_info.height,videoTrackInfo[track].color_format);
    out[track].SetColorFormat(videoTrackInfo[track].color_format);
    out[track].Alloc();
    printf("Track Size: %dx%dn",videoTrackInfo[track].clip_info.width,videoTrackInfo[track].clip_info.height);

  }

  int nframes = 0;
  printf("Decoding Streamn");[/cpp]&lt;/VIDEOTRACKS.SIZE&gt;&lt;/IPP32U&gt;&lt;/PRE&gt;
&lt;PRE&gt;[cpp][/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]  for (Ipp32u track=0;track&lt;VIDEOTRACKS.SIZE&gt;
&lt;PRE&gt;[cpp]  {[/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]      while (UMC::UMC_ERR_NOT_ENOUGH_DATA == (sts = Splitter.GetNextData(&amp;amp;in[track], videoTracks[track]))) // wait until data is decoded
        vm_time_sleep(5);

      if (sts != UMC::UMC_OK &amp;amp;&amp;amp; sts != UMC::UMC_ERR_END_OF_STREAM) 
      {

        printf("Splitter error (%d), frame %d ", sts, nframes);
        break;

      }

      sSts = sts;
      sts = Decoder[track].GetFrame(sSts == UMC::UMC_OK ? &amp;amp;in[track] : NULL, &amp;amp;out[track]);[/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]       ///////////////////[/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]       /// returns UMC_ERR_SYNC around 2 gigs into the recording[/cpp]&lt;/PRE&gt;
&lt;PRE&gt;[cpp]   

      if (sts != UMC::UMC_OK &amp;amp;&amp;amp; sts != UMC::UMC_ERR_NOT_ENOUGH_DATA)       
      {

        printf("Track %d, Dec Err (%d), Frame %d ", track, sts, nframes);
        return 1;
   
      }
   
    } // all tracks decoded

    if (sts == UMC::UMC_OK) 
    {
      if (nframes%100==0)
        printf("frame %4dn", nframes);

    }
                     
    if (sSts == UMC::UMC_ERR_END_OF_STREAM)  
      break;

  }
 
  printf("processed %d framesn", nframes);

  return 0;

}[/cpp]&lt;/PRE&gt;&lt;/VIDEOTRACKS.SIZE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Nov 2008 13:59:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895680#M12050</guid>
      <dc:creator>persorner2</dc:creator>
      <dc:date>2008-11-25T13:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895681#M12051</link>
      <description>&lt;DIV style="margin:0px;"&gt;Sorry about the formatting..I'm using: w_ipp-samples_p_5.3.095&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Nov 2008 14:08:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895681#M12051</guid>
      <dc:creator>persorner2</dc:creator>
      <dc:date>2008-11-25T14:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895682#M12052</link>
      <description>&lt;DIV style="margin:0px;"&gt;Did you try this file with simple_player application?&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 15:19:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895682#M12052</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-11-25T15:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895683#M12053</link>
      <description>&lt;DIV style="margin:0px;"&gt;Our expert recommend to replace UMC::FIOReader with UMC::FileReader which use vm_file wrappers to support files with more than 2 Gb lenght&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;SPAN style="font-size: 11pt; font-family: " calibri=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 15:27:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895683#M12053</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-11-25T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895684#M12054</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/61463"&gt;vdudnik&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;Our expert recommend to replace UMC::FIOReader with UMC::FileReader which use vm_file wrappers to support files with more than 2 Gb lenght&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;SPAN style="font-size: 11pt; font-family: " calibri=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Now it works great!&lt;/P&gt;
&lt;P&gt;Thanks a lot Vladimir! &lt;BR /&gt;By the way, is there any documentation for FileReader or FIOReader? I had no idea this could be the problem.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:02:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895684#M12054</guid>
      <dc:creator>persorner2</dc:creator>
      <dc:date>2008-11-25T16:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895685#M12055</link>
      <description>&lt;DIV style="margin:0px;"&gt;Yes, UMC components should be documented in UMC manual, please check folder 'doc' in audio-video-codecs sample.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;BR /&gt; Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:07:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895685#M12055</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-11-25T16:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895686#M12056</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;I have read the manual, I couldn't find any mention about the differences between FIOReader and FileReader though, only the baseclass datareader is documented there as far as I can tell.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:14:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895686#M12056</guid>
      <dc:creator>persorner2</dc:creator>
      <dc:date>2008-11-25T16:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: mpeg4 decoder, problems with large avis</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895687#M12057</link>
      <description>&lt;DIV style="margin:0px;"&gt;Thanks for your points. That mean we have to improve documentation in future versions.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2008 16:19:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/mpeg4-decoder-problems-with-large-avis/m-p/895687#M12057</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-11-25T16:19:18Z</dc:date>
    </item>
  </channel>
</rss>

