I'm trying to create a jpeg encoder using dvsdk_2_10_00_17 and dm365_codecs_01_00_06 within DMAI. I can't make it work if I try to use extended parameters, the call to Ienc1_create crashes. This is the structure I am using:
IJPEGENC_DynamicParams IJPEGENC_DynamicParamsExt;IJPEGENC_DynamicParamsExt.imgencDynamicParams = Ienc1_DynamicParams_DEFAULT;// IJPEGENC_DynamicParamsExt.imgencDynamicParams.size = sizeof(IJPEGENC_DynamicParams); <--------------- IF COMMENTED, IT WORKSIJPEGENC_DynamicParamsExt.imgencDynamicParams.numAU = XDM_DEFAULT;IJPEGENC_DynamicParamsExt.imgencDynamicParams.inputChromaFormat = XDM_YUV_420P;IJPEGENC_DynamicParamsExt.imgencDynamicParams.inputWidth = width;IJPEGENC_DynamicParamsExt.imgencDynamicParams.inputHeight = height;IJPEGENC_DynamicParamsExt.imgencDynamicParams.captureWidth = 0;IJPEGENC_DynamicParamsExt.imgencDynamicParams.generateHeader = XDM_ENCODE_AU;IJPEGENC_DynamicParamsExt.imgencDynamicParams.qValue = 50;IJPEGENC_DynamicParamsExt.rstInterval = 84;IJPEGENC_DynamicParamsExt.disableEOI = XDM_DEFAULT;IJPEGENC_DynamicParamsExt.rotation = 0;IJPEGENC_DynamicParamsExt.customQ = NULL;
Basically if I comment the line setting the size to the extended version, Ienc1_create works without problems (using only "basic" parameters). If I uncomment the line, the size is set for extended version of the structure and all the last 4 parameters are considered. In this case, the call to Ienc1_create crashes.
If I execute the app with "DMAI_DEBUG=2", this is the output of the Ienc1_create call.
@0x005b033a:[T:0x438a2490] ti.sdo.dmai - [Ienc1] XDM_GETBUFINFO failed, status=-1
Can you please try with
IJPEGENC_DynamicParamsExt.imgencDynamicParams.captureWidth = width; //0
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.