- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I'm decoding JPEG image with IJL_411 sampling format, my ijlRead() fails. The code is like:
jprops.JPGBytes = const_cast(Begin); //encoded MJPEG data buffer
jprops.JPGSizeBytes = len; // the length of encoded MJPEG data buffer
// Read the properties first to find out the color space of the JPEG.
if (ijlRead(&jprops, IJL_JBUFF_READPARAMS) != IJL_OK)
return false;
// Fail if the frame size changed.
if (jprops.JPGWidth!=m_width || jprops.JPGHeight!=m_height)
return false;
jprops.DIBWidth = m_width;
jprops.DIBHeight = m_height;
m_rgbbuffer.resize(m_width * m_height * 3);
jprops.DIBColor = IJL_BGR;
jprops.DIBChannels = 3;
jprops.DIBPadBytes = IJL_DIB_PAD_BYTES( jprops.DIBWidth, jprops.DIBChannels );
int size = (jprops.DIBWidth * jprops.DIBChannels + jprops.DIBPadBytes) * jprops.DIBHeight;
BYTE *data = new BYTE[ size ];
memset( data, 0, size );
jprops.DIBBytes = data;
if (ijlRead(&jprops, IJL_JBUFF_READWHOLEIMAGE) != IJL_OK)
return false; //fails here.
What I did wrong? Thanks for any help.
-cath
I'm decoding JPEG image with IJL_411 sampling format, my ijlRead() fails. The code is like:
jprops.JPGBytes = const_cast
jprops.JPGSizeBytes = len; // the length of encoded MJPEG data buffer
// Read the properties first to find out the color space of the JPEG.
if (ijlRead(&jprops, IJL_JBUFF_READPARAMS) != IJL_OK)
return false;
// Fail if the frame size changed.
if (jprops.JPGWidth!=m_width || jprops.JPGHeight!=m_height)
return false;
jprops.DIBWidth = m_width;
jprops.DIBHeight = m_height;
m_rgbbuffer.resize(m_width * m_height * 3);
jprops.DIBColor = IJL_BGR;
jprops.DIBChannels = 3;
jprops.DIBPadBytes = IJL_DIB_PAD_BYTES( jprops.DIBWidth, jprops.DIBChannels );
int size = (jprops.DIBWidth * jprops.DIBChannels + jprops.DIBPadBytes) * jprops.DIBHeight;
BYTE *data = new BYTE[ size ];
memset( data, 0, size );
jprops.DIBBytes = data;
if (ijlRead(&jprops, IJL_JBUFF_READWHOLEIMAGE) != IJL_OK)
return false; //fails here.
What I did wrong? Thanks for any help.
-cath
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - cath09
Hi there,
I'm decoding JPEG image with IJL_411 sampling format, my ijlRead() fails. The code is like:
jprops.JPGBytes = const_cast(Begin); //encoded MJPEG data buffer
jprops.JPGSizeBytes = len; // the length of encoded MJPEG data buffer
// Read the properties first to find out the color space of the JPEG.
if (ijlRead(&jprops, IJL_JBUFF_READPARAMS) != IJL_OK)
return false;
// Fail if the frame size changed.
if (jprops.JPGWidth!=m_width || jprops.JPGHeight!=m_height)
return false;
jprops.DIBWidth = m_width;
jprops.DIBHeight = m_height;
m_rgbbuffer.resize(m_width * m_height * 3);
jprops.DIBColor = IJL_BGR;
jprops.DIBChannels = 3;
jprops.DIBPadBytes = IJL_DIB_PAD_BYTES( jprops.DIBWidth, jprops.DIBChannels );
int size = (jprops.DIBWidth * jprops.DIBChannels + jprops.DIBPadBytes) * jprops.DIBHeight;
BYTE *data = new BYTE[ size ];
memset( data, 0, size );
jprops.DIBBytes = data;
if (ijlRead(&jprops, IJL_JBUFF_READWHOLEIMAGE) != IJL_OK)
return false; //fails here.
What I did wrong? Thanks for any help.
-cath
I'm decoding JPEG image with IJL_411 sampling format, my ijlRead() fails. The code is like:
jprops.JPGBytes = const_cast
jprops.JPGSizeBytes = len; // the length of encoded MJPEG data buffer
// Read the properties first to find out the color space of the JPEG.
if (ijlRead(&jprops, IJL_JBUFF_READPARAMS) != IJL_OK)
return false;
// Fail if the frame size changed.
if (jprops.JPGWidth!=m_width || jprops.JPGHeight!=m_height)
return false;
jprops.DIBWidth = m_width;
jprops.DIBHeight = m_height;
m_rgbbuffer.resize(m_width * m_height * 3);
jprops.DIBColor = IJL_BGR;
jprops.DIBChannels = 3;
jprops.DIBPadBytes = IJL_DIB_PAD_BYTES( jprops.DIBWidth, jprops.DIBChannels );
int size = (jprops.DIBWidth * jprops.DIBChannels + jprops.DIBPadBytes) * jprops.DIBHeight;
BYTE *data = new BYTE[ size ];
memset( data, 0, size );
jprops.DIBBytes = data;
if (ijlRead(&jprops, IJL_JBUFF_READWHOLEIMAGE) != IJL_OK)
return false; //fails here.
What I did wrong? Thanks for any help.
-cath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I glad to hear that. What is your feeling on UMC MJPEG codec performance and functionality?
Regards,
Vladimir
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
Hi, I glad to hear that. What is your feeling on UMC MJPEG codec performance and functionality?
Regards,
Vladimir
Regards,
Vladimir
So far, the UMC MJPEG codec runs good for our project.
-cath

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page