- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I will be glad, if you can give me a sample code to accomplish this task.
Here is my code;
does it possible to resize a decoded raw video frame so that it will be half of its dimensions.
I have a piece of code which encodes to JPEG without changing the original dimensions.
I will be glad, if you can give me a sample code to accomplish this task.
Many Thanks.
Here is my code;
...
CJPEGEncoder my_encoder;
JERRCODE jerr;
IppiSize dimensions;
dimensions.height = out->GetHeight(); // out is type of VideoData*
dimensions.width = out->GetWidth();
Ipp8u* pSrcs[3] = {(Ipp8u*)out->GetPlanePointer(0),
(Ipp8u*)out->GetPlanePointer(1),
(Ipp8u*)out->GetPlanePointer(2)};
Ipp32s pSrcSteps[3] = { out->GetPlanePitch(0),
out->GetPlanePitch(1),
out->GetPlanePitch(2)};
jerr = my_encoder.CJPEGEncoder::SetSource(pSrcs, pSrcSteps, dimensions, 3, JC_YCBCR, JS_422);
if (jerr != JPEG_OK) {
printf(" f1 ");
}
jerr = my_encoder.CJPEGEncoder::SetParams(JPEG_BASELINE, JC_YCBCR, JS_422, 0, 0, tParam->quality);
if (jerr != JPEG_OK) {
printf(" f2 ");
}
...Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, it not cleare for me from you post, do you need resize during encode or decode process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With UIC picnic application we demonstrate how to use JPEG ability to produce 1:2, 1:4 and 1:8 downsampled images at decoding stage.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me make it clear.
Above "out" is type ofVideoData pointer whichpoints to a decoded MPEG4 frame.
And its original resolution is 4 CIF.
I want to encode this frame as JPEG but as 2 CIF for example.
many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then there is nothing JPEG encoder can help you. You will just need to do resize before JPEG encoding
Regards,
Vladimir
Regards,
Vladimir
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
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