[Arm-netbook] allwinner-a10-video EncoderDemo can not work
Hubert Liao
liao.hubertt at gmail.com
Tue Jul 31 15:19:05 BST 2012
On Tue, Jul 31, 2012 at 10:09 AM, Piyush Verma <piyush.pv at gmail.com> wrote:
>
> Could u try to run with strace then see where it stuck ?
>
>From strace output, the last system call is
ioctl(6, 0x102, 0x1f1f0) = 0
and the kernel print:
[DISP WRN] file:drivers/video/sun4i/disp/de_bsp/de/disp_scaler.c,line:181:
not supported type:0 in Scaler_sw_para_to_reg
strace ./EncoderDemo >> EncoderDemo.strace
execve("./EncoderDemo", ["./EncoderDemo"], [/* 20 vars */]) = 0
brk(0) = 0x1e81000
uname({sys="Linux", node="ubuntu", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40084000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=58764, ...}) = 0
mmap2(NULL, 58764, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400e9000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\220t\4\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=710388, ...}) = 0
mmap2(NULL, 768792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x401e8000
mprotect(0x40291000, 32768, PROT_NONE) = 0
mmap2(0x40299000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9) = 0x40299000
mmap2(0x4029e000, 23320, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4029e000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\3701\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=407152, ...}) = 0
mmap2(NULL, 438440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x400f8000
mprotect(0x4015b000, 28672, PROT_NONE) = 0
mmap2(0x40162000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x62) = 0x40162000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\340+\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=38572, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40062000
mmap2(NULL, 69908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x4008b000
mprotect(0x40094000, 28672, PROT_NONE) = 0
mmap2(0x4009b000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0x4009b000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\305B\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=104536, ...}) = 0
mmap2(NULL, 111136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x400bb000
mprotect(0x400cc000, 28672, PROT_NONE) = 0
mmap2(0x400d3000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10) = 0x400d3000
mmap2(0x400d5000, 4640, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400d5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0AU\1\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=918976, ...}) = 0
mmap2(NULL, 955668, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x402a4000
mprotect(0x40380000, 32768, PROT_NONE) = 0
mmap2(0x40388000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdc) = 0x40388000
mmap2(0x4038b000, 9492, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4038b000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x400e2000
set_tls(0x400e24c0, 0xf0005, 0x400e2ba8, 0x400e24c0, 0x40089000) = 0
mprotect(0x40388000, 8192, PROT_READ) = 0
mprotect(0x400d3000, 4096, PROT_READ) = 0
mprotect(0x4009b000, 4096, PROT_READ) = 0
mprotect(0x40162000, 4096, PROT_READ) = 0
mprotect(0x40299000, 12288, PROT_READ) = 0
mprotect(0x1e000, 4096, PROT_READ) = 0
mprotect(0x40088000, 4096, PROT_READ) = 0
munmap(0x400e9000, 58764) = 0
set_tid_address(0x400e2068) = 1081
set_robust_list(0x400e2070, 0xc) = 0
futex(0xbeda2c0c, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbeda2c0c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
NULL, 400d4000) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x400bf221, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x400bf119, [],
SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x1e81000
brk(0x1ea2000) = 0x1ea2000
open("/dev/cedar_dev", O_RDWR) = 3
ioctl(3, 0x101, 0x1e8100c) = 0
mmap2(NULL, 2048, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0xdc8d8) = 0x40164000
ioctl(3, 0x200, 0) = 0
ioctl(3, FDGETPRM, 0) = 0
ioctl(3, 0x203, 0) = 0
open("/dev/cedar_dev", O_RDWR) = 4
ioctl(4, 0x101, 0x1e8103c) = 0
open("/dev/video0", O_RDWR|O_NONBLOCK) = 5
ioctl(5, VIDIOC_QUERYCAP or VT_OPENQRY, 0xbeda29bc) = 0
ioctl(5, VIDIOC_S_FMT or VT_RELDISP, 0xbeda28f0) = -1 EINVAL (Invalid argument)
ioctl(5, VIDIOC_REQBUFS or VT_DISALLOCATE, 0xbeda28d8) = 0
ioctl(5, VIDIOC_QUERYBUF or VT_RESIZE, 0xbeda2894) = 0
mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0) = 0x4038e000
ioctl(5, VIDIOC_QUERYBUF or VT_RESIZE, 0xbeda2894) = 0
mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x96) = 0x4050f000
ioctl(5, VIDIOC_QUERYBUF or VT_RESIZE, 0xbeda2894) = 0
mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x12c) = 0x405f0000
ioctl(5, VIDIOC_QUERYBUF or VT_RESIZE, 0xbeda2894) = 0
mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x1c2) = 0x4072b000
ioctl(5, VIDIOC_QBUF, 0xbeda2850) = 0
ioctl(5, VIDIOC_QBUF, 0xbeda2850) = 0
ioctl(5, VIDIOC_QBUF, 0xbeda2850) = 0
ioctl(5, VIDIOC_QBUF, 0xbeda2850) = 0
fstat64(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x408bd000
open("/dev/disp", O_RDWR) = 6
ioctl(6, 0x140, 0x1f1f0) = 0
ioctl(6, 0x40, 0x1f1f0) = 101
ioctl(6, 0x4a, 0x1f1f0) = 0
ioctl(6, 0x42, 0x1f1f0) = 0
open("/dev/fb0", O_RDWR) = 7
ioctl(7, 0x4700, 0xbeda2828) = 0
mmap2(NULL, 925696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40958000
write(7, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"...,
921600) = 921600
close(7) = 0
ioctl(6, 0x57, 0x1f1f0) = 0
ioctl(6, 0x100, 0x1f1f0) = 0
ioctl(3, 0x103, 0) = 0
mmap2(NULL, 8388608, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc4000) = 0x40aa8000
mmap2(NULL, 471040, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc4800) = 0x41319000
mmap2(NULL, 471040, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc4873) = 0x41484000
mmap2(NULL, 81920, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc48e6) = 0x41576000
mmap2(NULL, 81920, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc48fa) = 0x41663000
mmap2(NULL, 1280, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xc490e) = 0x41739000
open("h264.buf", O_RDWR|O_CREAT|O_TRUNC, 0666) = 7
ioctl(5, VIDIOC_STREAMON, 0xbeda2a20) = 0
gettimeofday({1343744285, 681708}, NULL) = 0
gettimeofday({1343744285, 695660}, NULL) = 0
select(6, [5], NULL, NULL, {2, 0}) = 1 (in [5], left {1, 532811})
ioctl(5, VIDIOC_DQBUF, 0xbeda2900) = 0
ioctl(6, 0x102, 0x1f1f0) = 0
> On Tue, Jul 31, 2012 at 3:07 AM, Hubert Liao <liao.hubertt at gmail.com> wrote:
>>
>> Hi:
>>
>> I got the video source code from
>> https://github.com/amery/allwinner-a10-video,
>> and try the EncoderDemo on Mele A1000 with a usb webcam, when I run it,
>> the
>> output file h264.buf size is always 0.
>>
>> ./EncoderDemo
>> w: 640, h: 480, preview_left: 80, preview_top: 0, preview_h: 480,
>> preview_w : 640
>> video layer hdl:101
>> MODE: 2, format: 13
>> fb_layer hdl: 100
>> open H264Enc ok
>> to stream on
>> V4L2Camera::v4l2StartStreaming
>> V4L2Camera::v4l2StartStreaming OK
>> cru: 1586005820, last: 1586005799, 21
>> VIDIOC_DQBUF id: 0
>>
>> I found it stop at
>> g_pCedarV->encode(g_pCedarV);
>> in the while(1) loop, main.c line 139
>>
>> lack of the encode library source code, so I can not find the real stuck
>> point
>> using gdb, maybe it stop at InitSPS @H264enclib.c
>>
>> (gdb) r
>> Starting program:
>>
>> /root/Downloads/amery-allwinner-a10-video-9fa91df/a10_h264_encode/EncoderDemo
>> [Thread debugging using libthread_db enabled]
>> w: 640, h: 480, preview_left: 80, preview_top: 0, preview_h: 480,
>> preview_w : 640
>> video layer hdl:101
>> MODE: 2, format: 13
>> fb_layer hdl: 100
>> open H264Enc ok
>> to stream on
>> V4L2Camera::v4l2StartStreaming
>> V4L2Camera::v4l2StartStreaming OK
>> cru: -1547703669, last: -1547703690, 21
>> VIDIOC_DQBUF id: 0
>> ^C
>> Program received signal SIGINT, Interrupt.
>> 0x0000d4c0 in InitSPS (pDev=0x21090) at F20/H264encLib.c:81
>> 81 F20/H264encLib.c: No such file or directory.
>> in F20/H264encLib.c
>> (gdb) bt
>> #0 0x0000d4c0 in InitSPS (pDev=0x21090) at F20/H264encLib.c:81
>> #1 0x0000c1fc in H264EncEncode (pDev=0x21090) at F20/H264encDrv.c:843
>> #2 0x0000a4dc in main () at main.c:139
>>
>> Any help ? Thanks!
>>
>> _______________________________________________
>> arm-netbook mailing list arm-netbook at lists.phcomp.co.uk
>> http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
>> Send large attachments to arm-netbook at files.phcomp.co.uk
>
>
>
>
> --
> Thanks & Regards
>
> Piyush Verma
>
>
>
> _______________________________________________
> arm-netbook mailing list arm-netbook at lists.phcomp.co.uk
> http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
> Send large attachments to arm-netbook at files.phcomp.co.uk
More information about the arm-netbook
mailing list