Dear,
I want to encode video from YUYV stream to h264 file using DSP C64+ of DM3730 on an angstrom Linux 2.6.32
The camera is mounted in /dev/video0 and its stream is well recorded with ffmpeg for exemple with command "ffmpeg -i /dev/video0 /dev/mount/test.mp4", but the problem is that it only uses the processor, so it takes 100% of the CPU with only 5 fps with delay...
so the idea is to use the DSP to do the job, but ... I've some problems.
I've the drivers for DSP :
root@dm37x-evm /usr/share/ti/ti-dmai-apps # ll /lib/modules/2.6.32/kernel/drivers/dsp/
-rwxr-xr-x 1 root root 149886 Jul 28 18:46 cmemk.ko
-rwxr-xr-x 1 root root 1204526 Jul 28 18:46 dsplinkk.ko
-rwxr-xr-x 1 root root 97806 Jul 28 18:46 lpm_omap3530.ko
-rwxr-xr-x 1 root root 93876 Jul 28 18:46 sdmak.ko
my kernel parameters are the following:
mmc_kernel=mmc init; fatload mmc 1 0x80000000 uImage
mmc_bootargs=mem=55M@0x80000000 mem=128M@0x88000000 vram=18M omapfb.vram=0:6M,1:6M,2:6M console=ttyS2,115200n8 mpurate=1000 noinitrd root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=5 ethaddr=F8:DC:7A:00:00:04 ip=::::::off
mmc_boot=run mmc_kernel; setenv bootargs $mmc_bootargs; bootm 0x80000000
my /etc/rc5.d/S99loadmodule-rc is the following:
# Start Addr Size Description
# -------------------------------------------
# 0x80000000 55 MB Linux
# 0x83700000 34 MB CMEM
# 0x85900000 39 MB CODEC SERVER
load () {
modprobe cmemk phys_start=0x83700000 phys_end=0x85900000 allowOverlap=1 useHeapIfPoolUnavailable=1
modprobe dsplinkk
modprobe lpm_omap3530
modprobe sdmak
}
and display the following log when used:
[ 71.377410] CMEMK module: built on Mar 24 2011 at 20:50:56
[ 71.382995] Reference Linux version 2.6.32
[ 71.387298] File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/dm37x-evm-none-linux-gnueabi/ti-linuxutils-1_2_26_01_02-r94d/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 71.406677] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 71.412902] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8b700000)
[ 71.421997] allocated heap buffer 0xd2000000 of size 0x2200000
[ 71.427886] heap fallback enabled - will try heap if pool buffer is not available
[ 71.435485] cmemk initialized
[ 71.516937] DSPLINK Module (1.65.00.02) created on Date: Mar 24 2011 Time: 20:53:34
[ 71.567932] SDMAK module: built on Mar 24 2011 at 20:51:03
[ 71.573516] Reference Linux version 2.6.32
[ 71.577819] File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/dm37x-evm-none-linux-gnueabi/ti-linuxutils-1_2_26_01_02-r94d/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
so, everything seems fine, so i want using video_encode_io1_dm3730.x470MV from TI exemples :
root@dm37x-evm /usr/share/ti/ti-dmai-apps # ./video_encode_io1_dm3730.x470MV -c
h264enc -i /dev/video0 -o /media/ram/output.264 -r 800x600 -n 100
Starting application...
Failed to create video encoder: h264enc
End of application.
Il alsto tried from a YUYV file and not from camera stream, but is the same. When i try to use directly "encode" program, I have another issue:
root@dm37x-evm /usr/share/ti/dvsdk-demos # ./encode -v test.mpeg4 -x
Encode demo started.
Error: Failed to detect video standard, video input connected?
Do you have an idea of problems ?