Why different size camera composite failed

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

Do you use argus or gstreamer?

use jetson_multimedia_api

I think input parameter should be 1920x1080 and output as 1024x768

1280x720 camera input can set composite input parameter to 1920x1080? the coposite parameter can greater than real camera parameters?

Suppose the convertor can up scale to 1080p

yes,it can render success,but once composite,it log out “SrcComp rect’s right out of boundary, set to maximum width” ,so the log verbose

Below is the code log to print the message.

        SrcRect.right = (NvF32)(composite_params->src_comp_rect[j].left +
1614                                   composite_params->src_comp_rect[j].width);
1615          SrcRect.bottom = (NvF32)(composite_params->src_comp_rect[j].top +
1616                                    composite_params->src_comp_rect[j].height);
1617          if ((composite_params->src_comp_rect[j].left +
1618               composite_params->src_comp_rect[j].width) > (NvU32)sparams.width[0])
1619          {
1620            printf ("SrcComp rect's right out of boundary, set to maximum width\n");
1621            SrcRect.right = (NvF32)sparams.width[0];
1622          }
1623          if ((composite_params->src_comp_rect[j].top +
1624               composite_params->src_comp_rect[j].height) > (NvU32)sparams.height[0])
1625          {
1626            printf ("SrcComp rect's bottom out of boundary, set to maximum height\n");
1627            SrcRect.bottom = (NvF32)sparams.height[0];
1628          }