Hi,
I am having problems with the DM355 MP4V encoder getting stuck. After initializing and configuring the codec I call process() with the first video frame and this is where it gets stuck. I have tracked this down to IRQ_ASQINT not occurring but the root cause could be any number of things. I'm including relevant runtime and code below. Any suggestions on how to go about debugging this further? Normal protocol would have me stepping into the codec sources but this is obviously not an option.
My system is not based on Linux but I have successfully integrated the DM355 JPEG encoder into my firmware so I believe I am handling all of the nuts & bolts correctly.
All suggestions will be appreciated! Thanks.
Here is the stack:
(gdb) bt
#0 0x80109828 in VICPSYNC_wait (vicpHandle=0x80330740, res=VICPSYNC_MJCP) at ../libcodec/jpeg_vicpsync.c:14
#1 0x8013ca94 in MP4VENC_TI_vicpsync_wait (handle=<value optimized out>) at mp4venc_vicpsync.c:41
#2 0x8011c3a0 in MP4VENC_TI_DM350_FrameEncOnSeq (handle=0x80330740) at mp4venc_P.c:1860
#3 MP4VENC_TI_DM350_FrameEncode (handle=0x80330740) at mp4venc_P.c:2728
#4 0x80117c6c in MP4VENC_TI_encode (handle=0x80190a00, InBufs=0x80330740, OutBufs=0x8017c09c, Inargs=0x8017c1f8,
Outargs=0x80172140) at mp4venc_ti.c:2924
#5 0x80109264 in mp4v_comp_hw (mcd=0x8016bc0c, mgf=0x801075bc <mp4v_get_frame_test>) at ../src/mp4v_comp_hw.c:278
#6 0x801074c4 in cap_video () at ../src/cap_video.c:292
Here are my params and dynamic params:
static IMP4VENC_Params params = {
/* BASE */
.videncParams.size = sizeof(IMP4VENC_Params),
.videncParams.encodingPreset = XDM_USER_DEFINED, /* ??? */
.videncParams.rateControlPreset = IVIDEO_LOW_DELAY, /* CBR rate control*/
.videncParams.maxHeight = 480,
.videncParams.maxWidth = 640,
.videncParams.maxFrameRate = 30 * 1000, /* fps * 1000 */
.videncParams.maxBitRate = 1024000, /* bps */
.videncParams.dataEndianness = XDM_BYTE,
.videncParams.maxInterFrameInterval = XDM_DEFAULT, /* ? */
.videncParams.inputChromaFormat = XDM_YUV_422ILE,
.videncParams.inputContentType = IVIDEO_PROGRESSIVE,
.videncParams.reconChromaFormat = XDM_DEFAULT,
/* MP4V */
.subWindowHeight = 480,
.subWindowWidth = 640,
.rotation = 0,
.vbvSize = 10000, /* ???? Video buffer verifier size (in multiples of 16KB) */
.svhMode = 0, /* ??? 1:Mpeg4 in short video header mode*/
.IFrameBitRateBiasFactor = 256, /* 256 = No Effect (Disable) */
.PFrameBitRateBiasFactor = 256, /* 256 = No Effect (Disable) */
.peakBufWindow = 0, /* ??? Time duration (in sec) during which actual bitrate of encoding stream can reach the max bitrate limit */
.minBitRate = 0, /* ??? Minimum bit rate, bits per second. (optional) */
};
static IMP4VENC_DynamicParams dynamicParams = {
/* BASE */
.videncDynamicParams.size = sizeof(IMP4VENC_DynamicParams),
.videncDynamicParams.inputHeight = 480,
.videncDynamicParams.inputWidth = 640,
.videncDynamicParams.refFrameRate = 0, /* fps * 1000 */
.videncDynamicParams.targetFrameRate = 30 * 1000, /* fps * 1000 */
.videncDynamicParams.targetBitRate = 1024000, /* bps */
.videncDynamicParams.intraFrameInterval = 30, /* ??? */
.videncDynamicParams.generateHeader = 0,
.videncDynamicParams.captureWidth = 0, /* Use inputWidth */
.videncDynamicParams.forceFrame = 0,
.videncDynamicParams.interFrameInterval = 0, /* Use maxInterFrameInterval */
.videncDynamicParams.mbDataFlag = 0,
/* MP4V */
.intraAlgo = 1, /* 1 = Algorithm 1 with IIDC at 8x8 */
.numMBRows = 5, /* ??? */
.initQ = 0, /* 0 = Automatically determined */
.rcQMax = 31,
.rcQMin = 1,
.intraFrameQP = 0,
.interFrameQP = 0,
.rateFix = 0, /* RESERVED */
.rateFixRange = 4, /* RESERVED */
.meAlgo = 2, /* 2 = 84221H ME */
.skipMBAlgo = 1, /* 1 = Bonus skipMB Algo */
.unrestrictedMV = 1, /* 1 = Enable unrestricted motion vector */
.mvDataEnable = 0, /* 0 = Disable motion vector access */
};