Hi,
I am facing an issue when trying to convert a video-test signal from Bayer BGGR to I420 using the IPU: the output is a dark frame. Oddly when I work with my color camera using imxv4l2videosrc it works fine.
My configuration is:
GStreamer 1.4.4
libgstimxipu 0.12.2
The code (bash script) is as follows:
JPEG_QUALITY=70 MAX_FILES=10 CAPS1=video/x-bayer,format=bggr,width=1280,height=1024 CAPS2=video/x-raw,format=I420,width=1280,height=1024 ENCODE="imxvpuenc_mjpeg quality-factor=$JPEG_QUALITY " SINK="mmultifilesink location=/tmp/%T.jpg max-files=$MAX_FILES" GST_PIPE="$SRC ! $CAPS1 ! imxipuvideotransform ! $CAPS2 ! $ENCODE ! $SINK" gst-launch-1.0 $GST_PIPE
Thanks in advance for your help!
Boris
Hi Boris,
That is interesting, could you share the version of your imxipuvideotransform? It is at the start of the gst-inspect command. The IPU is not supposed to be able to do bayer interpolation so I wonder whether it has been implemented by software, see conversion This is why it is usually required to use an external solution such as: GStreamer OpenCL Bayer to RGB converter - RidgeRun Developer Connection
Could you also provide the output of your capture pipeline with -v option? Something like this:
gst-inspect-1.0 imxv4l2videosrc ! fakesink -v
Regards,
-Marco
GStreamer Development | Embedded Linux Development | Linux SDK
Hi Marco,
gst-inspect-1.0 imxipuvideotransform
Factory Details:
Rank none (0)
Long-name Freescale IPU video transform
Klass Filter/Converter/Video/Scaler
Description Video transformation using the IPU API
Author Carlos Rafael Giani <dv@pseudoterminal.org>
Plugin Details:
Name imxipu
Description video sink and image processing elements using the Freescale i.MX IPU
Filename /usr/lib/gstreamer-1.0/libgstimxipu.so
Version 0.12.2
License LGPL
Source module gstreamer-imx
Binary package Unknown package release
Origin URL Unknown package origin
gst-launch-1.0 imxv4l2videosrc ! fakesink -v
Setting pipeline to PAUSED ...
[mv4l2src] Exposure Time, us (int) : min=16 max=1000000 step=16 default=1000
[mv4l2src] Gain (int) : min=64 max=8128 step=1 default=64
[mv4l2src] sending limits
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
gst_imx_v4l2src_caps_for_current_setup
/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)GRAY8\,\ width\=\(int\)1280\,\ height\=\(int\)1024\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)GRAY8\,\ width\=\(int\)1280\,\ height\=\(int\)1024\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
gst_imx_v4l2_buffer_pool_set_config
gst_imx_v4l2src_decide_allocation : calling gst_query_add_allocation_pool(size = 1310720)
phys_mem_meta->phys_addr = 0x4bb00000
phys_mem_meta->phys_addr = 0x4bd00000
phys_mem_meta->phys_addr = 0x4bf00000
phys_mem_meta->phys_addr = 0x4c300000
phys_mem_meta->phys_addr = 0x4c500000
phys_mem_meta->phys_addr = 0x4c700000
[mv4l2src] Desired fps= 30.00 Real fps = 30.00
The IPU seems to be doing the demosaicing. Is there a command to check my exact IMX version as I am working on a packaged device?
Thanks for your time and support
Boris
Hi Boris,
That's odd, I am using the same plugin version but it does not list the bayer format. Did you take it from Yocto?
From your log when capturing from the camera it looks like the camera is providing GRAY8 and not bayer, this might be the reason why the IPU can process it.
You should be able to see at least what device tree is being used on the dmesg output of your board, and cat /proc/cpuinfo should give you an idea of how many cores does it have. I am not aware of a specific file system entry to get the CPU part number.
Best Regards,
-Marco
GStreamer Development | Embedded Linux Development | Linux SDK
Hi Marco and thanks for your answer,
I understand now that I was taking the IPU for a demosaicing tool, that explains a lot of weird results!
On my configuration, imxipuvideotransform supports bayer has a sink but not as a src, that is what lead me to think it was a demosaicing plugin:
gst-inspect-1.0 imxipuvideotransform
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw
format: { RGB16, BGR, RGB, BGRx, BGRA, RGBx, RGBA, ABGR, UYVY, v308, NV12, YV12, I420, Y42B, Y444, GRAY8 }
width: [ 64, 2147483647 ]
height: [ 64, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
interlace-mode: { progressive, mixed, interleaved }
SINK template: 'sink'
Availability: Always
Capabilities:
video/x-raw
format: { RGB16, BGR, RGB, BGRx, BGRA, RGBx, RGBA, ABGR, UYVY, v308, NV12, YV12, I420, Y42B, Y444, GRAY8 }
width: [ 64, 2147483647 ]
height: [ 64, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
interlace-mode: { progressive, mixed, interleaved }
video/x-bayer
format: { bggr, rggb, gbrg, grbg }
width: [ 64, 2147483647 ]
height: [ 64, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
Also, my camera outputs a bayer stream so I am very confuse how I can get this pipe to work just by changing the source!
gst-inspect-1.0 imxv4l2videosrc
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw
video/x-bayer
format: { bggr, gbrg, grbg, rggb }
Boris
Hi Boris
the plugin imxipuvideotransform is gstreamer-imx supported by community,
issues can be posted on
Issues · Freescale/gstreamer-imx · GitHub
plugin that seems make the same thing is imxvideoconvert_ipu, provided by NXP gst1.0-plugins,
its usage can be found in i.MX_Linux_User's_Guide.pdf document on link
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------