Hello TI experts,
I have two topics on the DM385 behavior in on of our products. I would highly appriciate your insights on these.
You already worked with one of my colleages on the chip:
Frameskips @60Hz
Our customer usually encodes a video stream generated by camera 1080p@60Hz.. The encodes video seen here is a static linux background, so nothing too complicated to encode. When analysing the udp streams after encoding we see a strange behaviour:
1. There seem to be sporadic "gaps" between P-Frames. Can this be normal?
2. When operarting at 60Hz and looking at the debug output of the DM385, it records Frameskips. Only about 57FPS are leaving the chip. This can be seen in the UDP stream, too. I tried to change encoder profiles (base, main, high) with no improvement. When changing the encoderPreset to "high speed", the behavior improves, but this semms to cause other problems. Changing Framerate to 50FPS or lower, the problem disapears.
[m3video] *** ENCODE Statistics ***
[m3video]
[m3video] Elasped Time : 117 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 | 59 1 0 58 255 / 67781770
[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: 6795
[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 ] CAPTURE : Capture FPS: 60.0 fps ... in 10.0 secs
[m3vpss ] CAPTURE : Capture FPS: 59.9 fps ... in 10.0 secs
SPS, PPS Packets in front of I Frame
We send SPS and PPS infomation in fornt of every I Frame, so that the decoder can start the stream at any timing. Customer application uses this infomation to gernerate timestamps for further processing (as no timestamps are generated/tansported by DM385). Customer had some problems with this application, and when analysing the case, he noticed that sometimes (spordic, every 2-15min) a SPS header 00 00 01 27 is sent with a P-Frame which causes the app to crash. Of course this can be eliminated by the application.
I am wondering about the case of sending SPS header with a P-frame sporadicly. In the encLink_h264.c, I found the parts that generate the SPS and PPS Header in front of every I Frame. But what could cause this strange behavior?
/* We want SPS and PPS to be set for every intra frame. Hence configure the
* the NALU control params to force encoder to insert SPS/PPS on every
* I frame
*/
staticParams->nalUnitControlParams.naluControlPreset =
IH264_NALU_CONTROL_USERDEFINED;
ENCLINK_H264_SETNALU_MASK_SPS(staticParams->nalUnitControlParams.
naluPresentMaskIntraPicture);
ENCLINK_H264_SETNALU_MASK_PPS(staticParams->nalUnitControlParams.
naluPresentMaskIntraPicture);
ENCLINK_H264_SETNALU_MASK_SPS(staticParams->nalUnitControlParams.
naluPresentMaskIDRPicture);
ENCLINK_H264_SETNALU_MASK_PPS(staticParams->nalUnitControlParams.
naluPresentMaskIDRPicture);
Thanks in advance for your help!
Best regards,
Christopher Bräuer
