hi:
The first TestApp_WriteOutputData below was got from project-
C66x_mpeg2vdec_02_02_01_08_ELF.
XDAS_Void TestApp_WriteOutputData(FILE *fOutFile,
XDM_BufDesc * outputBufDesc,
IVIDDEC2_OutArgs *outArgs)
{
XDAS_UInt8 *s;
XDAS_Int32 i;
for(i = 0; i < outArgs->displayBufs[0].numBufs; i++)
{
s = (XDAS_UInt8 *)outArgs->displayBufs[0].bufDesc[i].buf;
fwrite (s, sizeof (Byte), outArgs->displayBufs[0].bufDesc[i].bufSize, fOutFile);
}
fflush (fOutFile);
return;
}
The second TestApp_WriteOutputData below was got from project-
100.V.H264HP.E.C6678.01.00.01.03_v1:
TestApp_WriteOutputData(outputBufDesc.descs[0].buf,
(loutArgs.videnc2OutArgs.bytesGenerated),foutFile);
fflush(stdout);
XDAS_Int16 TestApp_WriteOutputData(XDAS_Int8 *src,
XDAS_Int32 uiBytesToWrite,
FILE *fout)
{
/*************************************************************************/
/* Write the bitstream */
/*************************************************************************/
if(uiBytesToWrite != 0 )
{
fwrite(src,1,uiBytesToWrite,fout);
}
fflush(fout);
return 0;
}
My question:
1.
What was the difference between the two TestApp_WriteOutputData in mpeg2 decoder and H264 encoder?
2.
In the first TestApp_WriteOutputData,Why the output bitstream comes from
outArgs->displayBufs[0].bufDesc[i].buf?
But Why the output bitstream comes from outputBufDesc.descs[0].buf in the second
TestApp_WriteOutputData?
3.
When I called TI codec such as encoder or decoder,Which I could get right output stream from?
The first TestApp_WriteOutputData or the second?????