Hi,
I am trying to resize a VGA ( 640x480) put on a 704x576 frame into 1.05x times. There is a black border around 640x480 in my output, which comes from the detector to compensate for the PAL output.
Tried to resize into a 1.05X output on the same and it scaled the entire 704x576 image i.e. including the black border.
What I would want to do is resize just the 640x480 area( region of interest) of the input 704x576 and place it centrally on a 704x576 output frame.( With Black Borders outside the 640x480 area)
Is there any way I can achieve this ? I also want to know if I can crop out some pixels from my output buffer and still maintain the same resolution ?
Input buffer parameters are handled by specifying the startX ,StartY ,Width and Height values as show below, which works.
pInBufHeader->width = 640;
pInBufHeader->height = 480;
zoom_val = 1.05 ;
reszPrm.inStartX = 32 + pInBufHeader->startX + (pInBufHeader->width/2)*(1 - (1/zoom_val));
reszPrm.inStartY = 48 + pInBufHeader->startY + 1 + (pInBufHeader->height/2)*(1 - (1/zoom_val));
reszPrm.inWidth = 608; // 640/1.05 ( round off and take a number divisible by 32 for alignment)
reszPrm.inHeight = 448; // 480/1.05
Tried to change the output buffer parameters to the following,
reszOutPrm[0].outWidth = 640;//gVIDEO_ctrl.captureStream[rszStreamId].captureOutWidth;
reszOutPrm[0].outHeight = 480;//gVIDEO_ctrl.captureStream[rszStreamId].captureOutHeight;
reszOutPrm[0].outOffsetH = 640 ;//gVIDEO_ctrl.captureStream[rszStreamId].captureOutOffsetH;
reszOutPrm[0].outOffsetV = 480 ;///gVIDEO_ctrl.captureStream[rszStreamId].captureOutOffsetV;
and got the error, ERROR (alg_vidEnc.c|ALG_vidEnc[ 5.602001]
If someone could give some clarity on this, would be of great help as this of urgent requirement for us.
Thanks,
Swathi