Deinterlacing does not work on Yocto Linux, based on kernel 5.10.35.
We have adv748x connected to i.MX8MP using MIPI-CSI interface.
adv748x receive NTSC signal and transmit it over CSI interface to i.MX8MP.
here is output of the media-ctl -p command
Media controller API version 5.10.35
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info
hw revision 0x0
driver version 5.10.35
Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Sink
pad9: Sink
pad10: Sink
pad11: Sink
pad12: Source
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: Source
pad14: Source
pad15: Sink
- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "mxc_isi.0":12 [ENABLED]
- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "adv748x 2-0070 txa":1 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.0":0 [ENABLED]
pad5: Source
pad6: Source
pad7: Source
- entity 31: adv748x 2-0070 txa (2 pads, 3 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
pad0: Sink
[fmt:UYVY8_2X8/720x240 field:alternate colorspace:smpte170m]
<- "adv748x 2-0070 afe":8 [ENABLED]
<- "adv748x 2-0070 hdmi":1 []
pad1: Source
[fmt:UYVY8_2X8/720x240 field:alternate colorspace:smpte170m]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
- entity 34: adv748x 2-0070 afe (9 pads, 1 link)
type V4L2 subdev subtype Decoder flags 0
device node name /dev/v4l-subdev1
pad0: Sink
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Source
[fmt:UYVY8_2X8/720x240 field:alternate colorspace:smpte170m]
-> "adv748x 2-0070 txa":0 [ENABLED]
I'm able to capture with command
gst-launch-1.0 v4l2src device=/dev/video3 ! video/x-raw,width=720,height=240 ! queue ! kmssink
but this command capture only half of image - frame with only odd or only even lines
(720x240 instead 720x480).
When i try to enable deinterlacing it fails:
# gst-launch-1.0 --gst-debug=v4l2src:5 v4l2src device=/dev/video3 ! video/x-raw,width=720,height=240,interlace-mode=interlaced ! queue ! kmssink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.745451625 776 0xaaab147314c0 DEBUG v4l2src gstv4l2src.c:515:gst_v4l2src_negotiate:<v4l2src0> caps of src: video/x-raw(format:Interlaced), format=(string)YUY2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)YUY2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)YUY2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)BGRA, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)BGRA, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)BGRA, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)BGRx, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)BGRx, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)BGRx, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)BGR, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)BGR, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)BGR, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)RGB, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)RGB, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)RGB, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)NV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)NV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)NV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw(format:Interlaced), format=(string)RGB16, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate; video/x-raw, format=(string)RGB16, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string){ progressive, interleaved }; video/x-raw(format:Interlaced), format=(string)RGB16, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 4096 ], height=(int)[ 1, 8192 ], interlace-mode=(string)alternate
New clock: GstSystemClock
0:00:00.745651375 776 0xaaab147314c0 DEBUG v4l2src gstv4l2src.c:523:gst_v4l2src_negotiate:<v4l2src0> caps of peer: video/x-raw, width=(int)720, height=(int)240, interlace-mode=(string)interlaced, format=(string){ BGRx, BGRA, RGBx, RGBA, NV12_10LE }, framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:01.078356375 776 0xaaab147314c0 DEBUG v4l2src gstv4l2src.c:529:gst_v4l2src_negotiate:<v4l2src0> intersect: EMPTY
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../git/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.333395500
Setting pipeline to NULL ...
Freeing pipeline ...
I investigated the imx8-isi-hw.c and didn't find deinterlacing implementation.
There are 2 functions mxc_isi_channel_deinterlace_init and mxc_isi_channel_set_deinterlace but first of them is empty and second is never used.
Maybe I use wrong pipeline?
Is there other way to get interlaced image from the Capture Media Device?
Is there implementation of the ISI deinterlacing?