I am trying to use TI's provided jpeg encoder (jpegenc) to encode a 3840x2748 image. I have successfully encoded 720x480 images, and have adjusted the parameters and dynamic parameters for the increased resolution, but the call to Ienc1_process() fails, with 0 bytes generated.
The error code from IIMGENC1_OutArgs.extendedError is 0x48FA9C6C, corresponding to:
XDM_FATALERROR
XDM_CORRUPTEDHEADER
XDM_CORRUPTEDDATA
XDM_INSUFFICIENTDATA
The first three error flags seem to indicate a result, rather than a cause. Can anyone elaborate on the meaning of XDM_INSUFFICIENTDATA?
Code excerpt:
// Initialize Image Encoder Params to defaults
iEncParams = &iEncDefaultParams;
iEncDynamicParams = &iEncDefaultDynamicParams;
// Set up Image Encoder Static Params
iEncParams->maxHeight = 2748; //2748;
iEncParams->maxWidth = 3840; //3840;
// Set up Image Encoder Dynamic Params
iEncDynamicParams->inputChromaFormat = XDM_YUV_422P;
iEncDynamicParams->inputHeight = 2748;//2748;
iEncDynamicParams->inputWidth = 3840;//3840;
iEncDynamicParams->captureWidth = 3840;//3840;
// Create still image encoder
hIe1 = Ienc1_create(hEngine, imgEncName, iEncParams, iEncDynamicParams);
if (hIe1 == NULL) {
ERR("Failed to create still encoder\n");
cleanup(THREAD_FAILURE);
}
else
{
printf("hIe1 created successfully\n");
}
if(Ienc1_process(hIe1, hImgInBuf, hImgOutBuf) != 0)
{
printf("Ienc1 Failed\n");
}
else
{
printf("Ienc1 Succeeded\n");
}
Any ideas? Thanks.
System:
DVSDK 3.10.00.19
Codec Server 1.00.00.10
DMAI 2.10.00.12
XDAIS 6.25.02.11