获取不到外接isp输出图像

nx通过4通道mipi lane外接一个isp。isp输出raw12 1920*1080图像,帧率是30fps。我用gstream去取流会发生报错取不到流。下面是我抓取的trace log。
v4l2-ctl-9312 [001] … 167.640425: tegra_channel_set_stream: 15a00000.nvcsi–1 : 0x0
v4l2-ctl-9312 [001] … 167.640430: csi_s_stream: enable : 0x0
v4l2-ctl-9312 [000] … 167.645380: tegra_channel_set_power: hisi 9-001a : 0x0
v4l2-ctl-9312 [000] … 167.645391: camera_common_s_power: status : 0x0
v4l2-ctl-9312 [000] … 167.645519: tegra_channel_set_power: 15a00000.nvcsi–1 : 0x0
v4l2-ctl-9312 [000] … 167.645523: csi_s_power: enable : 0x0
kworker/0:0-4 [000] … 167.664393: rtcpu_vinotify_event: tstamp:5702797425 tag:CHANSEL_PXL_EOF channel:0x23 frame:5279 vi_tstamp:5702795357 data:0x04370002
kworker/0:0-4 [000] … 167.664396: rtcpu_vinotify_event: tstamp:5702797564 tag:ATOMP_FRAME_DONE channel:0x23 frame:5279 vi_tstamp:5702795376 data:0x00000000
kworker/0:0-4 [000] … 167.664398: rtcpu_vinotify_event: tstamp:5702797722 tag:RESERVED_19 channel:0x23 frame:159 vi_tstamp:6395794272 data:0x0202006f
kworker/0:0-4 [000] … 167.664434: rtcpu_vinotify_event: tstamp:5703136503 tag:FE channel:0x00 frame:5279 vi_tstamp:5702798468 data:0x00000024
kworker/0:0-4 [000] … 167.664435: rtcpu_vinotify_event: tstamp:5703136668 tag:ATOMP_FE channel:0x00 frame:5279 vi_tstamp:5702798468 data:0x00000000
kworker/0:0-4 [000] … 167.664436: rtcpu_vinotify_event: tstamp:5703136808 tag:RESERVED_19 channel:0x23 frame:159 vi_tstamp:6395895520 data:0x0002006f
kworker/0:0-4 [000] … 167.664437: rtcpu_vinotify_event: tstamp:5703136966 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:6395900832 data:0x07020070
kworker/0:0-4 [000] … 167.664439: rtcpu_vinotify_event: tstamp:5703137102 tag:FS channel:0x00 frame:5280 vi_tstamp:5702799393 data:0x00000014
kworker/0:0-4 [000] … 167.664440: rtcpu_vinotify_event: tstamp:5703137261 tag:ATOMP_FS channel:0x00 frame:5280 vi_tstamp:5702799394 data:0x00000000
kworker/0:0-4 [000] … 167.664441: rtcpu_vinotify_event: tstamp:5703137399 tag:CHANSEL_PXL_SOF channel:0x23 frame:5280 vi_tstamp:5702837442 data:0x00000001
kworker/0:0-4 [000] … 167.664442: rtcpu_vinotify_event: tstamp:5703137556 tag:RESERVED_19 channel:0x23 frame:160 vi_tstamp:6397140128 data:0x08020070
kworker/0:0-4 [000] … 167.664443: rtcpu_vinotify_event: tstamp:5703137690 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:6397218048 data:0x10000000
kworker/0:0-4 [000] … 167.664444: rtcpu_vinotify_event: tstamp:5703137847 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:6397226400 data:0x31000071
kworker/0:0-4 [000] … 167.664447: rtos_queue_send_from_isr_failed: tstamp:5703358913 queue:0x0bcb2e38
kworker/0:0-4 [000] … 167.664448: rtos_queue_send_from_isr_failed: tstamp:5703359068 queue:0x0bcb76a0
kworker/0:0-4 [000] … 167.664449: rtos_queue_send_from_isr_failed: tstamp:5703359225 queue:0x0bcb9220
kworker/0:0-4 [000] … 167.664450: rtos_queue_send_from_isr_failed: tstamp:5703359372 queue:0x0bcb9fe0
kworker/0:0-4 [000] … 167.664451: rtos_queue_send_from_isr_failed: tstamp:5703359518 queue:0x0bcbada0
kworker/0:0-4 [000] … 167.664453: rtos_queue_send_from_isr_failed: tstamp:5703404911 queue:0x0bcb2e38
kworker/0:0-4 [000] … 167.664482: rtos_queue_send_from_isr_failed: tstamp:5703405059 queue:0x0bcb76a0
kworker/0:0-4 [000] … 167.664483: rtos_queue_send_from_isr_failed: tstamp:5703405209 queue:0x0bcb9220
kworker/0:0-4 [000] … 167.664485: rtos_queue_send_from_isr_failed: tstamp:5703405357 queue:0x0bcb9fe0
kworker/0:0-4 [000] … 167.664486: rtos_queue_send_from_isr_failed: tstamp:5703405502 queue:0x0bcbada0
kworker/0:0-4 [000] … 167.664487: rtcpu_vinotify_event: tstamp:5703406844 tag:FE channel:0x00 frame:5280 vi_tstamp:5703406003 data:0x00000024
kworker/0:0-4 [000] … 167.664488: rtcpu_vinotify_event: tstamp:5703407009 tag:CHANSEL_SHORT_FRAME channel:0x10 frame:5280 vi_tstamp:5703406003 data:0x01000000
kworker/0:0-4 [000] … 167.664489: rtcpu_vinotify_event: tstamp:5703407153 tag:ATOMP_FE channel:0x00 frame:5280 vi_tstamp:5703406003 data:0x00000000
kworker/0:0-4 [000] … 167.776396: rtos_queue_peek_from_isr_failed: tstamp:5706055867 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 167.888433: rtos_queue_peek_from_isr_failed: tstamp:5711055861 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.056361: rtos_queue_peek_from_isr_failed: tstamp:5716055860 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.224329: rtos_queue_peek_from_isr_failed: tstamp:5721055864 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.392311: rtos_queue_peek_from_isr_failed: tstamp:5726055860 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.560297: rtos_queue_peek_from_isr_failed: tstamp:5731055861 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.728275: rtos_queue_peek_from_isr_failed: tstamp:5736055861 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 168.896292: rtos_queue_peek_from_isr_failed: tstamp:5741055858 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 169.008314: rtos_queue_peek_from_isr_failed: tstamp:5746055861 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 169.176237: rtos_queue_peek_from_isr_failed: tstamp:5751055858 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 169.344271: rtos_queue_peek_from_isr_failed: tstamp:5756055860 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 169.512228: rtos_queue_peek_from_isr_failed: tstamp:5761055860 queue:0x0bcbbbb8
kworker/0:0-4 [000] … 169.680188: rtos_queue_peek_from_isr_failed: tstamp:5766055860 queue:0x0bcbbbb8

请帮忙看下如何调试这个问题? 谢谢!

hello a1ayin,

may I know what’s the actual sensor types? is there’s external ISP, why you still output raw files?

hi jerry,
Now isp output yuv422 format image. i can get image by running v4l2-ctl, but error happen when i run gst-launch-1.0 nvarguscamerasrc . here is log. could you give me some advices?

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 24.000000; Exposure Range min 36000, max 33000000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD… Exiting…
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: INVALID_SETTINGS
Additional debug info:
Argus Error Status
Execution ended after 0:00:00.175873726
Setting pipeline to PAUSED …
Setting pipeline to READY …
GST_ARGUS: Cleaning up

hello a1ayin,

that’s not correct pixel formats supported by nvarguscamerasrc.
actually, nvarguscamerasrc it only support buffers processed by internal ISP.

Hi Jerry,
thanks for your response. Now i can use follow commad to preview isp outputimage
gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1” ! nvvidconv ! “video/x-raw(memory:NVMM),format=NV12” ! nvoverlaysink sync=false

here is image.

The image looks abnormal. isp output image format as follow picture shown.

pixel_t is configure as yuv_uyvy16 in dts file. Is there a problem with this configuration?

hello a1ayin,

could you please have a quick try with nvv4l2camerasrc plugin,
for example,
$ gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! 'video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=progressive' ! nvvidconv ! nv3dsink -e

Hi jerry,
I try with nvv4l2camerasrc, no image show, here is log.
root@ying-desktop:~# gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! ‘video/x-raw(memory:NVMM), format=(string)UYVY,
width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=progressive’ ! nvvidconv ! nv3dsink -e
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
gstbasesink.c(5265): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstNv3dSink:nv3dsink0:
Failed to start
Setting pipeline to NULL …
Freeing pipeline …

I run gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1” ! nvvidconv ! “video/x-raw(memory:NVMM),format=NV12” ! nvoverlaysink sync=false , image can show., but image looks abnormal

hello a1ayin,

here’s another test approach.
you may dump the YUV frames as following.
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.yuv

and… use the 3rdparty tool, such as 7yuv to open this capture image,
there’s options to select different color formats to display the capture frames.
please check you’re able to select one of the YUV formats to output normal images.

Hi jerry,
i do as what you said, but image looks also abnormal nomatter which yuv format is selected. Is it possible to suspect that there is a problem with the isp output image itself?

hello a1ayin,

per your capture results in comment #6, I cannot tell there’s image contour, or it’s complete green.
how about the hex values, do they looks like pixel values or something else?

Hi jerry,
Image is not comple green. this image is catched today.

The original image removes the UV component and only retains the Y component, as shown below.

It can be seen from the comparison that the Y component is correct, UV componet is not correct. Do you know what factors will cause UV component abnormality?

Hi,
The correct format may be YUYV instead of UYVY. Please open the YUV file through 7yuv and select YUYV. See if the color is correct.

Hi jerry,
I try all yuv422 format,but image still looks like abnormal.

Hi,
You may dump one frame and attach it for reference.

Hi DaneLLL,
here is one frame yuv data. please help me to check it. thanks!
test.yuv (4.0 MB)

hi,
The YUV data are two GRAY8 frames. Neither YUYV or UYVY. Please run the commands and check

$ gst-launch-1.0 filesrc location= test.yuv ! videoparse format=25 width=1920 height=1080 ! multifilesink location=dump%02d.yuv
$ gst-launch-1.0 filesrc location= dump00.yuv ! videoparse format=25 width=1920 height=1080 ! videoconvert ! imagefreeze ! xvimagesink
$ gst-launch-1.0 filesrc location= dump01.yuv ! videoparse format=25 width=1920 height=1080 ! videoconvert ! imagefreeze ! xvimagesink

You would need to inspect sensor driver to output correct correct format.

Hi DaneLLL,
I have tried the command you gave me, but dump00.yuv and dump01.yuv only display the right part of the original image. Why?

Hi,
It it output of the camera sensor. It is very likely certain setting is not correct in sensor driver. Please check it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.