Hi,
I notice the low lantancy encode of H.264 in DM8127. But some problems confused me for a long time.I follow the step in Datasheet of G section. The codecs version is 2.0.The demo is "500.V.H264AVC.E.IVAHD.02.00\IVAHD_001\Client\test\src"
Problem 1. Slice input
1) I want to encode a 720*576 video by slice as 720*16.So I set the params->videnc2Params.inputDataMode = IVIDEO_NUMROWS, params->videnc2Params.numInputDataUnits = 1,dynamic_params->videnc2DynamicParams.getDataFxn.
In getDataFxn I set params as below.
/*--------------------------------------------------------------------------*/
/* It is assumed that base address for each block is continues and codec */
/* will not work if it is changed due to some other restrictions */
/*--------------------------------------------------------------------------*/
dataSyncDesc->baseAddr = NULL;
dataSyncDesc->numBlocks = 1;//gConfigOrg.numBlocks[block_count];
dataSyncDesc->varBlockSizesFlag = 1;
dataSyncDesc->blockSizes = (XDAS_Int32*)Input_BlockSizeArray;
When I send one frame to encode, the getDataFxn be called 36 times. I think it is right. But Why the baseAddr is NULL, and if I capture the frame by slice (720*16), how can I send the baseAddr.Whether it is Y addr or UV addr? In the datasheet it is not mention that the addr of each slice is continues,but it is mention in demo. Because the alignment of addr ,may be the each slice addr is not continues,so how can I deal with it? How can i send the frame into codecs?
MODE 1
/***********************/
Y0
/**********************/
/***********************/
UV0
/**********************/
/***********************/
Y1
/**********************/
/***********************/
UV1
/**********************/
MODE 2
/***********************/
Y0
/**********************/
/***********************/
Y1
/**********************/
/***********************/
UV0
/**********************/
/***********************/
UV1
/**********************/
Problem 2. Slice Output
I want the codecs output frame(720*576) by slice, as 6* 720*16. So I set the params as below.
params->videnc2Params.outputDataMode = IVIDEO_SLICEMODE
params->videnc2Params.numOutputDataUnits = 6
dynamic_params->videnc2DynamicParams.putDataFxn = H264ETest_DataSyncPutDataFxn;
In the datasheet ,when 6 NALU come out the the putDataFxn should be called once.But It is not work, Everytimes the putDataFxn be called, a whole frame is come out but not 6 NALU. It is someelse important things shouled be noticed ?
By the way, if you can give me a whole params for slice input and slice output, i will be appreciate. Thanks you very much.