- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
could you please provide more info about your issue? What IPP version, OS, platform did you use? Might be you can provide us simple test case?
You also can take a look on CJPGViewDoc::SaveAsJPEG() function, which is able to encode RGB24 picture to YCBCR JPEG.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ipp8u* pRGBbuf;
printf("wrong:can't open primitive picture! ");
fp.Close();
if(readnum!=PicLen)
printf("wrong:read %d bytes from the primitive picture! ",readnum);
IppiSize roi={640,480};
encoder.SetSource(pRGBbuf,640*3,roi,3,JC_RGB);
int JPEGSize=640*480*3;
Ipp8u* pJPEG;
pJPEG = (Ipp8u*)ippMalloc(JPEGSize);
JSS sampling=JS_444;
encoder.SetDestinatio(pJPEG,JPEGSize,
encoder.WriteHeader();
JPEGSize = encoder.m_dst.currPos;
cout<<"head length:"<
JPEGSize = encoder.m_dst.currPos;
cout<<"data length:"<
fp.Write (pJPEG,JPEGSize);
fp.Close ();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
note that ippiMalloc aligns memory on 32 byte bondary and return you line stepfor further reference. But you use your own line step value (640*3) in SetSource which does not match the actual line step returned by ippiMalloc. I think when you correct this (just use stepC3 returned by ippiMalloc) program should work correctly.
Regards,
Vladimir
- 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,
you removed geometrical artifacts, you have before, so it actually means that not the same result, right?
Second, when you specify input image color space are you sure it is RGB? If you got data from BMP file - color spaceshould beBGR, so could you please try to change?
Finally, I recommend you to take a lookat existing IPP sample,JPEGView, it was speciallydeveloped to help people to understand how to use IPP functions to build JPEG codec
Regards,
Vladimir
- 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
Wow, that's great! We are glad to help.
By the way, in the next version of IPP (v5.1 which is cooming soon, sometime in Q2) we will add threading into JPEG encoder, so if you use dual core processor, you will be able to compress more for the same time. Stay tuned with IPP :)
Regards,
Vladimir

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