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

TMS320DM368:top

我在做1080p、30的编码时发现实际的帧率只有27左右,如下:

但当我在capture时降到15fps时,在上图的capture->Frame-rate就可以到30。

另外,30fps时很快就死机了(串口没反应),使用top命令如下:

内存居然有526%,这应该很不正常吧!

想请教一下,这是怎么回事?

Chris Meng:

你好,

请问你的采集使用的是continue mode么?你的系统除了有一路1080p的编码,是否还有其他大量访问DDR的应用?看起来像是DDR资源不够导致的问题。

malik:

回复 Chris Meng:

Chris Meng,

请问,continue mode模式怎么判断呢?

Chris Meng:

回复 malik:

你好,

请在DM36x VPFE guide里面寄存器部分搜索continuous mode关键字,并检查相关寄存器在你系统中的配置。

malik:

回复 Chris Meng:

Chris Meng ,

您好!

请问,您所提到的continuous mode是指哪里的?

因为,我在VPFE文档中的寄存器发现continuous mode在IPIPEIF、IPIPE的BOX和RSZ的RZA和RZB都有。

Chris Meng:

回复 malik:

你好,

只要你使用到的模块,都请看一下使用的模式。一般来说,应该都是一致的。

另外也请搜索一下one shot,就是continous mode的反面,IPIPE.SRC_EN也是相关寄存器。

malik:

回复 Chris Meng:

Chris Meng ,

您好!

我发现我使用的模块中:

对于continous mode,IPIPEIF的CFG1(04h)和RSZ中的RZA_MODE(5ch)均为1,即one shot模式;

对于one shot,IPIPE中SRC_MODE(04h)的WRT和OST均为0,RSZ中SRC_MODE(04h)的WRT和OST为0、1;

另外,IPIPE.SRC_EN=0,RSZ.SRC_EN=0。

以下是我运行程序后的打印信息:

root@192:/opt/ipnc# ./av_server.out DM368 1080P H264 4000000 VBR AUTO MUNUOFF RTSP &root@192:/opt/ipnc# DM365MM Init SuccessfulAVSERVER UI: Initializing. CLK Hz, ARM Hz = 432000000 DDR Hz = 340000000 VPSS Hz = 340000000 IMCOP Hz = 340000000 [OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] … ERROR IMAGE TUNE: Paramset File is not available….. Setting DEFAULT parameter

DM365MM Init SuccessfulSYSTEM.MSTPRI0 value changed to 00440011

CONFIGURING AVSERVER FOR DM368 …..config->captureConfig[i].frameSkipMask:3fffffffconfig->encodeConfig[i].frameSkipMask:3fffffff qid = -1Creat queue id:32769queue id:32769 AVSERVER UI: Starting Streaming Server…ApproDrvInit: 10 qid = 0ApproDrvInit: 9 qid = 0queue id:0ApproDrvInit: 8ApproDrvInit: 2 qid = 0queue id:0ApproDrvInit: 6 qid = 0queue id:0 qid = 0queue id:0queue id:0 AVSERVER UI: Starting Streaming Server…DONE CAPTURE: Recevied CMD = 0x0300 CAPTURE: Create…gAVSERVER_config.sensorFps:30 CAPTURE: Opening capture on imager MICRON_MT9P031_5MP. CAPTURE: Opening imager MICRON_MT9P031_5MP. width = 1920 height = 1092 SENSOR FPS VALUE = 30 Sensor Mode Info, Width = 1920 Height = 1092 validStartX = 0 validStartY = 2 validWidth = 1920 validHeight = 1088 fps = 30 Bin Enable = 0 Sensor Frame Timing Info, fps = 30 t_frame (ns) = 33333334.000000 t_row (ns) = 29375.000000 t_pclk (ns) = 10.416667 W = 1920 H = 1092 SW = 1134 SD = 0 HB = 450 VB = 42 HBmin = 450 VBmin = 9 f_pclk = 96000000 shutterOverhead (ns) = 4437.500000 col_size = 1919 row_size = 1091 col_skip = 0 row_skip = 0 col_bin = 0 row_bin = 0 col_start = 336 row_start = 468 pll_M = 16 pll_N = 1 pll_DIV = 1 CAPTURE: Opening ISIF.

select rec656! CAPTURE: Opening H3A. H3A Settings, AEWB Win Start H = 32 AEWB Win Start V = 34 AEWB Win Num H = 12 AEWB Win Num V = 16 AEWB Win Width = 154 AEWB Win Height = 64 AEWB Win Inc H = 22 AEWB Win Inc V = 22 AEWB Win Pixels/Color = 21 CAPTURE: Opening IPIPE. CAPTURE: Open DONE.capture_width:1920capture_width:1088 CAPTURE: Create…DONE ENCODE: Recevied CMD = 0x0300 ENCODE: Create…createPrm.width:1920createPrm.height:1072 STREAM: Recevied CMD = 0x0300 STREAM: Create… STREAM: Ext 0: 0x0 STREAM: Ext 1: 0x0 qid = 0queue id:0streamSet.ImageWidth:1920streamSet.ImageHeight:1072 STREAM: Create…DONE FD: Received CMD = 0x0300 FD: Create…

FR : 0 users registered from exsiting face album 2A: Recevied CMD = 0x0300 2A: Create…IPNC_DM368_5.0.0 (root@ubuntu) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Thu Nov 1 IPNC AUTO_IRIS = 1 2A: Create…DONE AUDIOPLAY: Recevied CMD = 0x0300 AUDIOPLAY: Create… FD: Create…DONE qid = -1Creat queue id:65538queue id:65538 qid = -1Creat queue id:98307queue id:98307Initializing……done initializingPlay this stream using the URL: rtsp://192.168.1.189:8555/PSIA/Streaming/channels/0?videoCodecType=MJPEG

(We use port 8302 for optional RTSP-over-HTTP tunneling.)Initializing…Initializing…Initializing……done initializing AUDIOPLAY: Create…DONE MOTION: Recevied CMD = 0x0300 MOTION: Create… MOTION: Create…DONE SWOSD: Recevied CMD = 0x0300Initializing…

Default Icon TI Logo

Default Icon TI Logo 2A: Start… 2A: Start…DONE CAPTURE: Start… CAPTURE: Starting IPIPE. SWOSD: Create…DONE CAPTURE: Starting ISIF. CAPTURE: Starting imager.Play this stream using the URL: rtsp://192.168.1.189:8557/PSIA/Streaming/channels/2?videoCodecType=H.264

(We use port 8304 for optional RTSP-over-HTTP tunneling.)…done initializingPlay this stream using the URL: rtsp://192.168.1.189:8556/PSIA/Streaming/channels/2?videoCodecType=H.264

(We use port 8303 for optional RTSP-over-HTTP tunneling.)…done initializing…done initializingPlay this stream using the URL: rtsp://192.168.1.189:8554/PSIA/Streaming/channels/1?videoCodecType=MPEG4

(We use port 8301 for optional RTSP-over-HTTP tunneling.)Play this stream using the URL: rtsp://192.168.1.189:8553/PSIA/Streaming/channels/1?videoCodecType=MPEG4

(We use port 8300 for optional RTSP-over-HTTP tunneling.) CAPTURE: Starting H3A. CAPTURE: Start DONE. CAPTURE: Start…DONE

Module | Avg Time/Frame | Frame-rate | Total time | Total Frames | CAPTURE | 36.61 | 27.32 | 32985 | 901 | IPIPE | 31.48 | 31.77 | 28364 | 901 | ENCODE0 | 36.51 | 27.39 | 32786 | 898 | STREAM | 0.24 | 4215.96 | 213 | 898 |

Chris Meng:

回复 malik:

你好,

请问你是如何读取运行时候的寄存器值的?

RSZ的SRC_FMT0.SRC是否配置为1?如果是,根据你现在的寄存器你应该使用的是one shot mode,也就是ISIF会输出数据到DDR,然后DDR上数据在进入ISP处理,这样DDR的吞吐一写,一读,大了很多。

你参考一下raw采集的配置,配置为continous mode。默认YUV 输入IPNC代码是使用的one shot mode。

malik:

回复 Chris Meng:

Chris Meng,

您好!

我根据您的建议修改config->captureRawInMode  = AVSERVER_CAPTURE_RAW_IN_MODE_ISIF_IN;

但是运行程序以后出现以下错误:

CAPTURE: Starting H3A. CAPTURE: Start DONE.[ 20.492113] CMEMK Error: get_phys: Unable to find phys addr for 0x6dfb2e1e CAPTURE: Start.[ 20.499178] CMEMK Error: get_phys: get_user_pages() failed: -14..DONE[ 20.506537] CMEMK Error: GETPHYS: Failed to convert virtual 0x6dfb2e1e to physical.CMEM Error: getP[ 20.515143] CMEMK Error: get_phys: Unable to find phys addr for 0x60819d86hys: Failed to g[ 20.523363] CMEMK Error: get_phys: get_user_pages() failed: -14et physical addr[ 20.530704] CMEMK Error: GETPHYS: Failed to convert virtual 0x60819d86 to physical.ess of 0x6dfb2e1eCMEM Error: getPhys: Failed to get physical address of 0x60819d86[ 20.571890] CMEMK Error: get_phys: Unable to find phys addr for 0x8b29d6c6[ 20.578795] CMEMK Error: get_phys: get_user_pages() failed: -14[ 20.584855] CMEMK Error: GETPHYS: Failed to convert virtual 0x8b29d6c6 to physical.CMEM Error: getPhys: Failed to get physical address of 0x8b29d6c6 ERROR (alg_vidEnc.c|ALG_vidEncSetDynamicParams|406): XDM_SETPARAMS failed, status=-1

Chris Meng:

回复 malik:

你好,

默认IPNC软件没有对YUV数据数据连续模式的支持,你这样的修改是配置为RAW输入了,是不对的。

你需要添加代码来实现你需要的功能。

malik:

回复 Chris Meng:

Chris Meng,

您好!

我昨天自己看了一下,发现内存没有溢出。

我想请专家帮忙分析一下,现在的情况是这样的:

对于1080p30的编码(仅仅是编码),实际只有27fps,使用IPNC5自带的RTSP,以及使用VLC进行解码显示(视频显示正常),会很快地死机(VLC没反应、串口没反应);甚至我将帧率降到15fps(capture降帧)时也是会死机,唯一的区别是可以运行几分钟;在把sersor换成1080p25时也是会死机,但实际帧率可以有25fps。

前段时间使用自己写的RTSP(组播、UDP)和播放器时,却不会死机,只是出来的视频延迟高、有马赛克、卡顿。

赞(0)
未经允许不得转载:TI中文支持网 » TMS320DM368:top
分享到: 更多 (0)