- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
Iwould like let the IJL( embedded IPP) decode jpeg as YCbCr format,
the code is work for decode as RGB/BGR:
typedef struct _IJLDecoder
{
// create the JPEG structure on the stack
JPEG_CORE_PROPERTIES jcprops;
}IJLDecoderObject;
:
:
IJLDecoderObject *Decoder;
Decoder = (IJLDecoderObject*)malloc(1*sizeof(IJLDecoderObject));
if(NULL == decoder) return NULL;
// intialize the JPEG structure
ijlInit( &(Decoder->jcprops) );
/* set the IJL data source as the input buffer */
/* jpeg as src : pSrcBuf format is YCbCr411.
RGB/BGR as dst: pDstBuf
*/
Decoder->jcprops.JPGBytes = (unsigned char*)pSrcBuf;
Decoder->jcprops.JPGSizeBytes = (int)jpegSize;
/* read JPEG parameters from the input buffer*/
jerr = ijlRead(&(Decoder->jcprops), IJL_JBUFF_READPARAMS);
if(jerr < 0) return -1;
/* set up the DIB specification for the JPEG decoder */
Decoder->jcprops.DIBBytes = (unsigned char*)pDstBuf;
Decoder->jcprops.DIBWidth = Decoder->jcprops.JPGWidth;
Decoder->jcprops.DIBHeight = (int)(Decoder->jcprops.JPGHeight);
Decoder->jcprops.DIBColor = IJL_BGR;
Decoder->jcprops.DIBSubsampling = IJL_NONE;
Decoder->jcprops.DIBChannels = 3;
Decoder->jcprops.DIBPadBytes = IJL_DIB_PAD_BYTES( Decoder->jcprops.DIBWidth, Decoder->jcprops.DIBChannels);
/* read data from the JPEG image into the bitmap*/
jerr = ijlRead(&(Decoder->jcprops), IJL_JBUFF_READWHOLEIMAGE);
When I change the line for decode as YCbCr :
Decoder->jcprops.DIBColor = IJL_BGR;
as
Decoder->jcprops.DIBColor = IJL_YCBCR;
the jerr is not IJL_OK, but IJL_INVALID_JPEG_PROPERTIES !!
How should I do to let the IJL decode as YCbCr (411)?
thank you.
Iwould like let the IJL( embedded IPP) decode jpeg as YCbCr format,
the code is work for decode as RGB/BGR:
typedef struct _IJLDecoder
{
// create the JPEG structure on the stack
JPEG_CORE_PROPERTIES jcprops;
}IJLDecoderObject;
:
:
IJLDecoderObject *Decoder;
Decoder = (IJLDecoderObject*)malloc(1*sizeof(IJLDecoderObject));
if(NULL == decoder) return NULL;
// intialize the JPEG structure
ijlInit( &(Decoder->jcprops) );
/* set the IJL data source as the input buffer */
/* jpeg as src : pSrcBuf format is YCbCr411.
RGB/BGR as dst: pDstBuf
*/
Decoder->jcprops.JPGBytes = (unsigned char*)pSrcBuf;
Decoder->jcprops.JPGSizeBytes = (int)jpegSize;
/* read JPEG parameters from the input buffer*/
jerr = ijlRead(&(Decoder->jcprops), IJL_JBUFF_READPARAMS);
if(jerr < 0) return -1;
/* set up the DIB specification for the JPEG decoder */
Decoder->jcprops.DIBBytes = (unsigned char*)pDstBuf;
Decoder->jcprops.DIBWidth = Decoder->jcprops.JPGWidth;
Decoder->jcprops.DIBHeight = (int)(Decoder->jcprops.JPGHeight);
Decoder->jcprops.DIBColor = IJL_BGR;
Decoder->jcprops.DIBSubsampling = IJL_NONE;
Decoder->jcprops.DIBChannels = 3;
Decoder->jcprops.DIBPadBytes = IJL_DIB_PAD_BYTES( Decoder->jcprops.DIBWidth, Decoder->jcprops.DIBChannels);
/* read data from the JPEG image into the bitmap*/
jerr = ijlRead(&(Decoder->jcprops), IJL_JBUFF_READWHOLEIMAGE);
When I change the line for decode as YCbCr :
Decoder->jcprops.DIBColor = IJL_BGR;
as
Decoder->jcprops.DIBColor = IJL_YCBCR;
the jerr is not IJL_OK, but IJL_INVALID_JPEG_PROPERTIES !!
How should I do to let the IJL decode as YCbCr (411)?
thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
IJL is able to output YCbCr422 (YUY2) only. Note, it does not implement resampling. That means that YUY2 output is only available for JPEG images which compressed with YCbCr422 format.
Regards,
Vladimir
IJL is able to output YCbCr422 (YUY2) only. Note, it does not implement resampling. That means that YUY2 output is only available for JPEG images which compressed with YCbCr422 format.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you lots.
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