Hi
CPU : i.MX7D
Kernel Version
Yocto_4.1.15_2.0.0
Issue
test the OV5640 camera on i.mx7, it always hangs when it captures the picture with the resolution higher than 640x480.
command :
gst-launch-1.0 imxv4l2src device=/dev/video1 num_buffers=1 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! jpegenc quality=100 idct-method=2 ! filesink location=test.jpg
Gstreamer log
0:00:01.797284750 861 0x1146000 INFO imxv4l2 gstimxv4l2.c:902:gst_imx_v4l2capture_config_usb_camera: capture mode 3: 1920x1080
0:00:02.481041750 861 0x1146000 INFO imxv4l2 gstimxv4l2.c:914:gst_imx_v4l2capture_config_usb_camera: frame format: YUYV
0:00:02.481155625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1563:gst_imx_v4l2_set_buffer_count: requeset for (6) buffers.
0:00:02.504577125 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153298), type(1), memblk(0x11565ac), paddr((nil)), size(4147200).
0:00:02.504891375 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153298), type(1), index(0), memblk(0x11565ac), vaddr(0x74f0b000), paddr(0xae100000), size(4147200).
0:00:02.505212375 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x11532e8), type(1), memblk(0x115665c), paddr(0x3f5000), size(4147200).
0:00:02.505393375 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x11532e8), type(1), index(1), memblk(0x115665c), vaddr(0x74b16000), paddr(0xae500000), size(4147200).
0:00:02.505492625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153338), type(1), memblk(0x115670c), paddr(0x7ea000), size(4147200).
0:00:02.505659500 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153338), type(1), index(2), memblk(0x115670c), vaddr(0x74721000), paddr(0xaed00000), size(4147200).
0:00:02.505756125 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153388), type(1), memblk(0x11567bc), paddr(0xbdf000), size(4147200).
0:00:02.505920750 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153388), type(1), index(3), memblk(0x11567bc), vaddr(0x7432c000), paddr(0xaf100000), size(4147200).
0:00:02.506017500 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x11533d8), type(1), memblk(0x75d018ac), paddr(0xfd4000), size(4147200).
0:00:02.506182500 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x11533d8), type(1), index(4), memblk(0x75d018ac), vaddr(0x73f37000), paddr(0xaf500000), size(4147200).
0:00:02.506278375 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1606:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153428), type(1), memblk(0x75d0195c), paddr(0x13c9000), size(4147200).
0:00:02.506445625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1638:gst_imx_v4l2_allocate_buffer: Allocated v4l2buffer(0x1153428), type(1), index(5), memblk(0x75d0195c), vaddr(0x73b42000), paddr(0xaf900000), size(4147200).
0:00:02.506587500 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1835:gst_imx_v4l2_queue_gstbuffer: queue gstbuffer(0x75d14850).
0:00:02.506645625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1748:gst_imx_v4l2_queue_v4l2memblk: queue v4lbuffer memblk (0x11565ac), paddr(0xae100000), index(0), flags(0).
0:00:02.506709500 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1769:gst_imx_v4l2_queue_v4l2memblk: streamon count (2), queue count (0)
0:00:02.506769250 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1835:gst_imx_v4l2_queue_gstbuffer: queue gstbuffer(0x75d148f0).
0:00:02.506817625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1748:gst_imx_v4l2_queue_v4l2memblk: queue v4lbuffer memblk (0x115665c), paddr(0xae500000), index(1), flags(0).
0:00:02.506879625 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1769:gst_imx_v4l2_queue_v4l2memblk: streamon count (2), queue count (1)
0:00:02.861754875 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1789:gst_imx_v4l2_queue_v4l2memblk: V4L2 device is STREAMON.
0:00:02.861885125 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1835:gst_imx_v4l2_queue_gstbuffer: queue gstbuffer(0x75d14990).
0:00:02.861951250 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1748:gst_imx_v4l2_queue_v4l2memblk: queue v4lbuffer memblk (0x115670c), paddr(0xaed00000), index(2), flags(0).
0:00:02.862041875 861 0x1146000 DEBUG imxv4l2 gstimxv4l2.c:1800:gst_imx_v4l2_queue_v4l2memblk: queued (3) ----------> hangs here.
Does any ideas or suggestions how i fix this problem ?
Wigros,
I think i.MX7D can process S/W jpeg encode function base on Gstreamer plug in lib
We are some confuse ,640x480 can work ,
800x600 , 1024x768 fail
Apollo Chang
Hello Apollo,
There is no VPU( Hardware encoder) in i.MX7D, so High resolution JPEG encoding can't be supported.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------