<?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: Encode Jpeg by IJL in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890700#M11424</link>
    <description>&lt;DIV style="margin:0px;"&gt;I uploaded files. Thank a lot for the kind description.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;By the way, JPG file that you attached is 0 KB except first.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;DaeYoung.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Dec 2008 00:59:52 GMT</pubDate>
    <dc:creator>daeyoung_kim</dc:creator>
    <dc:date>2008-12-05T00:59:52Z</dc:date>
    <item>
      <title>Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890694#M11418</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I want to encode YCbCr422(DIB) to JPEG by using IJL without converting it to 24-bits RGB image. However, the create JPEG imagegreen tonecompared with original image. Similar question was registered as same title (Sep.20.2005). I also used similar code as following.&lt;/P&gt;
&lt;P&gt;jCprops.DIBWidth = Wid;&lt;BR /&gt;jCprops.DIBHeight = Hei;&lt;BR /&gt;jCprops.DIBBytes = pYCbCr;&lt;BR /&gt;jCprops.DIBPadBytes = 0;&lt;BR /&gt;jCprops.DIBChannels = 3;&lt;BR /&gt;jCprops.DIBColor = IJL_YCBCR;&lt;BR /&gt;jCprops.DIBSubsampling = IJL_422;&lt;BR /&gt;&lt;BR /&gt;jCprops.JPGWidth = Wid;&lt;BR /&gt;jCprops.JPGHeight = Hei;&lt;BR /&gt;jCprops.JPGChannels = 3;&lt;BR /&gt;jCprops.JPGColor = IJL_YCBCR;&lt;BR /&gt;jCprops.JPGSubsampling = IJL_422;&lt;BR /&gt;jCprops.jquality = 100;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 10:29:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890694#M11418</guid>
      <dc:creator>daeyoung_kim</dc:creator>
      <dc:date>2008-12-03T10:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890695#M11419</link>
      <description>&lt;DIV style="margin:0px;"&gt;There was sample code attached to one these old threads. It seems it was lost within a time and movement from one forum engine to another.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Code like this should work for YUY2 compression/decompression&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;PRE&gt;[cpp]int ijl_compress_from_ycbycr(
  BYTE* buffer,
  int   width,
  int   height,
  char* name)
{
  int res = 0;
  IJLERR jerr;
  JPEG_CORE_PROPERTIES jcprops;

  jerr = ijlInit(&amp;amp;jcprops);
  if(IJL_OK != jerr)
  {
    printf("ijlInit() failed - %sn",ijlErrorStr(jerr));
    res = 1;
    goto Exit;
  }

  jcprops.DIBWidth       = width;
  jcprops.DIBHeight      = -height;
  jcprops.DIBChannels    = 3;
  jcprops.DIBBytes       = buffer;
  jcprops.DIBPadBytes    = 0;
  jcprops.DIBColor       = IJL_YCBCR;
  jcprops.DIBSubsampling = IJL_422;

  jcprops.JPGFile        = name;
  jcprops.JPGWidth       = width;
  jcprops.JPGHeight      = height;
  jcprops.JPGChannels    = 3;
  jcprops.JPGColor       = IJL_YCBCR;
  jcprops.JPGSubsampling = IJL_422;
  jcprops.jquality       = 75;

  jerr = ijlWrite(&amp;amp;jcprops,IJL_JFILE_WRITEWHOLEIMAGE);
  if(IJL_OK != jerr)
  {
    printf("ijlInit() failed - %sn",ijlErrorStr(jerr));
    res = 1;
    goto Exit;
  }

Exit:

  jerr = ijlFree(&amp;amp;jcprops);
  if(IJL_OK != jerr)
  {
    printf("ijlFree() failed - %sn",ijlErrorStr(jerr));
    res = 1;
  }

  return res;
} // ijl_compress_from_ycbycr()


int ijl_decompress_to_ycbycr(
  char*  name,
  BYTE** buffer,
  int*   width,
  int*   height)
{
  int res;
  BYTE* dib_buffer = NULL;
  int   dib_buffer_size;
  IJLERR jerr;
  JPEG_CORE_PROPERTIES jcprops;

  jerr = ijlInit(&amp;amp;jcprops);
  if(IJL_OK != jerr)
  {
    printf("ijlInit() failed - %sn",ijlErrorStr(jerr));
    res = 1;
    goto Exit;
  }

  jcprops.JPGFile        = name;

  jerr = ijlRead(&amp;amp;jcprops,IJL_JFILE_READPARAMS);
  if(IJL_OK != jerr)
  {
    printf("ijlRead() failed - %sn",ijlErrorStr(jerr));
    res = 1;
    goto Exit;
  }

  if(jcprops.JPGSubsampling != IJL_422 || jcprops.JPGChannels != 3)
  {
    printf("only JPEG with 422 sampling can be decoded as YCBYCR DIB with 422 samplingn");
    res = 1;
    goto Exit;
  }

  dib_buffer_size = jcprops.JPGWidth * jcprops.JPGHeight * jcprops.JPGChannels;

  dib_buffer = new BYTE [dib_buffer_size];
  if(NULL == dib_buffer)
  {
    printf("can't allocate memoryn");
    res = 1;
    goto Exit;
  }
 
  jcprops.DIBWidth       = jcprops.JPGWidth;
  jcprops.DIBHeight      = -jcprops.JPGHeight;
  jcprops.DIBChannels    = 2; // NOTE: we must set nchannels = 2 to decode as YCBYCR
  jcprops.DIBBytes       = dib_buffer;
  jcprops.DIBPadBytes    = 0;
  jcprops.DIBColor       = IJL_YCBCR;
  jcprops.DIBSubsampling = IJL_422;

  jerr = ijlRead(&amp;amp;jcprops,IJL_JFILE_READWHOLEIMAGE);
  if(IJL_OK != jerr)
  {
    printf("ijlRead() failed - %sn",ijlErrorStr(jerr));
    res = 1;
    goto Exit;
  }

  res = 0;
  *buffer = dib_buffer;
  *width  = jcprops.JPGWidth;
  *height = jcprops.JPGHeight;

Exit:

  jerr = ijlFree(&amp;amp;jcprops);
  if(IJL_OK != jerr)
  {
    printf("ijlFree() failed - %sn",ijlErrorStr(jerr));
    res = 1;
  }

  if(res == 1)
  {
    if(NULL != dib_buffer)
    {
      delete[] dib_buffer;
    }
  }

  return res;
} // ijl_decompress_to_ycbycr()
[/cpp]&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt; Vladimir&lt;BR /&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 11:54:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890695#M11419</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-03T11:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890696#M11420</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Thanks for the quick response. My code is same as you. I attached some files. (width : 680, height : 500)&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;1. 680500.ybr : Original data. file type is YCBCR422.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;
&lt;DIV style="margin:0px;"&gt;2. 680500.jpg : Encode by IJL. Green tone color&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;3. 680500_2.jpg : Encode by another library. Gray tone.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Iwould liketo get a result like 680500_2.jpg by using IJL.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;By the way, I have another question. Does 'iplYCrCb2RGB' suppor converting from YBR422 to RGB? I think the function is availible only for converting from YBRFull to RGB. My assumption is right?&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Best Regards.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;DaeYoung&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2008 01:56:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890696#M11420</guid>
      <dc:creator>daeyoung_kim</dc:creator>
      <dc:date>2008-12-04T01:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890697#M11421</link>
      <description>&lt;DIV style="margin:0px;"&gt;I see no attached files. Note, after you create folder and put file to it you need to set check mark and choose attach file option.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;If you want to convert YCbCr422 to RGB you maywant to use function ippiYCbCr422ToRGB_8u_P3C3R.&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>Thu, 04 Dec 2008 05:33:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890697#M11421</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-04T05:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890698#M11422</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I will test ippiYCbCR422ToRGB_8u_P3C3R. I can create folder and upload files.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;But, I can not find 'attach file option'. Could you help this please?&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Thanks.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;DaeYoung.&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2008 08:06:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890698#M11422</guid>
      <dc:creator>daeyoung_kim</dc:creator>
      <dc:date>2008-12-04T08:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890699#M11423</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Please take a look at kind of guide &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=62285" target="_blank"&gt;how to attach files&lt;/A&gt; (I've just created)&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2008 10:09:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890699#M11423</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-04T10:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Encode Jpeg by IJL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890700#M11424</link>
      <description>&lt;DIV style="margin:0px;"&gt;I uploaded files. Thank a lot for the kind description.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;By the way, JPG file that you attached is 0 KB except first.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;DaeYoung.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2008 00:59:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Encode-Jpeg-by-IJL/m-p/890700#M11424</guid>
      <dc:creator>daeyoung_kim</dc:creator>
      <dc:date>2008-12-05T00:59:52Z</dc:date>
    </item>
  </channel>
</rss>

