完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
各位大神,我使用ti DM8148 在编码时出现了问题,我的数据链路是cap---dup----sws---dis
|---encode 采集的数据经过dup后分两路,一路进行显示dis.另一路经过encode编码,dis可以正常显示,但encode出现了问题,实在找不到问题所在,希望大神们给予指点。 说明:1)输入源为HDMI 1080p60 逐行模式。 以下为部分代码贴图与LOG信息 int main(int argc, char **argv) [ signal(SIGINT, sig_handle); /* System init */ VSYS_PARAMS_S vsysParams; Vsys_params_init(&vsysParams); Vsys_init(&vsysParams); /* Capture init */ VCAP_PARAMS_S vcapParams; Vcap_params_init(&vcapParams); Vcap_init(&vcapParams); /* Encode init */ VENC_PARAMS_S vencParams; Venc_params_init(&vencParams); /* Enable B frame for primary channels - set parameters before venc_init */ int ch; for (ch=0; ch < CH_NUM; ch++) vencParams.encChannelParams[ch].dynamicParam.interFrameInterval =I_TO_P_FRAME_INTERVAL_FOR_PRIMARY_STREAMS; Venc_init(&vencParams); /* Display init */ VDIS_PARAMS_S vdisParams; Vdis_params_init(&vdisParams); vdisParams.deviceParams[VDIS_DEV_HDMI].resolution = VSYS_STD_1080P_60; vdisParams.mosaicLayoutResolution[VDIS_DEV_HDMI] = vdisParams.deviceParams[VDIS_DEV_HDMI].resolution; vdisParams.mosaicParams[VDIS_DEV_HDMI].userSetDefaultSWMLayout = TRUE; Vdis_init(&vdisParams); /* Configure display */ Vsys_configureDisplay(); /* Init the application specific module which will handle bitstream exchange */ bits_saver_create(CH_NUM, "h264"); void chain_cap_enc_dis_create() [....... MultiCh_detectBoard(); System_linkControl( SYSTEM_LINK_ID_M3VPSS, SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES, NULL, 0, TRUE ); System_linkControl( SYSTEM_LINK_ID_M3VIDEO, SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL, &systemVid_encDecIvaChMapTbl, sizeof(SystemVideo_Ivahd2ChMap_Tbl), TRUE ); gVcapModuleContext.captureId = SYSTEM_LINK_ID_CAPTURE; gVcapModuleContext.nsfId[0] = SYSTEM_LINK_ID_NSF_0; gVencModuleContext.encId = SYSTEM_LINK_ID_VENC_0; gVdisModuleContext.swMsId[0] = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0; gVdisModuleContext.displayId[0] = SYSTEM_LINK_ID_DISPLAY_0; gVcapModuleContext.deiId[0] = SYSTEM_LINK_ID_DEI_0; dupId[0] = SYSTEM_VPSS_LINK_ID_DUP_0; dupId[1] = SYSTEM_VPSS_LINK_ID_DUP_1; UInt32 ipcOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0; UInt32 ipcInVideoId = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0; gVencModuleContext.iPCBitsOutRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0; gVencModuleContext.ipcBitsInHLOSId = SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0; gVdecModuleContext.ipcBitsOutHLOSId = SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0; gVdecModuleContext.ipcBitsInRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0; /* capture link init */ CaptureLink_CreateParams_Init(&capturePrm); capturePrm.numVipInst = 1; capturePrm.outQueParams[0].nextLink = dupId[0]; capturePrm.tilerEnable = FALSE; capturePrm.enableSdCrop = FALSE; capturePrm.numBufsPerCh = 8; capturePrm.maxBlindAreasPerCh = 4; /* capture instance init */ CaptureLink_VipInstParams *prm_cap_inst = &capturePrm.vipInst[0]; prm_cap_inst->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA + 0 ) % SYSTEM_CAPTURE_INST_MAX; prm_cap_inst->videoDecoderId = DEVICE_VID_DEC_ADV7610_DRV; prm_cap_inst->inDataFormat = SYSTEM_DF_YUV422P; prm_cap_inst->standard = SYSTEM_STD_1080P_60; prm_cap_inst->numOutput = 1; prm_cap_inst->videoIfMode = DEVICE_CAPT_VIDEO_IF_MODE_16BIT; prm_cap_inst->videoCaptureMode = DEVICE_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC; /* capture out init */ CaptureLink_OutParams *prm_cap_out = &prm_cap_inst->outParams[0]; prm_cap_out->dataFormat = SYSTEM_DF_YUV420SP_UV;//SYSTEM_DF_YUV422I_YUYV; prm_cap_out->scEnable = FALSE; prm_cap_out->scOutWidth = 0; prm_cap_out->scOutHeight = 0; prm_cap_out->outQueId = 0; EncLink_CreateParams_Init(&encPrm); encPrm.numBufPerCh[0] = 4; for (i = 0; i < NUM_CH; i++) [ #if 1 EncLink_ChCreateParams *pLinkChPrm = &encPrm.chCreateParams; VENC_CHN_PARAMS_S *pChPrm = &gVencModuleContext.vencConfig.encChannelParams; pLinkChPrm->format = IVIDEO_H264HP; pLinkChPrm->profile = gVencModuleContext.vencConfig.h264Profile; pLinkChPrm->dataLayout = VCODEC_FIELD_SEPARATED; pLinkChPrm->fieldMergeEncodeEnable = FALSE; pLinkChPrm->enableAnalyticinfo = pChPrm->enableAnalyticinfo; pLinkChPrm->enableWaterMarking = pChPrm->enableWaterMarking; pLinkChPrm->maxBitRate = pChPrm->maxBitRate; pLinkChPrm->encodingPreset = pChPrm->encodingPreset; pLinkChPrm->rateControlPreset = pChPrm->rcType; pLinkChPrm->enableSVCExtensionFlag = pChPrm->enableSVCExtensionFlag; pLinkChPrm->numTemporalLayer = pChPrm->numTemporalLayer; EncLink_ChDynamicParams *pLinkDynPrm = &pLinkChPrm->defaultDynamicParams; VENC_CHN_DYNAMIC_PARAM_S *pDynPrm = &pChPrm->dynamicParam; pLinkDynPrm->intraFrameInterval = pDynPrm->intraFrameInterval; pLinkDynPrm->targetBitRate = pDynPrm->targetBitRate; pLinkDynPrm->interFrameInterval = 1; pLinkDynPrm->mvAccuracy = IVIDENC2_MOTIONVECTOR_QUARTERPEL; printf("pDynPrm->targetBitRate:%d ....n", pDynPrm->targetBitRate); printf("pDynPrm->inputFrameRate:%d ....n", pDynPrm->inputFrameRate); pLinkDynPrm->inputFrameRate = pDynPrm->inputFrameRate; pLinkDynPrm->rcAlg = pDynPrm->rcAlg; pLinkDynPrm->qpMin = pDynPrm->qpMin; pLinkDynPrm->qpMax = pDynPrm->qpMax; pLinkDynPrm->qpInit = pDynPrm->qpInit; pLinkDynPrm->vbrDuration = pDynPrm->vbrDuration; pLinkDynPrm->vbrSensitivity = pDynPrm->vbrSensitivity; ] #endif encPrm.inQueParams.prevLinkId = ipcInVideoId; encPrm.inQueParams.prevLinkQueId = 0; encPrm.outQueParams.nextLink = gVencModuleContext.ipcBitsOutRTOSId; /* IPC Bits Out Video M3 link */ ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.encId; ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0; ipcBitsOutVideoPrm.baseCreateParams.outQueParams[0].nextLink = gVencModuleContext.ipcBitsInHLOSId; MultiCh_ipcBitsInitCreateParams_BitsOutRTOS(&ipcBitsOutVideoPrm, TRUE); /* IPC Bits In Host link */ ipcBitsInHostPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.ipcBitsOutRTOSId; ipcBitsInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0; MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm); 以下为LOG信息 pDynPrm->targetBitRate:2000000 .... pDynPrm->inputFrameRate:30 .... [m3vpss ] 10079: CAPTURE: Create in progress !!! [m3vpss ] 10117: CAPTURE: VIP0 PortA capture mode is [16-bit, Non-mux Embedded Sync] !!! [m3vpss ] UTILS: DMA: Allocated CH (TCC) = 58 (58) [m3vpss ] UTILS: DMA: 0 of 4: Allocated PaRAM = 58 (0x49004740) [m3vpss ] UTILS: DMA: 1 of 4: Allocated PaRAM = 64 (0x49004800) [m3vpss ] UTILS: DMA: 2 of 4: Allocated PaRAM = 65 (0x49004820) [m3vpss ] UTILS: DMA: 3 of 4: Allocated PaRAM = 66 (0x49004840) [m3video] 10289: IPC_IN_M3 : Create in progress !!! [m3video] 10289: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ... [m3vpss ] CAPTURE::HEAPID:0 USED:328 [m3video] 10290: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ... [m3vpss ] CAPTURE::HEAPID:4 USED:29030400 [m3video] 10293: IPC_IN_M3 : Create Done !!! [m3vpss ] 10280: CAPTURE: Create Done !!! [m3video] 10293: ENCODE: Create in progress ... !!! [m3vpss ] 10285: DUP: 0: Format: INTERLACED , 1920 x 1080 [m3vpss ] 10287: DUP : Create Done !!! [m3vpss ] 10287: IPC_OUT_M3 : Create in progress !!! [m3vpss ] 10289: IPC_OUT_M3 : Create Done !!! [m3video] 10324: ENCODE: Creating CH0 of 1920 x 1080, pitch = (1920, 1920) [INTERLACED ] [NON-TILED ], bitrate = 2000 Kbps, I-P Interval 1... [m3video] 10417:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_h264.c:[576]::INTERNAL ERROR:-1 [m3video] ALGCONTROL FAILED:CMD:1 [m3video] ERROR: IH264ENC_LEVEL_INCOMPLAINT_PARAMETER , 0, [m3video] 10417:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_h264.c:[587]::INTERNAL ERROR:0 [m3video] Ext Error :0 [m3video] EXT_ERROR: IH264ENC_EXTERROR_FRMRATE_NUMUNITSINTICKS = 37 [m3video] EXT_ERROR: IH264ENC_EXTERROR_LEVELLIMIT_RESOLUTION = 71 |
|
相关推荐
11 个讨论
|
|
ternence hsu 你好! 很感谢你的支持,之前那个问题已经解决,但是现在面临新的问题,我的输入源是1080P 逐行扫描60帧,但是经过dup给encode编码结束后成30帧了,明显比 采集输入视频源慢,我通过Venc_setDynamicParam(0, 0, ¶ms, VENC_FRAMERATE);将帧率设置为60帧后,编码出来的帧率达到了要求确实为60帧,但是 编码出来的视屏图像比采集的源视频有快了。请问这是什么原因造成的? |
|
|
|
|
|
ssqq1980 发表于 2018-7-25 06:56 你好; 你现在是编码为30帧,画面播放正常,如果编码为60帧,画面就快一倍,是这样吗? 你的输入要源是60帧,应当是在某个模块丢帧了? 你检查一下你配置的模块的in , out 的帧率是不是都是配置一致,都是60帧处理的? |
|
|
|
|
|
ssqq1980 发表于 2018-7-25 07:26 你好; 你可以把dup 的第二路先关闭,只测试采集和编码,确定帧率是不是正常的; 同时在 ti_vsys.c 里面有两个函数可以查看link 的工作状态,你看一下。 Int32 Vsys_printDetailedStatistics() 和 Int32 Vsys_printBufferStatistics(); |
|
|
|
|
|
Greatwayer 发表于 2018-7-25 07:41 你好:ternence hsu 我把dup第二路关闭后编码出来的仍然是30帧, 以下LOG是加了Vsys_printDetailedStatistics() 和 Int32 Vsys_printBufferStatistics();打出的信息 这个说明我从VPSS M3采集输出的是51帧是吗? [m3vpss ] [m3vpss ] *** Capture List Manager Advanced Statistics *** [m3vpss ] [m3vpss ] List Post Count : 1 [m3vpss ] List Stall Count : 0 [m3vpss ] List Post Time (ms) : Max = 0, Min = 0, Avg = 0, Total = 0 [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 994, 1000) [m3vpss ] Descriptor miss found count : 0 [m3vpss ] [m3vpss ] [m3vpss ] VIP and VPDMA registers, [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00000000 [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000 [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00000000 [m3vpss ] [m3vpss ] [m3vpss ] 6317: CAPTURE: Fields = 0 (fps = 0, CPU Load = 0) [m3vpss ] 6317: CAPTURE: Num Resets = 0 (Avg 0 ms per reset) [m3vpss ] 6318: SYSTEM : FREE SPACE : System Heap = 244336 B, Mbx = 10239 msgs) [m3vpss ] 6318: SYSTEM : FREE SPACE : SR0 Heap = 2129920 B (2 MB) [m3vpss ] 6318: SYSTEM : FREE SPACE : Frame Buffer = 76923776 B (73 MB) [m3vpss ] 6318: SYSTEM : FREE SPACE : Bitstream Buffer = 78690176 B (75 MB) [m3vpss ] TILER_STATS: CNT :8BIT [m3vpss ] TILER_STATS: CNT RESOLUTION: 16384 x 5440 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 5436 [m3vpss ] TILER_STATS: NUM FREE BUCKETS: 1 [m3vpss ] TILER_STATS: NUM USED BUCKETS: 0 [m3vpss ] TILER_STATS: TOTAL FREE AREA: 89063424 (99 %) [m3vpss ] TILER_STATS: TOTAL USED AREA: 0 (0 %) [m3vpss ] TILER_STATS: CNT :16BIT [m3vpss ] TILER_STATS: CNT RESOLUTION: 32768 x 1344 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 1344 [m3vpss ] TILER_STATS: NUM FREE BUCKETS: 1 [m3vpss ] TILER_STATS: NUM USED BUCKETS: 0 [m3vpss ] TILER_STATS: TOTAL FREE AREA: 44040192 (100 %) [m3vpss ] TILER_STATS: TOTAL USED AREA: 0 (0 %) [m3vpss ] 6320: SYSTEM : FREE SPACE : Tiler 8-bit = 89063424 B (84 MB) - TILER ON [m3vpss ] 6320: SYSTEM : FREE SPACE : Tiler 16-bit = 44040192 B (42 MB) - TILER ON [m3video] 12321: HDVICP-ID:0 [m3video] All percentage figures are based off totalElapsedTime [m3video] totalAcquire2wait :1 % [m3video] totalWait2Isr :95 % [m3video] totalIsr2Done :0 % [m3video] totalWait2Done :95 % [m3video] totalDone2Release :0 % [m3video] totalAcquire2Release :97 % [m3video] totalAcq2acqDelay :2 % [m3video] totalElapsedTime in msec : 5947 [m3video] numAccessCnt: 259 [m3video] IVA-FPS : 51 [m3video] Average time spent per frame in microsec: 21812 [m3video] 12323: HDVICP-ID:1 [m3video] All percentage figures are based off totalElapsedTime [m3video] totalAcquire2wait :0 % [m3video] totalWait2Isr :0 % [m3video] totalIsr2Done :0 % [m3video] totalWait2Done :0 % [m3video] totalDone2Release :0 % [m3video] totalAcquire2Release :0 % [m3video] totalAcq2acqDelay :0 % [m3video] totalElapsedTime in msec : 0 [m3video] numAccessCnt: 0 [m3video] IVA-FPS : 0 [m3video] Average time spent per frame in microsec: 0 [m3video] 12323: HDVICP-ID:2 [m3video] All percentage figures are based off totalElapsedTime [m3video] totalAcquire2wait :0 % [m3video] totalWait2Isr :0 % [m3video] totalIsr2Done :0 % [m3video] totalWait2Done :0 % [m3video] totalDone2Release :0 % [m3video] totalAcquire2Release :0 % [m3video] totalAcq2acqDelay :0 % [m3video] totalElapsedTime in msec : 0 [m3video] numAccessCnt: 0 [m3video] IVA-FPS : 0 [m3video] Average time spent per frame in microsec: 0 [m3video] [m3video] *** ENCODE Statistics *** [m3video] [m3video] Elasped Time : 5 secs [m3video] [m3video] [m3video] CH | In Recv In Skip In User Out Latency [m3video] Num | FPS FPS Skip FPS FPS Min / Max [m3video] -------------------------------------------- [m3video] 0 | 70 19 0 51 255 / 4503 [m3video] [m3video] Multi Channel Encode Average Submit Batch Size [m3video] Max Submit Batch Size : 24 [m3video] IVAHD_0 Average Batch Size : 1 [m3video] IVAHD_0 Max achieved Batch Size : 1 [m3video] [m3video] Multi Channel Encode Batch break Stats [m3video] Total Number of Batches created: 257 [m3video] All numbers are based off total number of Batches created [m3video] Batch breaks due to batch sizeexceeding limit: 100 % [m3video] Batch breaks due to ReqObj Que being empty: 0 % [m3video] Batch breaks due to changed resolution class: 0 % [m3video] Batch breaks due to interlace and progressivecontent mix: 0 % [m3video] Batch breaks due to channel repeat: 0 % [m3video] Batch breaks due to different codec: 0 % [m3vpss ] [m3vpss ] 15327: LOAD: CPU: 4.9% HWI: 0.7%, SWI:1.2% [m3vpss ] [m3vpss ] 15327: LOAD: TSK: IPC_OUT_M30 : 0.6% [m3vpss ] 15327: LOAD: TSK: CAPTURE : 0.7% [m3vpss ] 15327: LOAD: TSK: MISC : 1.7% [m3vpss ] [m3video] [m3video] 15828: LOAD: CPU: 7.2% HWI: 0.8%, SWI:0.8% [m3video] [m3video] 15828: LOAD: TSK: IPC_IN_M30 : 0.7% [m3video] 15829: LOAD: TSK: IPC_BITS_OUT0 : 0.8% [m3video] 15829: LOAD: TSK: ENC0 : 2.1% [m3video] 15829: LOAD: TSK: ENC_PROCESS_TSK_0 : 1.5% [m3video] 15829: LOAD: TSK: MISC : 0.5% [m3video] [c6xdsp ] [c6xdsp ] 15950: LOAD: CPU: 0.2% HWI: 0.0%, SWI:0.0% [c6xdsp ] [c6xdsp ] 15950: LOAD: TSK: MISC : 0.2% [c6xdsp ] [HOST] ThreadName:IpcBitsOutLink_tskMain_30000018,ThreadID:300 [m3vpss ] [m3vpss ] *** CAPTURE Statistics *** [m3vpss ] 16831: CAPTURE: Queued to driver = 632, Dequeued from driver = 628 [m3vpss ] CAPTURE [0] Buf Q Status [m3vpss ] Empty Q -> count 0, wrPtr 0, rdPtr 0 [m3vpss ] Full Q -> count 0, wrPtr 244, rdPtr 244 [m3video] [m3video] *** Encode Statistics *** [m3video] 17332: ENC: Rcvd from prev = 658, Returned to prev = 655 [m3video] ENC Out BitBuf Q Status [m3video] Empty Q 0 -> count 1, wrPtr 97, rdPtr 96 [m3video] Full Q -> count 0, wrPtr 93, rdPtr 93 这个说明我从VPSS M3采集输出的是51帧是吗? |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
334 浏览 1 评论
528 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
773 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
649 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1126 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
55浏览 29评论
111浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
250浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
197浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
54浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 10:33 , Processed in 1.058085 second(s), Total 62, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号