<?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 Saving video as JPEG in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Saving-video-as-JPEG/m-p/867954#M8501</link>
    <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I'm new to IPP and I'm trying to write a program that saves a snapshot of a video as Jpeg.&lt;BR /&gt;I'm using the code from the example jpegview.&lt;BR /&gt;&lt;BR /&gt;The video is in YUV422 format, coming from a usb camera. The capture software is based on MS DirectShow.&lt;BR /&gt;&lt;BR /&gt;I'm copying two images one above the other, converting them to RGB:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;CIppImage * pImage = new CIppImage();&lt;BR /&gt;Ipp8u* pAux = ippiMalloc_8u_C3(s.width, s.height * 2, &amp;amp;auxStep);&lt;BR /&gt;Ipp8u* pMiddle = pAux + (auxStep * s.height);&lt;BR /&gt;ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpLeftBuffer, gDstStep, pAux, auxStep, s);&lt;BR /&gt;ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpRightBuffer, gDstStep, pMiddle, auxStep, s);&lt;/PRE&gt;Note: I've tried ippiYUV422ToRGB_8u_C2C3R as well.&lt;BR /&gt;&lt;BR /&gt;Then I initialize my Image with doubled height:&lt;BR /&gt;&lt;PRE&gt;CIppImage * pImage = new CIppImage();&lt;BR /&gt;s.height *= 2;&lt;BR /&gt;success = pImage-&amp;gt;Alloc(s, 3, 8);&lt;/PRE&gt;And copy the RGB data into it:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;pImage-&amp;gt;CopyFrom(pAux, auxStep, s);&lt;/PRE&gt;&lt;BR /&gt;The thing is when a save it, the colors are completelly wrong. I've tried to use BGR and RGB both failed.&lt;BR /&gt;I'm not sure what I'm doing wrong. Here are the jpeg settings:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;quality = 8;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;restart_interval = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;huffman_opt = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;point_transform = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;predictor = 1; &lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;use_qdct = 1;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;mode = JPEG_BASELINE;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;color = JC_UNKNOWN;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;sampling = JS_422;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;dct_scale = JD_1_1;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;comment_size = 0;&lt;/PRE&gt;
Do you guys have any idea what is the problem here ?&lt;BR /&gt;&lt;BR /&gt;tia,&lt;BR /&gt;&lt;BR /&gt;Marco&lt;BR /&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 27 Jun 2008 11:25:56 GMT</pubDate>
    <dc:creator>marco_lopes</dc:creator>
    <dc:date>2008-06-27T11:25:56Z</dc:date>
    <item>
      <title>Saving video as JPEG</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Saving-video-as-JPEG/m-p/867954#M8501</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I'm new to IPP and I'm trying to write a program that saves a snapshot of a video as Jpeg.&lt;BR /&gt;I'm using the code from the example jpegview.&lt;BR /&gt;&lt;BR /&gt;The video is in YUV422 format, coming from a usb camera. The capture software is based on MS DirectShow.&lt;BR /&gt;&lt;BR /&gt;I'm copying two images one above the other, converting them to RGB:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;CIppImage * pImage = new CIppImage();&lt;BR /&gt;Ipp8u* pAux = ippiMalloc_8u_C3(s.width, s.height * 2, &amp;amp;auxStep);&lt;BR /&gt;Ipp8u* pMiddle = pAux + (auxStep * s.height);&lt;BR /&gt;ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpLeftBuffer, gDstStep, pAux, auxStep, s);&lt;BR /&gt;ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpRightBuffer, gDstStep, pMiddle, auxStep, s);&lt;/PRE&gt;Note: I've tried ippiYUV422ToRGB_8u_C2C3R as well.&lt;BR /&gt;&lt;BR /&gt;Then I initialize my Image with doubled height:&lt;BR /&gt;&lt;PRE&gt;CIppImage * pImage = new CIppImage();&lt;BR /&gt;s.height *= 2;&lt;BR /&gt;success = pImage-&amp;gt;Alloc(s, 3, 8);&lt;/PRE&gt;And copy the RGB data into it:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;pImage-&amp;gt;CopyFrom(pAux, auxStep, s);&lt;/PRE&gt;&lt;BR /&gt;The thing is when a save it, the colors are completelly wrong. I've tried to use BGR and RGB both failed.&lt;BR /&gt;I'm not sure what I'm doing wrong. Here are the jpeg settings:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;quality = 8;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;restart_interval = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;huffman_opt = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;point_transform = 0;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;predictor = 1; &lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;use_qdct = 1;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;mode = JPEG_BASELINE;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;color = JC_UNKNOWN;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;sampling = JS_422;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;dct_scale = JD_1_1;&lt;/PRE&gt;
&lt;PRE&gt; pJpegSettings-&amp;gt;comment_size = 0;&lt;/PRE&gt;
Do you guys have any idea what is the problem here ?&lt;BR /&gt;&lt;BR /&gt;tia,&lt;BR /&gt;&lt;BR /&gt;Marco&lt;BR /&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2008 11:25:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Saving-video-as-JPEG/m-p/867954#M8501</guid>
      <dc:creator>marco_lopes</dc:creator>
      <dc:date>2008-06-27T11:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Saving video as JPEG</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Saving-video-as-JPEG/m-p/867955#M8502</link>
      <description>&lt;P&gt;Hi Marco,&lt;/P&gt;
&lt;P&gt;If your input format is YUY2 (YCbCr422) then you can use IPP JPEG codec directly. You need to set input color as JC_YCBCR and input sampling as JS_422. Note, codec do not support resampling, that means you also need to specify JPEG color as JC_YCBCR and JPEG sampling as JS_422.&lt;/P&gt;
&lt;P&gt;Be aware that quality level you are using (8) is very low. You will get lot of compression artifacts as a result. Of course compression ration will be higher. Usually, level 75 provides good tradeoff for generic applications.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2008 11:42:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Saving-video-as-JPEG/m-p/867955#M8502</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-06-27T11:42:32Z</dc:date>
    </item>
  </channel>
</rss>

