TI中文支持网
TI专业的中文技术问题搜集分享网站

TDA2EG-17: (Vision_sdk 0307) 两个镜头 录影编码 h264 / fps 问题

Part Number:TDA2EG-17

各位专家,
这是我的链:IssCaptrue -> Dup -> Vpe -> Encode -> Null(顺便说一下,dup另一条link是display的链接,
不过目前的问题是encode,主要以encode这边的问题来提问)
情况是我录制了30秒(两个镜头)并且其中一个镜头录制30秒是正常的(ChId[0])
- - - - - - - - - - - - - - - - - - - - - - -问题 - - - - - - - - - - - - - - - - - - - - -
但另一个镜头只记录了 22 秒 (ChId[1])

影片的内容是录制实际的时钟的秒针从0到30, 但是从这个22秒的影片中来看,确实记录到秒针从0到30
但是CHid[1]的镜头录的影的秒针像是在加速一样
这是我的encdoe H264参数设置

              case CameraViewMgr_RecordFormat_H264:                   /* H264 */
              pLinkChPrm->format = SYSTEM_IVIDEO_H264BP;        //SYSTEM_IVIDEO_H264HP;
              pLinkChPrm->profile = 100;
              pLinkChPrm->dataLayout = VENC_FIELD_SEPARATED;
              pLinkChPrm->fieldMergeEncodeEnable = FALSE;
              pLinkChPrm->enableAnalyticinfo = 0;
              pLinkChPrm->enableWaterMarking = 0;
              pLinkChPrm->maxBitRate = -1;
              pLinkChPrm->encodingPreset = SYSTEM_XDM_MED_SPEED_HIGH_QUALITY;

              /* Set encodingPreset to SYSTEM_XDM_USER_DEFINED if SEI/meta data needs to be enabled */
              /* pLinkChPrm->encodingPreset = SYSTEM_XDM_USER_DEFINED; */

             pLinkChPrm->rateControlPreset = SYSTEM_IVIDEO_LOW_DELAY;
             pLinkChPrm->enableHighSpeed = FALSE;
             pLinkChPrm->enableSVCExtensionFlag = FALSE;
             pLinkChPrm->numTemporalLayer = 0;
             pLinkChPrm->overrideInputScanFormat= 0;
             pLinkChPrm->fieldPicEncode = 0;:
             pLinkChPrm->IDRFrameInterval = 1;

             pLinkDynPrm->intraFrameInterval = 30;
             pLinkDynPrm->targetBitRate = 10*1000*1000;
             pLinkDynPrm->interFrameInterval = 1;
             pLinkDynPrm->mvAccuracy = SYSTEM_IVIDENC2_MOTIONVECTOR_QUARTERPEL;
             pLinkDynPrm->inputFrameRate = 30;
             pLinkDynPrm->rcAlg = 1; //1 means cbr
             pLinkDynPrm->qpMin = 0;
             pLinkDynPrm->qpMax = 51;
             pLinkDynPrm->qpInit = 25;
             pLinkDynPrm->vbrDuration = 8;
             pLinkDynPrm->vbrSensitivity = 0;

             /* Set maxPicSizeRatioI to 1 for IDR or I-Frame only mode */
             pLinkDynPrm->maxPicSizeRatioI = 640;

另外这是从NullLink_drvProcessFrames (输出h264的处理) 的Log印出的讯息

————————————————Log    nullLink_tsk.c Func: NullLink_drvProcessFrames ———————————————————-

Id:[1] pkt->pts:0 pkt->dts:0 pkt->duration : 512
Id:[0] pkt->pts:0 pkt->dts:0 pkt->duration : 512
Id:[1] pkt->pts:512 pkt->dts:512 pkt->duration : 512
Id:[0] pkt->pts:512 pkt->dts:512 pkt->duration : 512
Id:[1] pkt->pts:1024 pkt->dts:1024 pkt->duration : 512
Id:[0] pkt->pts:1024 pkt->dts:1024 pkt->duration : 512
Id:[0] pkt->pts:1536 pkt->dts:1536 pkt->duration : 512
Id:[0] pkt->pts:2048 pkt->dts:2048 pkt->duration : 512
Id:[0] pkt->pts:2560 pkt->dts:2560 pkt->duration : 512
Id:[1] pkt->pts:1536 pkt->dts:1536 pkt->duration : 512
Id:[0] pkt->pts:3072 pkt->dts:3072 pkt->duration : 512
Id:[1] pkt->pts:2048 pkt->dts:2048 pkt->duration : 512
Id:[0] pkt->pts:3584 pkt->dts:3584 pkt->duration : 512
Id:[1] pkt->pts:2560 pkt->dts:2560 pkt->duration : 512
Id:[0] pkt->pts:4096 pkt->dts:4096 pkt->duration : 512
Id:[1] pkt->pts:3072 pkt->dts:3072 pkt->duration : 512
Id:[0] pkt->pts:4608 pkt->dts:4608 pkt->duration : 512
Id:[0] pkt->pts:5120 pkt->dts:5120 pkt->duration : 512
Id:[0] pkt->pts:5632 pkt->dts:5632 pkt->duration : 512
Id:[1] pkt->pts:3584 pkt->dts:3584 pkt->duration : 512
Id:[0] pkt->pts:6144 pkt->dts:6144 pkt->duration : 512
Id:[0] pkt->pts:6656 pkt->dts:6656 pkt->duration : 512
Id:[1] pkt->pts:4096 pkt->dts:4096 pkt->duration : 512
Id:[0] pkt->pts:7168 pkt->dts:7168 pkt->duration : 512
Id:[0] pkt->pts:7680 pkt->dts:7680 pkt->duration : 512
Id:[0] pkt->pts:8192 pkt->dts:8192 pkt->duration : 512

可以看出Channel[0]的镜头比Channel[1]镜头处理的多

  ————————————————————————————————————————————————


原本的预期是两个镜头录到的影片都是30fps
但是看起来只有CHID[0]的镜头有30fps

另外CHID[1]的镜头经过计算大概只有16.2fps
所以当以30 fps来解码播放影片时,才造成CHID[1]录制的影片有加速的感觉
所以问题就来了,因为镜头输入应该都是设定一样的参数,为什么两个镜头录到的影片fps会有差异呢?
要如何改善这个问题,让两个镜头都能encode 30fps的h264的影片档
再麻烦各位专家解惑以及帮忙了
非常谢谢 !!!
Cherry Zhou:

您好我们已收到您的问题并升级到英文论坛寻求帮助,链接如下,如有答复将尽快回复您:

e2e.ti.com/…/tda2eg-17-vision_sdk-0307-two-lens-video-encode-h264-fps-issue

,

Cherry Zhou:

您好,

能否分享下完整的性能日志以查看哪个link正在减速? 

,

David ks:

Dear Cherry,

非常感谢你的帮忙!! ,我需要一点时间确认一下

,

David ks:

Dear Cherry,

以下是我的link log---------------------------------------------------------------------------------------------------------------------------------------------------

[HOST] [IPU2 ] 42.388092 s: [HOST] [IPU2 ] 42.388214 s: [ ISSCAPTURE ] Link Statistics, [HOST] [IPU2 ] 42.388275 s: ****************************** [HOST] [IPU2 ] 42.388366 s: [HOST] [IPU2 ] 42.388397 s: Elapsed time = 16183 msec [HOST] [IPU2 ] 42.388488 s: [HOST] [IPU2 ] 42.388549 s: Get Full Buf Cb = 48.19 fps [HOST] [IPU2 ] 42.388641 s: Put Empty Buf Cb = 90.52 fps [HOST] [IPU2 ] 42.388732 s: Driver/Notify Cb = 59.44 fps [HOST] [IPU2 ] 42.388824 s: [HOST] [IPU2 ] 42.388854 s: Input Statistics, [HOST] [IPU2 ] 42.388977 s: [HOST] [IPU2 ] 42.389038 s: CH | In Recv | In Drop | In User Drop | In Process [HOST] [IPU2 ] 42.389129 s: | FPS | FPS | FPS | FPS [HOST] [IPU2 ] 42.389221 s: ————————————————– [HOST] [IPU2 ] 42.389343 s: 0 | 29.84 0. 0 0. 0 29.84 [HOST] [IPU2 ] 42.389495 s: 1 | 18.10 0. 0 0. 0 18.10 [HOST] [IPU2 ] 42.389648 s: [HOST] [IPU2 ] 42.389709 s: Output Statistics, [HOST] [IPU2 ] 42.389770 s: [HOST] [IPU2 ] 42.389800 s: CH | Out | Out | Out Drop | Out User Drop [HOST] [IPU2 ] 42.389922 s: | ID | FPS | FPS | FPS [HOST] [IPU2 ] 42.390014 s: ——————————————— [HOST] [IPU2 ] 42.390136 s: 0 | 0 29.90 0. 0 0. 0 [HOST] [IPU2 ] 42.390258 s: 1 | 0 18.29 0. 0 0. 0 [HOST] [IPU2 ] 42.395199 s: [HOST] [IPU2 ] 42.395290 s: [ VPE ] Link Statistics, [HOST] [IPU2 ] 42.395382 s: ****************************** [HOST] [IPU2 ] 42.395443 s: [HOST] [IPU2 ] 42.395504 s: Elapsed time = 16190 msec [HOST] [IPU2 ] 42.395595 s: [HOST] [IPU2 ] 42.395626 s: New data Recv = 48.17 fps [HOST] [IPU2 ] 42.396327 s: Get Full Buf Cb = 48.11 fps [HOST] [IPU2 ] 42.396968 s: Put Empty Buf Cb = 48.11 fps [HOST] [IPU2 ] 42.397090 s: Driver/Notify Cb = 48.17 fps [HOST] [IPU2 ] 42.397181 s: [HOST] [IPU2 ] 42.397212 s: Input Statistics, [HOST] [IPU2 ] 42.397273 s: [HOST] [IPU2 ] 42.397334 s: CH | In Recv | In Drop | In User Drop | In Process [HOST] [IPU2 ] 42.397425 s: | FPS | FPS | FPS | FPS [HOST] [IPU2 ] 42.397517 s: ————————————————– [HOST] [IPU2 ] 42.397639 s: 0 | 29.89 0. 0 0. 0 29.89 [HOST] [IPU2 ] 42.397791 s: 1 | 18.28 0. 0 0. 0 18.28 [HOST] [IPU2 ] 42.397974 s: [HOST] [IPU2 ] 42.398005 s: Output Statistics, [HOST] [IPU2 ] 42.398066 s: [HOST] [IPU2 ] 42.398127 s: CH | Out | Out | Out Drop | Out User Drop [HOST] [IPU2 ] 42.398218 s: | ID | FPS | FPS | FPS [HOST] [IPU2 ] 42.398310 s: ——————————————— [HOST] [IPU2 ] 42.398401 s: 0 | 0 29.89 0. 0 0. 0 [HOST] [IPU2 ] 42.398554 s: 1 | 0 18.28 0. 0 0. 0 [HOST] [IPU2 ] 42.398706 s: [HOST] [IPU2 ] 42.398767 s: [ VPE ] LATENCY, [HOST] [IPU2 ] 42.398828 s: ******************** [HOST] [IPU2 ] 42.398920 s: Local Link Latency : Avg = 3917 us, Min = 3721 us, Max = 7168 us, [HOST] [IPU2 ] 42.399072 s: Source to Link Latency : Avg = 4500 us, Min = 4056 us, Max = 8448 us, [HOST] [IPU2 ] 42.399225 s: [HOST] [IPU2 ] 42.400384 s: [HOST] [IPU2 ] 42.400506 s: [ ENCODE ] Link Statistics, [HOST] [IPU2 ] 42.400567 s: ****************************** [HOST] [IPU2 ] 42.400658 s: [HOST] [IPU2 ] 42.400719 s: Elapsed time = 16191 msec [HOST] [IPU2 ] 42.400811 s: [HOST] [IPU2 ] 42.400841 s: New data Recv = 48.17 fps [HOST] [IPU2 ] 42.401024 s: Release data Recv = 10.19 fps [HOST] [IPU2 ] 42.401116 s: Get Full Buf Cb = 58.36 fps [HOST] [IPU2 ] 42.401207 s: Put Empty Buf Cb = 48.11 fps [HOST] [IPU2 ] 42.401299 s: [HOST] [IPU2 ] 42.401360 s: Input Statistics, [HOST] [IPU2 ] 42.401421 s: [HOST] [IPU2 ] 42.401482 s: CH | In Recv | In Drop | In User Drop | In Process [HOST] [IPU2 ] 42.401573 s: | FPS | FPS | FPS | FPS [HOST] [IPU2 ] 42.401695 s: ————————————————– [HOST] [IPU2 ] 42.401817 s: 0 | 6.85 23. 3 0. 0 6.67 [HOST] [IPU2 ] 42.402000 s: 1 | 3.70 14.57 0. 0 3.58 [HOST] [IPU2 ] 42.402153 s: [HOST] [IPU2 ] 42.402214 s: Output Statistics, [HOST] [IPU2 ] 42.402275 s: [HOST] [IPU2 ] 42.402305 s: CH | Out | Out | Out Drop | Out User Drop [HOST] [IPU2 ] 42.402427 s: | ID | FPS | FPS | FPS [HOST] [IPU2 ] 42.402519 s: ——————————————— [HOST] [IPU2 ] 42.402610 s: 0 | 0 6.67 0. 0 0. 0 [HOST] [IPU2 ] 42.402763 s: 1 | 0 3.58 0. 0 0. 0 [HOST] [IPU2 ] 42.402946 s: ENCODE: Num process reqest count for chId: 0 = 108 [HOST] [IPU2 ] 42.403068 s: ENCODE: Num process complete count for chId: 0 = 107 [HOST] [IPU2 ] 42.403190 s: ENCODE: Num process reqest count for chId: 1 = 58 [HOST] [IPU2 ] 42.403312 s: ENCODE: Num process complete count for chId: 1 = 58 [HOST] [IPU2 ] 42.403434 s: [HOST] [IPU2 ] 42.403464 s: [ ENCODE ] LATENCY, [HOST] [IPU2 ] 42.403556 s: ******************** [HOST] [IPU2 ] 42.403617 s: Local Link Latency : Avg = 9666 us, Min = 8662 us, Max = 11651 us, [HOST] [IPU2 ] 42.403769 s: Source to Link Latency : Avg = 14489 us, Min = 13299 us, Max = 16623 us, [HOST] [IPU2 ] 42.403952 s: [HOST] [IPU2 ] 42.404044 s: HDVICP-ID: 0 [HOST] [IPU2 ] 42.404105 s: All percentage figures are based of totalElapsedTime [HOST] [IPU2 ] 42.404227 s: [HOST] [IPU2 ] totalAcquire2Wait :1 % [HOST] [IPU2 ] totalWait2Isr :38 % [HOST] [IPU2 ] totalIsr2Done :0 % [HOST] [IPU2 ] totalWait2Done :38 % [HOST] [IPU2 ] totalDone2Release :0 % [HOST] [IPU2 ] totalAcquire2Release :41 % [HOST] [IPU2 ] totalRelease2AcquireDelay :59 % [HOST] [IPU2 ] totalElapsedTime in msec : 3643 [HOST] [IPU2 ] numAccessCnt: 165 [HOST] [IPU2 ] 42.404623 s: IVA-FPS : 55 [HOST] [IPU2 ] 42.404684 s: Average time spent per frame in microsec: 8389 [HOST] [IPU2 ] 42.404806 s: [HOST] [IPU2 ] 42.405325 s: [HOST] [IPU2 ] 42.405386 s: [ IPC_OUT_0 ] Link Statistics, [HOST] [IPU2 ] 42.405477 s: ****************************** [HOST] [IPU2 ] 42.405569 s: [HOST] [IPU2 ] 42.405599 s: Elapsed time = 3670 msec [HOST] [IPU2 ] 42.405965 s: [HOST] [IPU2 ] 42.406026 s: New data Recv = 44.95 fps [HOST] [IPU2 ] 42.406148 s: Release data Recv = 43.5 fps [HOST] [IPU2 ] 42.406240 s: Driver/Notify Cb = 76.29 fps [HOST] [IPU2 ] 42.406331 s: [HOST] [IPU2 ] 42.406362 s: Input Statistics, [HOST] [IPU2 ] 42.406453 s: [HOST] [IPU2 ] 42.406484 s: CH | In Recv | In Drop | In User Drop | In Process [HOST] [IPU2 ] 42.406606 s: | FPS | FPS | FPS | FPS [HOST] [IPU2 ] 42.406697 s: ————————————————– [HOST] [IPU2 ] 42.406819 s: 0 | 29.15 0. 0 0. 0 29.15 [HOST] [IPU2 ] 42.407002 s: 1 | 15.80 0. 0 0. 0 15.80 [HOST] [IPU2 ] 42.407185 s: [HOST] [IPU2 ] 42.407216 s: Output Statistics, [HOST] [IPU2 ] 42.407307 s: [HOST] [IPU2 ] 42.407338 s: CH | Out | Out | Out Drop | Out User Drop [HOST] [IPU2 ] 42.407430 s: | ID | FPS | FPS | FPS [HOST] [IPU2 ] 42.407552 s: ——————————————— [HOST] [IPU2 ] 42.407643 s: 0 | 0 29.15 0. 0 0. 0 [HOST] [IPU2 ] 42.407796 s: 1 | 0 15.80 0. 0 0. 0 [HOST] [IPU2 ] 42.407979 s: [HOST] [IPU2 ] 42.408040 s: [ IPC_OUT_0 ] LATENCY, [HOST] [IPU2 ] 42.408101 s: ******************** [HOST] [IPU2 ] 42.408192 s: Local Link Latency : Avg = 10 us, Min = 0 us, Max = 92 us, [HOST] [IPU2 ] 42.408345 s: Source to Link Latency : Avg = 14722 us, Min = 13451 us, Max = 16989 us, [HOST] [IPU2 ] 42.408497 s: [HOST] [IPU2 ] 42.409687 s: [HOST] [IPU2 ] 42.409748 s: [ IPC_IN_0 ] Link Statistics, [HOST] [IPU2 ] 42.409839 s: ****************************** [HOST] [IPU2 ] 42.410175 s: [HOST] [IPU2 ] 42.410236 s: Elapsed time = 16217 msec [HOST] [IPU2 ] 42.410297 s: [HOST] [IPU2 ] 42.410358 s: Get Full Buf Cb = 30.33 fps [HOST] [IPU2 ] 42.410449 s: Put Empty Buf Cb = 30.21 fps [HOST] [IPU2 ] 42.410541 s: Driver/Notify Cb = 63.57 fps [HOST] [IPU2 ] 42.410632 s: [HOST] [IPU2 ] 42.410663 s: Input Statistics, [HOST] [IPU2 ] 42.410724 s: [HOST] [IPU2 ] 42.410785 s: CH | In Recv | In Drop | In User Drop | In Process [HOST] [IPU2 ] 42.410876 s: | FPS | FPS | FPS | FPS [HOST] [IPU2 ] 42.410998 s: ————————————————– [HOST] [IPU2 ] 42.411090 s: 0 | 30.33 0. 0 0. 0 30.33 [HOST] [IPU2 ] 42.411242 s: [HOST] [IPU2 ] 42.411303 s: Output Statistics, [HOST] [IPU2 ] 42.411364 s: [HOST] [IPU2 ] 42.411395 s: CH | Out | Out | Out Drop | Out User Drop [HOST] [IPU2 ] 42.411486 s: | ID | FPS | FPS | FPS [HOST] [IPU2 ] 42.411578 s: ——————————————— [HOST] [IPU2 ] 42.411669 s: 0 | 0 30.33 0. 0 0. 0 [HOST] [IPU2 ] 42.411822 s: [HOST] [IPU2 ] 42.411913 s: [ IPC_IN_0 ] LATENCY, [HOST] [IPU2 ] 42.411974 s: ******************** [HOST] [IPU2 ] 42.412035 s: Local Link Latency : Avg = 47 us, Min = 30 us, Max = 336 us, [HOST] [IPU2 ] 42.412188 s: Source to Link Latency : Avg = 365 us, Min = 183 us, Max = 763 us, [HOST] [IPU2 ] 42.412340 s: [HOST] [IPU2 ] 42.412401 s: [ IPC_IN_0 ] Detailed IPC Latency Statistics [ HOST -> IPU2 ] , [HOST] [IPU2 ] 42.412523 s: *************************************************************** [HOST] [IPU2 ] 42.412615 s: IPC One-way Buffer Passing Latency (usecs) : Avg = 365, Min = 213, Max = 763 [HOST] [IPU2 ] 42.412767 s: IPC One-way Notify Interrupt Latency (usecs) : Avg = 244, Min = 122, Max = 671 [HOST] [IPU2 ] 42.414140 s: [ISSCAPTURE] Buffer Q Status, [HOST] [IPU2 ] 42.414323 s: Empty Q : Elements in Q = 0, Write Idx = 0, Read Idx = 0 [HOST] [IPU2 ] 42.414445 s: Full Q : Elements in Q = 0, Write Idx = 13, Read Idx = 13 [HOST] [IPU2 ] 42.417312 s: [VPE OUT0] Buffer Q Status, [HOST] [IPU2 ] 42.417434 s: Empty Q : Elements in Q = 0, Write Idx = 0, Read Idx = 0 [HOST] [IPU2 ] 42.417556 s: Full Q : Elements in Q = 1, Write Idx = 13, Read Idx = 12 [HOST] [IPU2 ] 42.417678 s: [VPE OUT1] Buffer Q Status, [HOST] [IPU2 ] 42.417739 s: Empty Q : Elements in Q = 0, Write Idx = 0, Read Idx = 0 [HOST] [IPU2 ] 42.417891 s: Full Q : Elements in Q = 0, Write Idx = 0, Read Idx = 0 [HOST] [IPU2 ] 42.419386 s: ENCODE Out BufExt Q Status [HOST] [IPU2 ] 42.419874 s: Empty Q 0 -> count 7, wrPtr 174, rdPtr 167 [HOST] [IPU2 ] 42.420087 s: Full Q -> count 0, wrPtr 166, rdPtr 166 [HOST] [HOST ] 42.421368 s:

—————————————————————————————————————————————————

谢谢!!

,

Cherry Zhou:

好的收到了。

,

Cherry Zhou:

您好,

您看下encoder link,只有在 FID 不匹配时link才会丢弃输入帧。 请参阅以下代码。

从log中也可以清楚地看到,输入帧会有很多下降。

请问您是否使用编码器进行隔行扫描? 请检查 FID 是否在字段之间交替。 

if (((pChObj->nextFid == fid) ||(fid == SYSTEM_FID_FRAME)) &&(pChObj->disableChn != TRUE) && (skipFrame == FALSE)){// frame is of the expected FID use it, else drop itstatus = Utils_quePut(&pChObj->inQue, pFrame, BSP_OSAL_NO_WAIT);UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);pChObj->nextFid ^= 1; // toggle to next required FIDlinkStatsInfo->linkStats.chStats[pFrame->chNum].inBufRecvCount++;}else{// frame is not of expected FID, so release frameframeList.buffers[freeFrameNum] = pFrame;freeFrameNum++;if (pChObj->nextFid == fid){pChObj->nextFid ^= 1; // toggle to next}linkStatsInfo->linkStats.chStats[pFrame->chNum].inBufDropCount++;}

,

David ks:

Dear Cherry,

有几点困惑的地方

Isscapture link 起头的地方,所以不是这边开始影响的吗?,有发现是他的ID0跟ID1的镜头接收到的FPS 分别为29.83和18.10,

但是Iss_Capture link设定应该都是一样的,或是还有什么样参数或状况可以影响到两个镜头的FPS有不同的情况? , 所以这边有点困惑

encode编码这边的link我也会再了解下的

谢谢你的协助!!

,

Cherry Zhou:

您好,

ISS Capture link并不支持隔行捕获,因此该标志可能会在 VPE link中设置。

您能否在 IPU 上的 EncLink_codecQueueFramesToChQue API 上设置断点并查看是否置位了该flag? 如果置位,您能否恢复它并查看 fps 是否变为30?

此外请问您尝试编码的帧的分辨率是多少?

,

David ks:

Dear Cherry,

不好意思再次打扰

我的编码的帧分辨率是1280×720

我的链:IssCaptrue (Step1) -> Dup (Step2)  -> Vpe (Step3) -> Encode (Step4) -> Null (Step5) 

我这边的意思是 IssCaptrue (Step1) 

从Log中看,在link最一开始的时候(Step1) ,输入的时候已经是 Camera [0] = 29.84FPS , Camera[1] = 18.10FPS

在IssCapture (Step1) FPS已经是这样了

所以传到VPE(Step3)或是ENCODE(Step4)那边的FPS应该也会跟ISS Capture一样的FPS

我的意思是, 以这个顺序来说FPS有差异的问题不是出现在Step1吗?

————————————————————————————————————–

[HOST] [IPU2 ] 42.388214 s: [ ISSCAPTURE ] Link Statistics,[HOST] [IPU2 ] 42.388275 s: ******************************[HOST] [IPU2 ] 42.388366 s:[HOST] [IPU2 ] 42.388397 s: Elapsed time = 16183 msec[HOST] [IPU2 ] 42.388488 s:[HOST] [IPU2 ] 42.388549 s: Get Full Buf Cb = 48.19 fps[HOST] [IPU2 ] 42.388641 s: Put Empty Buf Cb = 90.52 fps[HOST] [IPU2 ] 42.388732 s: Driver/Notify Cb = 59.44 fps[HOST] [IPU2 ] 42.388824 s:[HOST] [IPU2 ] 42.388854 s: Input Statistics,[HOST] [IPU2 ] 42.388977 s:[HOST] [IPU2 ] 42.389038 s: CH | In Recv | In Drop | In User Drop | In Process[HOST] [IPU2 ] 42.389129 s: | FPS | FPS | FPS | FPS[HOST] [IPU2 ] 42.389221 s: ————————————————–[HOST] [IPU2 ] 42.389343 s: 0 | 29.84 0. 0 0. 0 29.84[HOST] [IPU2 ] 42.389495 s: 1 | 18.10 0. 0 0. 0 18.10

————————————————————————————————————–

目前这部分我会再查看,若有解决此问题或其他消息会在更新上来

再多多包涵

谢谢,劳烦了!!

Best Regards,

David

,

Cherry Zhou:

好的我们向工程师跟进下,有反馈尽快给到您。

,

Cherry Zhou:

您好,

这个看起来与 ISSCapture 中的问题不一样,因为驱动程序提供的通知回叫总速率为60fps。 

[HOST] [IPU2 ] 42.388732 s: Driver/Notify Cb = 59.44 fps

但是link有点无法循环缓冲区。 ISSCapture 和 VPE 或 DUP link之间是否有足够的缓冲区? 

[HOST] [IPU2 ] 42.388549 s: Get Full Buf Cb = 48.19 fps[HOST] [IPU2 ] 42.388641 s: Put Empty Buf Cb = 90.52 fps

VPE link看起来也是实时运行的。 它能够在大约4ms 内完成帧处理,因此应该能够在少于10ms 的时间内完成2个通道的处理。 

[HOST] [IPU2 ] 42.398767 s: [ VPE ] LATENCY,[HOST] [IPU2 ] 42.398828 s: ********************[HOST] [IPU2 ] 42.398920 s: Local Link Latency : Avg = 3917 us, Min = 3721 us, Max = 7168 us,[HOST] [IPU2 ] 42.399072 s: Source to Link Latency : Avg = 4500 us, Min = 4056 us, Max = 8448 us,

通过查看编码器节点的统计数据,看起来也是实时运行的。 对两个通道进行编码大约需要20ms。 

[HOST] [IPU2 ] 42.403464 s: [ ENCODE ] LATENCY,[HOST] [IPU2 ] 42.403556 s: ********************[HOST] [IPU2 ] 42.403617 s: Local Link Latency : Avg = 9666 us, Min = 8662 us, Max = 11651 us,[HOST] [IPU2 ] 42.403769 s: Source to Link Latency : Avg = 14489 us, Min = 13299 us, Max = 16623 us,

因此,fps 下降不是由于某些链路中的性能问题,而是因为编码器检测到 fid 错误而丢失帧。

这些统计数据没有 DUP 性能,因此不确定 DUP 是否运行正常。

再次建议您在编码器链路上放置断点,以查看它在何处放置帧/为何放置帧。先来解决该问题,然后再检查性能。

,

David ks:

Dear Cherry,

首先感谢你的回覆!

后来我尝试埋log

/*———————————————————————————————————————*/

if (((pChObj->nextFid == fid) ||(fid == SYSTEM_FID_FRAME)) &&(pChObj->disableChn != TRUE) && (skipFrame == FALSE)){// frame is of the expected FID use it, else drop itstatus = Utils_quePut(&pChObj->inQue, pFrame, BSP_OSAL_NO_WAIT);UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);pChObj->nextFid ^= 1; // toggle to next required FIDlinkStatsInfo->linkStats.chStats[pFrame->chNum].inBufRecvCount++;}else{// frame is not of expected FID, so release frameframeList.buffers[freeFrameNum] = pFrame;freeFrameNum++;if (pChObj->nextFid == fid){pChObj->nextFid ^= 1; // toggle to next}linkStatsInfo->linkStats.chStats[pFrame->chNum].inBufDropCount++;}

/*———————————————————————————————————————*/

在录影的印出inBufDropCount的数量,以此来观察Drop的数量,不过当 [开始录影] 到 [录影结束] Drop的数量还是都为 "0"

看起来没有 有DropCount产生

是否有我没有注意到的地方或误解的地方呢? 或是还有其他可能性?

谢谢!!

备注: 我的 Scan_Format是SYSTEM_SF_PROGRESSIVE

Best Regards,

David

,

Cherry Zhou:

好的我们反馈给工程师看下哈。

,

David ks:

Dear Cherry, 

除了上次DropCount的問題

另外一个问题根据上次的内容

内容 :  ISSCapture 和 VPE 或 DUP link之间是否有足够的缓冲区?

如何去查验缓冲区呢?

如果是不足够要如何去改善这个问题?

谢谢!

Best Regards,

David

,

Cherry Zhou:

我们反馈给工程师看下哈。

,

Cherry Zhou:

您好,

David ks 说:

内容 :  ISSCapture 和 VPE 或 DUP link之间是否有足够的缓冲区?

如何去查验缓冲区呢?

如果是不足够要如何去改善这个问题?

这个需要在应用程序中进行检查。link中要分配的缓冲区数量由应用程序提供。您可以尝试下增加 ISS Capture link输出端的缓冲器数量?

,

David ks:

Dear Cherry, 

真的非常感谢您的协助,看起来是这个问题没错

我试着增加这个数量 pOutPrm->numOutBuf     从4 增加 12

结果两个镜头encode的状况看起来正常

最后另外想问一下这个(pOutPrm->numOutBuf)最大可以设定多少呢?

有尝试在寻找但没有找到,这部分的设定有文件在描述吗?

Best Regards,

David

,

Cherry Zhou:

您好,

这实际上取决于queue size。 如果没记错,queue size设置为16。 因此最大缓冲器可以是16。 

,

David ks:

Dear Cherry, 

     谢谢您的协助!! Thumbsup

Best Regards,

David

,

Cherry Zhou:

不客气,如您之后遇到其他问题也欢迎您在论坛参与讨论!

赞(0)
未经允许不得转载:TI中文支持网 » TDA2EG-17: (Vision_sdk 0307) 两个镜头 录影编码 h264 / fps 问题
分享到: 更多 (0)