i.MX6 video format change from YUYV to YUY2

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

i.MX6 video format change from YUYV to YUY2

1,621 Views
pierre-olivierh
Contributor III

Hello,

I'm having a strange issue with my i.MX6 board.

My device is a Toradex Colibri i.MX6 DL, on a custom carrier board. The camera driver have been modified for our camers. Everything works fine (record, replay, live...).

When I type :

root@colibri-imx6:~# v4l2-ctl --all

Driver Info (not using libv4l2):

    Driver name   : mxc_v4l2

    Card type     :

    Bus info      :

    Driver version: 0.1.11

    Capabilities  : 0x05000005

        Video Capture

        Video Overlay

        Read/Write

        Streaming

Video input : 1 (CSI MEM: no power)

Video output: 0 (DISP3 BG)

Video Standard = 0x00000000

Format Video Capture:

    Width/Height  : 1920/1080

    Pixel Format  : 'YUYV'

    Field         : Any

    Bytes per Line: 3840

    Size Image    : 4147200

    Colorspace    : Unknown (00000000)

Format Video Overlay:

    Left/Top    : 0/0

    Width/Height: 160/160

    Field       : Any

    Chroma Key  : 0x00000000

    Global Alpha: 0x00

    Clip Count  : 0

    Clip Bitmap : No

Framebuffer Format:

    Capability    : Extern Overlay

    Flags         : Overlay Matches Capture/Output Size

    Width         : 0

    Height        : 0

    Pixel Format  : ''

Crop Capability Video Capture:

    Bounds      : Left 0, Top 0, Width 2112, Height 1120

    Default     : Left 0, Top 0, Width 1920, Height 1080

    Pixel Aspect: 0/0

Crop: Left 192, Top 40, Width 1920, Height 1080

Streaming Parameters Video Capture:

    Frames per second: 30.000 (30/1)

    Read buffers     : 0

The driver recognize the camera, and the pixel format is YUYV.

But when I launch a simple gstreamer pipeline :

root@colibri-imx6:~# gst-launch-1.0 imxv4l2videosrc ! imxg2dvideosink -v

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"

/GstPipeline:pipeline0/GstImxG2DVideoSink:imxg2dvideosink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Why my format change from YUYV to YUY2? When I force with caps, it does not work at all.

It bothers me because I need to encode in h264, and only the videoconvert plugin converts from YUY2 to I420. I would like to use an hardware plugin (g2d, ipu...).

Regards,

Pierre-Olivier Huard

Labels (1)
Tags (3)
1 Reply

703 Views
joanxie
NXP TechSupport
NXP TechSupport

yuyv is Duplicate of YUY2.

then YUY2 is YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel.