i test different size camera composite and render ;the screen size is 1024x768,2 camera size is 1920x1080,another 2 camera size is 1280x720,log:
SrcComp rect’s right out of boundary, set to maximum width
parames eg:
NvBufferCreateParams input_params = {0};
input_params.payloadType = NvBufferPayload_SurfArray;
input_params.width = 1024;
input_params.height = 768;
input_params.layout = NvBufferLayout_Pitch;
input_params.nvbuf_tag = NvBufferTag_VIDEO_CONVERT;
input_params.colorFormat =NvBufferColorFormat_YUV420;
NvBufferRect dstCompRect[4];
dstCompRect[0].top = 0;
dstCompRect[0].left = 0;
dstCompRect[0].width = nScreenWidth/2;
dstCompRect[0].height = nScreenHeight/2;
dstCompRect[1].top = 0;
dstCompRect[1].left = nScreenWidth/2;
dstCompRect[1].width = nScreenWidth/2;
dstCompRect[1].height = nScreenHeight/2;
dstCompRect[2].top = nScreenHeight/2;
dstCompRect[2].left = 0;
dstCompRect[2].width = nScreenWidth/2;
dstCompRect[2].height = nScreenHeight/2;
dstCompRect[3].top = nScreenHeight/2;
dstCompRect[3].left = nScreenWidth/2;
dstCompRect[3].width = nScreenWidth/2;
dstCompRect[3].height = nScreenHeight/2;
m_compositeParam.src_comp_rect[0].top = 0;
m_compositeParam.src_comp_rect[0].left = 0;
m_compositeParam.src_comp_rect[0].width = 1920;
m_compositeParam.src_comp_rect[0].height = 1080;
m_compositeParam.src_comp_rect[1].top = 0;
m_compositeParam.src_comp_rect[1].left = 0;
m_compositeParam.src_comp_rect[1].width = 1920;
m_compositeParam.src_comp_rect[1].height = 1080;
m_compositeParam.src_comp_rect[2].top = 0;
m_compositeParam.src_comp_rect[2].left = 0;
m_compositeParam.src_comp_rect[2].width = 1280;
m_compositeParam.src_comp_rect[2].height = 720;
m_compositeParam.src_comp_rect[3].top = 0;
m_compositeParam.src_comp_rect[3].left = 0;
m_compositeParam.src_comp_rect[3].width = 1280;
m_compositeParam.src_comp_rect[3].height = 720;
run log:
###Composite src[0],w:1920,h:1080
###Composite src[1],w:1920,h:1080
###Composite src[2],w:1280,h:720
###Composite src[3],w:1280,h:720
###render thread start
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width
SrcComp rect’s right out of boundary, set to maximum width