Format conversion RAW12 to IYUV, DriveOS

We are trying to do format conversion using NvMedia application “nvmedia/img_2d” from RAW12 to IYUV or YV12 format, that is necessary for video encoding(vid_enc).

./nvmimg_2d -cf sample.cfg

source image properties in sample.cfg is modified.

  1. srcSurfType = 3#RAW
  2. srcDataType = 3#Packed

Error Log:
sCheckParamsOfInternalImageFill: Warning: Using Obsolete Surface type
Module_id 21 Severity 2 : sCheckParamsOfInternalImageFill
Module_id 21 Severity 2 : : Invalid surface format type 99999
Module_id 21 Severity 2 : sNvMImgFillNvSciBufAttrs
Module_id 21 Severity 2 : : Invalid argument provided

Module_id 21 Severity 2 : NvMediaImageFillNvSciBufAttrs
Module_id 21 Severity 2 : : Failed to fill NvSciBuf attributes

*nvmedia: ERROR: NvMediaImageCreateUsingNvScibuf: ImageFillSciBufAttrs failed. Error: 0 *
nvmedia: ERROR: Unable to create image
nvmedia: ERROR: main: Unable to create buffer pool

Is there support for format conversion from RAW surface type?

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

Dear @sandiprmlc0,
May I know the inputfile parameter? May I know your complete use case? Is it like you want to encode the live camera data in some format? If so, may I know the camera module details? or You have RAW data captured separately and trying to encode via application?

Hi @SivaRamaKrishnaNV ,

Will share the input file parameter shortly.

Yes the use is live image capture, encoding and streaming (to a network port) from Sekonix SF3324 camera modules.

So, essentially the output pixel format from the live capture module should match the input pixel format for the video encoder (H.265 preferably) . Any suggestions how to proceed ?


Dear @SivaRamaKrishnaNV ,

Please find the modified config file used with img_2d application for format conversion.
sample_modified.cfg (5.9 KB)

From our AGX + SF3324 camera setup, we could to do live camera capture to RAW12 format. Then we need to do YUV format conversion, which could be used by encode application(vid_enc).

(Sekonix)RAW12 → HEVC enc → stream.

Please share your inputs.

Thanks in advance.

Dear @sandiprmlc0,
RAW12 to YUV conversion is not supported by VIC engine. Hence img_2d sample can not perform the required conversion.