Hi,
i am trying to use simple two pass encoding feature in recent h264 codec version.
i followed the example source code "H264encoderapp_stp.c"
i have created two codec instances1 for low resolution ( i am using for Face detection purpose in chain mode ) encode
and another instance for high resolution encode.
i made metaDataGenerateConsume =1 for low resolution and 2 for high resolution.
after encoding of low resolution (process call ) i made metaDataGenerateConsume =3.
then i am trying to copy the meta data from LR output buffer to High resolution input buffer as it is done in the example code.
but when i see the number of buffers for both the LR and HR encoder after XDM_GETBUFINFO
i have only 1 output buffers for each. so where the meta data information is ?
------------------
LR-videncStatus.bufInfo.minNumInBufs = 2
LR-videncStatus.bufInfo.minNumOutBufs = 1
HR-videncStatus.bufInfo.minNumInBufs = 3
HR-videncStatus.bufInfo.minNumOutBufs = 1
----------------
i think some where i am doing wrong. bcoz in the example source code meta data copy is happening in the following way in to outobj.bufs[1] or 2,3.
where as i have only 1 buffer.
if(dynamicparams[0].metaDataGenerateConsume == 3 )
{
if(dynamicparams[1].metaDataGenerateConsume == 2)
{
XDAS_Int32 *frameinfoPtr;
XDAS_UInt32 loopcnt;
frameinfoPtr = (XDAS_Int32 *)(outobj[0].bufs[1]);
if (dynamicparams[0].sliceSize > 0 && !(params[0].entropyMode || !(params[0].encQuality)))
{
if(dynamicparams[0].mvSADoutFlag == 0)
frameinfoPtr = (XDAS_Int32 *)(outobj[0].bufs[2]);
else
frameinfoPtr = (XDAS_Int32 *)(outobj[0].bufs[3]);
}
else
{
if(dynamicparams[0].mvSADoutFlag == 1)
frameinfoPtr = (XDAS_Int32 *)(outobj[0].bufs[2]);
}
memcpy(inobj[1].bufDesc[2].buf,frameinfoPtr,sizeof(FrameInfo_Interface));
has any one used this feature ? i need some suggestion on how to do this.