ADV7282-m black and white color issue video output

Hi,

I am using Jetpack 5.1.2. I got video ouput from ADV7282-m chip. But In video output, there is no color(only black and white) and grey line also there. How to debug this?

I have attached the output of my video node responses.

v4l2-ctl -d /dev/video0 --get-fmt-video
Format Video Capture:
Width/Height : 720/507
Pixel Format : ‘UYVY’ (UYVY 4:2:2)
Field : None
Bytes per Line : 1440
Size Image : 730080
Colorspace : SMPTE 170M
Transfer Function : Rec. 709
YCbCr/HSV Encoding: ITU-R 601
Quantization : Limited Range
Flags :

Driver name      : tegra-video
Card type        : vi-output, adv7282 9-0021
Bus info         : platform:tegra-capture-vi:0
Driver version   : 5.10.120
Capabilities     : 0x84200001
	Video Capture
	Streaming
	Extended Pix Format
	Device Capabilities
Device Caps      : 0x04200001
	Video Capture
	Streaming
	Extended Pix Format

Media Driver Info:
Driver name : tegra-camrtc-ca
Model : NVIDIA Tegra Video Input Device
Serial :
Bus info :
Media version : 5.10.120
Hardware revision: 0x00000003 (3)
Driver version : 5.10.120
Interface Info:
ID : 0x03000008
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : vi-output, adv7282 9-0021
Function : V4L2 I/O
Pad 0x01000007 : 0: Sink
Link 0x0200000c: from remote pad 0x1000003 of entity ‘13e40000.host1x:nvcsi@15a00000-’: Data, Enabled
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 720/507
Pixel Format : ‘UYVY’ (UYVY 4:2:2)
Field : None
Bytes per Line : 1440
Size Image : 730080
Colorspace : SMPTE 170M
Transfer Function : Rec. 709
YCbCr/HSV Encoding: ITU-R 601
Quantization : Limited Range
Flags :

User Controls

                 brightness 0x00980900 (int)    : min=-128 max=127 step=1 default=0 value=0 flags=slider
                   contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                 saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                        hue 0x00980903 (int)    : min=-127 max=128 step=1 default=0 value=0 flags=slider
             fast_switching 0x00981970 (bool)   : default=0 value=0

Camera Controls

       sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
     sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
  sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
			0: 0 (0x0)
			1: 1 (0x1)
            override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
			0: 0 (0x0)
			1: 1 (0x1)
               height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                 size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
			0: 1 (0x1)
			1: 65536 (0x10000)
			2: 131072 (0x20000)
           write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
   sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
    sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
  sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
          sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
           low_latency_mode 0x009a206d (bool)   : default=0 value=0
           preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
               sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=30 flags=read-only

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'UYVY' (UYVY 4:2:2)

I have attached the picture of my video.

Regards,
Kamalesh

Set the alignment to 256 by below command to try.

vl42-ctl -c preferred_stride=1536

Hi Shane,

Thank you very much for your reply. But, Is there any element for color?

I am getting black and white, there is no other colors.

Regards,
Kamalesh

Dump the frame by v4l2-ctl to check.
If the same that could be the source only output Y data.

Thanks

Hi,

How to dump and check my video data using v4l2?
Could you please advise us?

Use below command to save to file and use 7yuv to check it.

v4l2-ctl --set-fmt-video=width=720,height=507 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw -d /dev/video0 

Hi,

I have received 0 bytes of raw video file from this command. Why it is?

Regards,
Kamalesh

Add --stream-skip=100 to try.

I have tried. Now also same issue.

Hi,

For your reference, I have attached my dmesg while fetching video using gstreamer. I have seen discarding frame error.

Is this might be a issue for color changing?
I am using this below pipeline to fetch video.
GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY ! queue ! videoconvert ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
0:00:00.478560896 2618 0xaaab1f0935e0 WARN v4l2src gstv4l2src.c:914:gst_v4l2src_create: Timestamp does not correlate with any clock, ignoring driver timestamps
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:20.048347659
Setting pipeline to NULL …
Freeing pipeline …

Dmesg_ADV.txt (76.5 KB)

Could you please help me to identify the issue?

Regards,
Kamalesh

Apply this patch to try.

0001-vi5-continue-captures-even-after-corr-errors.patch (2.3 KB)

Hi Shane,

I already applied this patch. Still same condition.

Regards,
Kamalesh

Hi Shane,

Please give the explanation for below queries:
I have given the PAL Video resolution of 742x582 to ADV7282-m. But I have seen the video node creation for 720x507. This is NTSC resolution right?
So, driver loaded and created the node for NTSC, not for PAL?

v4l2-ctl -d /dev/video0 --all

Driver Info:
Driver name : tegra-video
Card type : vi-output, adv7282 9-0021
Bus info : platform:tegra-capture-vi:0
Driver version : 5.10.120
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : tegra-camrtc-ca
Model : NVIDIA Tegra Video Input Device
Serial :
Bus info :
Media version : 5.10.120
Hardware revision: 0x00000003 (3)
Driver version : 5.10.120
Interface Info:
ID : 0x03000008
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : vi-output, adv7282 9-0021
Function : V4L2 I/O
Pad 0x01000007 : 0: Sink
Link 0x0200000c: from remote pad 0x1000003 of entity ‘13e40000.host1x:nvcsi@15a00000-’: Data, Enabled
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 720/507
Pixel Format : ‘UYVY’ (UYVY 4:2:2)
Field : None
Bytes per Line : 1536
Size Image : 778752
Colorspace : SMPTE 170M
Transfer Function : Rec. 709
YCbCr/HSV Encoding: ITU-R 601
Quantization : Limited Range
Flags :

User Controls

                 brightness 0x00980900 (int)    : min=-128 max=127 step=1 default=0 value=0 flags=slider
                   contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                 saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=128 flags=slider
                        hue 0x00980903 (int)    : min=-127 max=128 step=1 default=0 value=0 flags=slider
             fast_switching 0x00981970 (bool)   : default=0 value=0

Camera Controls

       sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
     sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
  sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
			0: 0 (0x0)
			1: 1 (0x1)
            override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
			0: 0 (0x0)
			1: 1 (0x1)
               height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                 size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
			0: 1 (0x1)
			1: 65536 (0x10000)
			2: 131072 (0x20000)
           write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
   sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
    sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
  sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
          sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
           low_latency_mode 0x009a206d (bool)   : default=0 value=0
           preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=1536
               sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=30 flags=read-only

Is this the reason behind this frame loss and color loss?

Thanks.

Regards,
Kamalesh

For this you need to check the ADV7282 driver. Jetson only receive the data output from the sensor. The sensor should report correct size and format.

Hi,

Update:-
After changing the driver configuration, we have successfully received video.

Thanks for your support.

Regards,
Kamalesh

1 Like

Could you share your configuration to help forum users.

Thanks

Hi,

Yes, I have intialized(init_function) my driver file as PAL. Earlier, It was configured as NTSC.

Thanks.

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