sorry.shao:
UYVY 4:2:2
设备树已经修改,但是出图依然为绿色。
dts.tar.gz (40 KB)
gst-launch-1.0 v4l2src device=/dev/video7 ! 'video/x-raw, format=UYVY, width=1920, height=1080, framerate=30/1' ! xvimagesink
如果是格式YUY2会报错,但是改成UYVY就不会报错,但是依然为绿色
gst-launch-1.0 v4l2src device=/dev/video7 ! 'video/x-raw, format=YUY2, width=1920, height=1080, framerate=30/1' ! xvimagesink
$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'UYVY' (UYVY 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[1]: 'NV16' (Y/CbCr 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[2]: 'UYVY' (UYVY 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
ubuntu@ubuntu-desktop:~$ v4l2-ctl --list-formats-ext -d /dev/video7
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'UYVY' (UYVY 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[1]: 'NV16' (Y/CbCr 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[2]: 'UYVY' (UYVY 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
hello sorry.shao,
according to post #9 ,
your sensor’s actual output format should be YUYV per 3rdparty viewer configuration.
sensor capability shows with incorrect format types.
please update pixel_phase property to match your hardware settings.
sorry.shao:
YUY2
那如果我的摄像头是YUYV这个格式,dts需要怎么配置呢,配置成"yuyv"吗
hello sorry.shao,
please give it a try with below DT configuration.
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "yuyv";
设备树改成如上,出图依然为绿色的
gst-launch-1.0 v4l2src device=/dev/video7 ! 'video/x-raw, format=YUY2, width=1920, height=1080, framerate=30/1' ! xvimagesink
v4l2-ctl --list-formats-ext -d /dev/video7
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
ubuntu@ubuntu-desktop:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
我发现我们从jp5,jp6到jp7全都有这个问题
找摄像头厂家也确认是yuyv格式的
hello sorry.shao,
it may still caused by actual byte order differs from advertised fourcc.
it’s pixel_phase determines the packed ordering, the driver side maps them to different fourccs.
see-also.. $public_sources/kernel-src/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c
on the other hand, you may give it a try by forcing software RGB conversion.
for instance,
$ gst-launch-1.0 -v v4l2src device=/dev/video7 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=BGRx ! ximagesink sync=false
JerryChang:
gst-launch-1.0 -v v4l2src device=/dev/video7 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=BGRx ! ximagesink sync=false
用这个命令还是绿的
public_sources/kernel-src/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c 这个代码我看yuv_yuyv16已经加进去了,这个有没有什么debug方法或者文档,我们试着去改一下呢
hello sorry.shao,
is it serializer/deserializer output configuration differs between links?
please double check with sensor vendor for confirmation.