Dear all:
I increase decoder in DM368 ipnc and it can decoder D1 resolution.
Now I want to modify the resolution from D1 to 720p
But the video is no good, I print the decStatus.bytesUsed
In D1 resolution, it will the same as decPrm.inDataSize
In 720p resolution, it will some different with decPrm.inDataSize, maybe get more or only have 7( decStatus.outputBufId= -1).
Can any give me some advise ?
As follow is my setting:
1. Create
createdecPrm.codec = ALG_VID_CODEC_H264;
createdecPrm.dataFormat = DRV_DATA_FORMAT_YUV420;
createdecPrm.maxWidth = 1920;
createdecPrm.maxHeight = 1080;
for(i=0; i<gAVSERVER_config.numEncodeStream; i++)
{
gVIDEO_ctrl.decodeStream[i].algDecHndl = ALG_vidDecCreate(&createdecPrm);
}
2. Decoder run:
whOffset = 96;
decodeId=0;
decPrm.inAddr = curInAddr;
decPrm.outAddr = outVirtAddr[bufId];
decPrm.inDataSize=some_data.current_faddr_size; //in data size
decPrm.outOffsetH = OSA_align(1280+whOffset, 32); //if use 720, it can decode D1 well
decPrm.outOffsetV = 720+whOffset; //if use 480, it can decode D1 well
decPrm.inputBufId = bufId; //I create 4 buff for decoder temp.
OSA_prfBegin(&gAVSERVER_ctrl.decodePrf[decodeId]);
status = ALG_vidDecRun(gVIDEO_ctrl.decodeStream[decodeId].algDecHndl, &decPrm, &decStatus);
OSA_prfEnd(&gAVSERVER_ctrl.decodePrf[decodeId], 1);
if(status==OSA_SOK) {
totalDecSize += decStatus.bytesUsed;
} else {
OSA_printf(" ALG: VidDec: ALG_vidDecRun() ERROR !!!\n");
}
bufId += 1;
if(bufId>3)
bufId=0;