imx8mp ISP using gstreamer resolution seems to be limited to 3840x2160

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp ISP using gstreamer resolution seems to be limited to 3840x2160

585 Views
malik_cisse
Senior Contributor I

Hi,

I am using imx8mp with latest Kirkstone yocto bsp release and my image sensor supports 4056x3040 resolution.

when running gstreamer I observe that anything above 4K (3840x2160 pixel) will not work:

This works fine (ISP does a downscaling automatically):

gst-launch-1.0 v4l2src device=/dev/v4l/by-path/platform-vvcam-video.0-video-index0 ! video/x-raw,width=3840,height=2160 ! imxvideoconvert_g2d rotation=3 ! video/x-raw, width=480, height=800 ! kmssink can-scale=false sync=false

 

whereas this fails:
gst-launch-1.0 v4l2src device=/dev/v4l/by-path/platform-vvcam-video.0-video-index0 ! video/x-raw,width=4056,height=3040 ! imxvideoconvert_g2d rotation=3 ! video/x-raw, width=480, height=800 ! kmssink can-scale=false sync=false

The error code:
0:00:00.387021875 1295 0xaaaafe204d20 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:00.387095375 1295 0xaaaafe204d20 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)

Interestingly, using v4l2 API standalone will work:

v4l2-ctl --device /dev/video1 --stream-mmap --stream-to=frame.yuv --stream-count=1

 

My conclusion is that gstreamer (version 1.20.0) has some internal resolution limitations

Did anyone manage to get higher resolutions work with gstreamer?

Thx

 

Labels (1)
0 Kudos
Reply
1 Reply

551 Views
malik_cisse
Senior Contributor I

I made some progress on this.
4048x3040 resolution would work.
I observed that width should be divisible by 16:

root@amrum-fumu2-imx8mp-3:~# v4l2-ctl -d /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
 
[0]: 'YUYV' (YUYV 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[1]: 'NV12' (Y/CbCr 4:2:0)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[2]: 'NV16' (Y/CbCr 4:2:2)
Size: Stepwise 176x144 - 4096x3072 with step 16/8
[3]: 'RG12' (12-bit Bayer RGRG/GBGB)
Size: Stepwise 176x144 - 4096x3072 with step 16/8

It seems to me this is due to the fact that Dewarp works with 16x16 pixel macroblocks.
But then I don't quite understand why height can be multiple of 8 pixels (step 16/8)?
Maybe someone can spread morte light on this.

Also, if I disable Dewarp in the json config file, same restrictions apply and my image is still passed through Dewarp engine.
0 Kudos
Reply