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 ");
}
...連結已複製
4 回應
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
