cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
272 Views
Registered: ‎03-31-2020

Mem2Mem V4L2VideoConvert Uncertain or not enough buffers

Jump to solution

Hi,

I am trying the V4L2 driver with mem2mem mapping between FB RD and FB WR. My aim is at "grabbing" the frame after decoding from the VCU IP.

The system is as in the attached picture, which is simply a FB RD and FB WR connected directly. But I could not find the frame as expected. I think that I may not configure the driver correctly...

root@xilinx-zcu104-2019_1:~# v4l2-ctl -d /dev/video2 --set-fmt-video=width=1920,height=1080,pixelformat='NV12'
root@xilinx-zcu104-2019_1:~# gst-launch-1.0  --gst-debug-level=2  filesrc location=/media/card/video_bbb.mp4 ! qtdemux ! h264parse ! video/x-h264 ! omxh264dec ! queue max-size-bytes=10 ! v4l2video2convert disable_passthrough=1 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! filesink location="/home/output_0_1920x1080.yuv"
With ILA, I can see some data comes from FB RD to FB WR, but the gstreamer stucks and produce no output:0:00:00.429075040  2773   0x55aed2c150 WARN                 basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<filesrc0> pad not activated yet
Pipeline is PREROLLING ...
0:00:00.430888380  2773   0x55aed7d740 WARN                 qtdemux qtdemux_types.c:233:qtdemux_type_get: unknown QuickTime node type iods
0:00:00.430990850  2773   0x55aed7d740 WARN                 qtdemux qtdemux_types.c:233:qtdemux_type_get: unknown QuickTime node type ac-3
0:00:00.431043690  2773   0x55aed7d740 WARN                 qtdemux qtdemux_types.c:233:qtdemux_type_get: unknown QuickTime node type .com
0:00:00.764414870  2773   0x55aed7d740 WARN                 qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.764907520  2773   0x55aed7d740 WARN                 qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
0:00:00.765010470  2773   0x55aed7d740 WARN                 qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 3
0:00:00.765245010  2773   0x55aed7d740 WARN                 basesrc gstbasesrc.c:2445:gst_base_src_update_length:<filesrc0> processing at or past EOS
Redistribute latency...
0:00:00.821482440  2773   0x7fa0041290 WARN                GST_PADS gstpad.c:4226:gst_pad_peer_query:<omxh264dec-omxh264dec0:src> could not send sticky events
0:00:00.821586200  2773   0x7fa0041290 WARN            videodecoder gstvideodecoder.c:3867:gst_video_decoder_negotiate_pool:<omxh264dec-omxh264dec0> Subclass failed to decide allocation
0:00:00.827142380  2773   0x55aed7dfc0 WARN          v4l2bufferpool gstv4l2bufferpool.c:807:gst_v4l2_buffer_pool_start:<v4l2video2convert0:pool:src> Uncertain or not enough buffers, enabling copy threshold

This is the dtsi

video_m2m {
				compatible = "xlnx,mem2mem";
				dmas = <&ctrlfbrd 0>, <&ctrlfbwr 0>;
				dma-names = "tx", "rx";
	};
ctrlfbwr: fbwr@0xa2000000 {
		compatible = "xlnx,v-frmbuf-wr-2.1", "xlnx,axi-frmbuf-wr-v2.1";
		#dma-cells = <1>;
		clock-names = "ap_clk";
		clocks = <&misc_clk_0>;
		interrupt-parent = <&gic>;
	        interrupts = <0 91 4>;
		reg = <0x0 0xa2000000 0x0 0x10000>;
                reset-gpios = <&gpio 82 1>;
		xlnx,dma-addr-width = <32>;
		xlnx,dma-align = <32>;
		xlnx,max-height = <2160>;
		xlnx,max-width = <3840>;
		xlnx,pixels-per-clock = <2>;
		xlnx,s-axi-ctrl-addr-width = <0x7>;
		xlnx,s-axi-ctrl-data-width = <0x20>;
		xlnx,vid-formats = "rgb888", "bgr888", "nv16", "yuyv", "nv12";
		xlnx,video-width = <8>;
	};
ctrlfbrd: fbrd@0xa2010000 {
		compatible = "xlnx,v-frmbuf-rd-2.1", "xlnx,axi-frmbuf-rd-v2.1";
		#dma-cells = <1>;
		clock-names = "ap_clk";
		clocks = <&misc_clk_0>;
		interrupt-parent = <&gic>;
	        interrupts = <0 90 4>;
		reg = <0x0 0xa2010000 0x0 0x10000>;
                reset-gpios = <&gpio 81 1>;
		xlnx,dma-addr-width = <32>;
		xlnx,dma-align = <32>;
		xlnx,max-height = <2160>;
		xlnx,max-width = <3840>;
		xlnx,pixels-per-clock = <2>;
		xlnx,s-axi-ctrl-addr-width = <0x7>;
		xlnx,s-axi-ctrl-data-width = <0x20>;
		xlnx,vid-formats = "rgb888", "bgr888", "nv16", "yuyv", "nv12";
		xlnx,video-width = <8>;
	};

Screenshot from 2020-06-20 09-02-58.png

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
180 Views
Registered: ‎03-31-2020

I got it worked by checking the supported colorspace of the FB (set in vivado) and the gst command.

View solution in original post

0 Kudos
1 Reply
Highlighted
Adventurer
Adventurer
181 Views
Registered: ‎03-31-2020

I got it worked by checking the supported colorspace of the FB (set in vivado) and the gst command.

View solution in original post

0 Kudos