Hi all,
according to specs, MP4ENC codec supports both H.263 and MP4 codings.
We're trying to configure TI MPEG4 Encoder to work with H.263 profile but as soon as we change default config we get an error "Invalid Params" (0x80008008) from Codec Engine. Following the piece of code we execute with comments:
...
case CODEC_VIDEO_H263: {
// codec config
IMP4VENC_Params params; //extended VIDENC_Params;
CLEAR(params); // clear the buffer: #define CLEAR(x) memset (&(x), 0, sizeof (x))
params.encodeMode = 0; // we want to encode video with H.263 codec, we suppose this value is ignored
// if default size (BASIC) is passed to VIDENC_Create function
params.videncParams.size = sizeof(VIDENC_Params); // success, algo is created successfully but, according to specs,
// standard values are used to configure MPEG4 Encoder
//params.videncParams.size = sizeof(IMP4VENC_Params); // fail, algo is not created if we set this field to
// the size of the IMP4VENC_Params
params.videncParams.encodingPreset = XDM_HIGH_QUALITY; //XDM_DEFAULT;
params.videncParams.dataEndianness = XDM_BYTE;
params.videncParams.inputContentType = IVIDEO_PROGRESSIVE;
params.videncParams.inputChromaFormat = XDM_YUV_422ILE;
params.videncParams.rateControlPreset = IVIDEO_LOW_DELAY; //bitrate < 0 ? IVIDEO_NONE : IVIDEO_LOW_DELAY;
params.videncParams.maxFrameRate = framerate;
params.videncParams.maxBitRate = bitrate < 0 ? 0 : bitrate;
params.videncParams.maxInterFrameInterval = framerate;
params.videncParams.maxHeight = height;
params.videncParams.maxWidth = width;
// create algo
hEncode = VIDENC_create(hEngine, "mpeg4enc", (VIDENC_Params *)¶ms);
if (hEncode == NULL) {
ERR("Can't open encode algorithm: %s\n", algo);
return FAILURE;
}
...
If we change params.videncParams.size from sizeof(VIDENC_Params) to sizeof(IMP4VENC_Params), that shuld be the extended params as per SPREUA2B document - pg. 4-13, we obtain the above mentioned error.
Any suggestion will be appreciated.
Regards,
--j