Hello there:
I'm using H.264 Baseline Profile Encoder (v1.14) on DM648 and I'm trying to change the size of the video frame on the fly. When I go from a larger format to a shorter format no error is generated, however when I go from a shorter to a larger one, an error is generated.
I'm using the following piece of code to change the width and height of the frame:
// Load parameters.
params.size = sizeof(VIDENC_DynamicParams);
params.inputHeight = height / factor;
params.inputWidth = width / factor;
params.refFrameRate = pCfg->frameRate;
params.targetFrameRate = pCfg->frameRate;
params.targetBitRate = pCfg->bitRate;
params.intraFrameInterval = pCfg->iFrmInterval;
params.generateHeader = XDM_ENCODE_AU;
params.captureWidth = 0;
params.forceIFrame = 0;
// Set Dynamic Params for Encoder.
status = VIDENC_control(vEncChInfo[chan], XDM_SETPARAMS, ¶ms, &encStatus);
Should I use VIDENC_delete(enc); before attempting to change the frame size?
Which parameters of the VIDENC_DynamicParams structure can be modified using VIDENC_control(vEncChInfo[chan], XDM_SETPARAMS, ¶ms, &encStatus);?
Any thoughs would be appreciated.
Gabriel