as i am having some code with the JPEG encoder (not the decoder) based on "imgenc1.h" at my hands i selected to test a little bit with it.
look at this snippet:
Juan Gonzales said:status = IMGDEC_control( hDec, XDM_RESET, &idecDynParams, &idecStatus );
f( status != IMGDEC_EOK ){
printf( "IMGDEC_control(XDM_RESET): error1\n" );
break;
}
sprufe5c says this:
XDM_GETBUFINFO: get required number of I/O buffers and their sizes. Results are
returned in the bufInfo member of the structure IIMGENC1_Status whose pointer is
passed as 4th argument.The third argument is a pointer to a dynamic params structure of type
IIMGENC1_DynamicParams or IJPEGENC_DynamicParams (typecast to the previous
one). This argument is used whenever command ID is XDM_SETPARAMS.
so i thought for the other commands the third parameter is dont care and thus can even be set to NULL.
bad guess - the call for XDM_GETBUFINFO resulted in a segmentation fault from inside CE, in a function called JPEGENC_TI_control as reported by gdb.
so the codec does not require it at all but the embedding codec engine is touching it for some reasons.
the return value naming might as well be calling level dependent:
* IALG_OK/IALG_FAIL/other for the codec API
* IMGENC_* or IMGENC1_* for the VISA API subset.