What are available options for ISP on IMX95

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

What are available options for ISP on IMX95

876 Views
Rathore-pioneer
Contributor II

Hi,

I am using IMX95 EVK with ox03c10 camera setup.
I am running 3 cameras with Maxim serdes I want to scale down the video using hardware accelerator.
This is the working camera pipeline for recording a file:

gst-launch-1.0 -v -e libcamerasrc camera-name="/base/soc/bus@42000000/i2c@42530000/max96724@27/i2c-mux/i2c@0/mx95mbcam@40" src::stream-role=view-finder ! video/x-raw,format=NV16,width=1920,height=1280,framerate=30/1 ! videoconvert ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=/tmp/cam0_processed.mp4

From this pipeline, I wanted to remove dependency from cpu and wanted to use only the hardware accelerator.
Please suggest the changes.

0 Kudos
Reply
5 Replies

864 Views
Rathore-pioneer
Contributor II

Are there any gst plugins available for encoding, decoding, and scaling?

0 Kudos
Reply

845 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

This is the command advised for running multiple ox03c10 cameras.

gst-launch-1.0 imxcompositor_g2d name=comp \
> sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \
> sink_1::xpos=0 sink_1::ypos=480 sink_1::width=640 sink_1::height=480 \
> sink_2::xpos=640 sink_2::ypos=0 sink_2::width=640 sink_2::height=480 \
> sink_3::xpos=640 sink_3::ypos=480 sink_3::width=640 sink_3::height=480 ! \
> video/x-raw,format=BGRA ! autovideosink \
> v4l2src device=/dev/video15 ! video/x-raw,format=YUY2,framerate=30/1,width=1920,height=1280  !  comp.sink_0 \
> v4l2src device=/dev/video22 ! video/x-raw,format=YUY2,framerate=30/1,width=1920,height=1280  !  comp.sink_1 \
> v4l2src device=/dev/video28 ! video/x-raw,format=YUY2,framerate=30/1,width=1920,height=1280  !  comp.sink_2 \
> v4l2src device=/dev/video34 ! video/x-raw,format=YUY2,framerate=30/1,width=1920,height=1280  !  comp.sink_3

Make sure to use the Neo ISP library and review the GST plugins in Linux Users Guide. It advises disabling PipeWire.

systemctl --user stop pipewire ; systemctl --user mask pipewire

Regards

0 Kudos
Reply

832 Views
Rathore-pioneer
Contributor II

Currently, I connected only 3 cameras without a display.
I just need to store the camera feed in the file.
Exiting pipe line is not working for me.
Also, how will I get to know which video node is for which camera?

0 Kudos
Reply

771 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

For the plugins, I found in Release Notes the downscale, encode and decode plugins.

• imxvideoconvert_g2d: GPU2D-based video convert plugin.
• imxvideoconvert_ipu: IPU-based video convert plugin.
• imxvideoconvert_pxp: PXP-based video convert plugin.
• imxvideoconvert_ocl: OpenCL-based video convert plugin.
• autovideoconvert: select the i.MX hardware based video convert plugins or other
video convert plugins according to the input and output format.
• v4l2convert: V4L2 memory-to-memory based convert plugin.

Note:
• For imxvideoconvert_ocl, rotation is not supported currently. CSC, deinterlace,
downscale, dewarp, video crop, and color range convertion are supported.
• For v4l2convert, it is automatically registered on the platforms with ISI memory-to-
memory supported.

• v4l2h264enc: VPU-based AVC/H.264 video encoder
• v4l2h265enc: VPU-based HEVC video encoder
• v4l2jpegenc: V4L2 JPEG encoder

For the camera topology, you can use the following commands to print the topology and identify the cameras.

−media-ctl  -d /dev/media8  --print-dot > media8.dot     (in i.MX95 EVK target board)

−dot  -Tpng media0.dot  -o  media0-ap1302.png   (in ubuntu PC)

Regards,

0 Kudos
Reply

747 Views
Rathore-pioneer
Contributor II

Here is the camera topology from my imx95 evk.

media8-ap1302.png

I can run the camera using this pipeline with libcamerasrc:

gst-launch-1.0 -e libcamerasrc camera-name="/base/soc/bus@42000000/i2c@42530000/max96724@27/i2c-mux/i2c@0/mx95mbcam@40" src::stream-role=view-finder ! video/x-raw,format=NV12,width=1920,height=1280,framerate=30/1 ! videoconvert ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=/tmp/cam0_processed.mp4

How can I run my camera using v4l2src? Also, what is the plugin for scaling down the video without cropping the view to 1920*382 using a hardware accelerator?



0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2304624%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWhat%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2304624%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20using%20IMX95%20EVK%20with%20ox03c10%20camera%20setup.%3CBR%20%2F%3EI%20am%20running%203%20cameras%20with%20Maxim%20serdes%20I%20want%20to%20scale%20down%20the%20video%20using%20hardware%20accelerator.%3CBR%20%2F%3EThis%20is%20the%20working%20camera%20pipeline%20for%20recording%20a%20file%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3Egst-launch-1.0%20-v%20-e%20libcamerasrc%20camera-name%3D%22%2Fbase%2Fsoc%2Fbus%4042000000%2Fi2c%4042530000%2Fmax96724%4027%2Fi2c-mux%2Fi2c%400%2Fmx95mbcam%4040%22%20src%3A%3Astream-role%3Dview-finder%20!%20video%2Fx-raw%2Cformat%3DNV16%2Cwidth%3D1920%2Cheight%3D1280%2Cframerate%3D30%2F1%20!%20videoconvert%20!%20v4l2h264enc%20!%20h264parse%20!%20mp4mux%20!%20filesink%20location%3D%2Ftmp%2Fcam0_processed.mp4%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3EFrom%20this%20pipeline%2C%20I%20wanted%20to%20remove%20dependency%20from%20cpu%20and%20wanted%20to%20use%20only%20the%20hardware%20accelerator.%3CBR%20%2F%3EPlease%20suggest%20the%20changes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2304992%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20What%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2304992%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECurrently%2C%20I%20connected%20only%203%20cameras%20without%20a%20display.%3CBR%20%2F%3EI%20just%20need%20to%20store%20the%20camera%20feed%20in%20the%20file.%3CBR%20%2F%3EExiting%20pipe%20line%20is%20not%20working%20for%20me.%3CBR%20%2F%3EAlso%2C%20how%20will%20I%20get%20to%20know%20which%20video%20node%20is%20for%20which%20camera%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2304755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20What%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2304755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20interest%20in%20NXP%20Semiconductor%20products%2C%3C%2FP%3E%0A%3CP%3EThis%20is%20the%20command%20advised%20for%20running%20multiple%26nbsp%3Box03c10%20cameras.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Egst-launch-1.0%20imxcompositor_g2d%20name%3Dcomp%20%5C%0A%26gt%3B%20sink_0%3A%3Axpos%3D0%20sink_0%3A%3Aypos%3D0%20sink_0%3A%3Awidth%3D640%20sink_0%3A%3Aheight%3D480%20%5C%0A%26gt%3B%20sink_1%3A%3Axpos%3D0%20sink_1%3A%3Aypos%3D480%20sink_1%3A%3Awidth%3D640%20sink_1%3A%3Aheight%3D480%20%5C%0A%26gt%3B%20sink_2%3A%3Axpos%3D640%20sink_2%3A%3Aypos%3D0%20sink_2%3A%3Awidth%3D640%20sink_2%3A%3Aheight%3D480%20%5C%0A%26gt%3B%20sink_3%3A%3Axpos%3D640%20sink_3%3A%3Aypos%3D480%20sink_3%3A%3Awidth%3D640%20sink_3%3A%3Aheight%3D480%20!%20%5C%0A%26gt%3B%20video%2Fx-raw%2Cformat%3DBGRA%20!%20autovideosink%20%5C%0A%26gt%3B%20v4l2src%20device%3D%2Fdev%2Fvideo15%20!%20video%2Fx-raw%2Cformat%3DYUY2%2Cframerate%3D30%2F1%2Cwidth%3D1920%2Cheight%3D1280%20%20!%20%20comp.sink_0%20%5C%0A%26gt%3B%20v4l2src%20device%3D%2Fdev%2Fvideo22%20!%20video%2Fx-raw%2Cformat%3DYUY2%2Cframerate%3D30%2F1%2Cwidth%3D1920%2Cheight%3D1280%20%20!%20%20comp.sink_1%20%5C%0A%26gt%3B%20v4l2src%20device%3D%2Fdev%2Fvideo28%20!%20video%2Fx-raw%2Cformat%3DYUY2%2Cframerate%3D30%2F1%2Cwidth%3D1920%2Cheight%3D1280%20%20!%20%20comp.sink_2%20%5C%0A%26gt%3B%20v4l2src%20device%3D%2Fdev%2Fvideo34%20!%20video%2Fx-raw%2Cformat%3DYUY2%2Cframerate%3D30%2F1%2Cwidth%3D1920%2Cheight%3D1280%20%20!%20%20comp.sink_3%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EMake%20sure%20to%20use%20the%20Neo%20ISP%20library%20and%20review%20the%20GST%20plugins%20in%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FUG10163.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ELinux%20Users%20Guide%3C%2FA%3E.%20It%20advises%20disabling%26nbsp%3BPipeWire.%3C%2FP%3E%0A%3CP%3Esystemctl%20--user%20stop%20pipewire%20%3B%20systemctl%20--user%20mask%20pipewire%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2304639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20What%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2304639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAre%20there%20any%20gst%20plugins%20available%20for%20encoding%2C%20decoding%2C%20and%20scaling%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2310242%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20What%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2310242%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EFor%20the%20plugins%2C%20I%20found%20in%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Frelease-note%2FRN00210.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ERelease%20Notes%3C%2FA%3E%20the%20downscale%2C%20encode%20and%20decode%20plugins.%3C%2FP%3E%0A%3CP%3E%E2%80%A2%20imxvideoconvert_g2d%3A%20GPU2D-based%20video%20convert%20plugin.%3CBR%20%2F%3E%E2%80%A2%20imxvideoconvert_ipu%3A%20IPU-based%20video%20convert%20plugin.%3CBR%20%2F%3E%E2%80%A2%20imxvideoconvert_pxp%3A%20PXP-based%20video%20convert%20plugin.%3CBR%20%2F%3E%E2%80%A2%20imxvideoconvert_ocl%3A%20OpenCL-based%20video%20convert%20plugin.%3CBR%20%2F%3E%E2%80%A2%20autovideoconvert%3A%20select%20the%20i.MX%20hardware%20based%20video%20convert%20plugins%20or%20other%3CBR%20%2F%3Evideo%20convert%20plugins%20according%20to%20the%20input%20and%20output%20format.%3CBR%20%2F%3E%E2%80%A2%20v4l2convert%3A%20V4L2%20memory-to-memory%20based%20convert%20plugin.%3C%2FP%3E%0A%3CP%3ENote%3A%3CBR%20%2F%3E%E2%80%A2%20For%20imxvideoconvert_ocl%2C%20rotation%20is%20not%20supported%20currently.%20CSC%2C%20deinterlace%2C%3CBR%20%2F%3Edownscale%2C%20dewarp%2C%20video%20crop%2C%20and%20color%20range%20convertion%20are%20supported.%3CBR%20%2F%3E%E2%80%A2%20For%20v4l2convert%2C%20it%20is%20automatically%20registered%20on%20the%20platforms%20with%20ISI%20memory-to-%3CBR%20%2F%3Ememory%20supported.%3C%2FP%3E%0A%3CP%3E%E2%80%A2%20v4l2h264enc%3A%20VPU-based%20AVC%2FH.264%20video%20encoder%3CBR%20%2F%3E%E2%80%A2%20v4l2h265enc%3A%20VPU-based%20HEVC%20video%20encoder%3CBR%20%2F%3E%E2%80%A2%20v4l2jpegenc%3A%20V4L2%20JPEG%20encoder%3C%2FP%3E%0A%3CP%3EFor%20the%20camera%20topology%2C%20you%20can%20use%20the%20following%20commands%20to%20print%20the%20topology%20and%20identify%20the%20cameras.%3C%2FP%3E%0A%3CP%3E%E2%88%92media-ctl%26nbsp%3B%20-d%20%2Fdev%2Fmedia8%26nbsp%3B%20--print-dot%20%26gt%3B%20media8.dot%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(in%20i.MX95%20EVK%20target%20board)%3C%2FP%3E%0A%3CP%3E%E2%88%92dot%26nbsp%3B%20-Tpng%20media0.dot%26nbsp%3B%20-o%26nbsp%3B%20media0-ap1302.png%26nbsp%3B%26nbsp%3B%20(in%20ubuntu%20PC)%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2312652%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20What%20are%20available%20options%20for%20ISP%20on%20IMX95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2312652%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHere%20is%20the%20camera%20topology%20from%20my%20imx95%20evk.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22media8-ap1302.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22media8-ap1302.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F375616i7BFB71FDD44FCA6D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22media8-ap1302.png%22%20alt%3D%22media8-ap1302.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20can%20run%20the%20camera%20using%20this%20pipeline%20with%20libcamerasrc%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3Egst-launch-1.0%20-e%20libcamerasrc%20camera-name%3D%22%2Fbase%2Fsoc%2Fbus%4042000000%2Fi2c%4042530000%2Fmax96724%4027%2Fi2c-mux%2Fi2c%400%2Fmx95mbcam%4040%22%20src%3A%3Astream-role%3Dview-finder%20!%20video%2Fx-raw%2Cformat%3DNV12%2Cwidth%3D1920%2Cheight%3D1280%2Cframerate%3D30%2F1%20!%20videoconvert%20!%20v4l2h264enc%20!%20h264parse%20!%20mp4mux%20!%20filesink%20location%3D%2Ftmp%2Fcam0_processed.mp4%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3EHow%20can%20I%20run%20my%20camera%20using%20v4l2src%3F%20Also%2C%20what%20is%20the%20plugin%20for%20scaling%20down%20the%20video%20without%20cropping%20the%20view%20to%201920*382%20using%20a%20hardware%20accelerator%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-BODY%3E