Linux IOFST API fail at magical input image size

One example is 688x464, I’ve tried several different images with this size, all fail:

nvidia@tegra-ubuntu:/$ nvmedia_imageofst -res 688x464 -f /tmp/input.yuv -o xxx -frames 2 -etype 3 -v 3 -forward_ref

nvmedia: main: Creating NvMedia device
nvmedia: main: Openning /tmp/input.yuv for input
nvmedia: main: Input file length: 957696
nvmedia: main: Source File Resolution: 688x464 (Default size: 688x464 macroblocks: 43x29)
nvmedia: main: Creating image surfaces
nvmedia: main: Creating bit_depth = 8
nvmedia: main: Creating mv image surface
nvmedia: main: Creating IOFST device
nvmedia: main: Setting IOFST initialization params
nvmedia: main: Reading First image frame
nvmedia: main: Reading image frame: 1
nvmedia: main: IOFST process frame #1
nvmedia: Start IOFST Processing
nvmedia: IOFST successfully submitted
nvmedia: main: NvMediaImageWaitForCompletion
NvMediaImageGetStatus: Image operation failed. Engine-specific error code: 0x1
, Detailed engine status: 0x0
nvmedia: ERROR: main: Engine returned error 7.
nvmedia: main: Destroying IOFST Device
nvmedia: main: Destroying image surface: 0
nvmedia: main: Destroying image surface: 1
nvmedia: main: Destroying mv surface
nvmedia: main: Destroying device
total processed frames: 1
total failures: 1

Hi shengliang.xu,

Could you provide the file for our reproducing? Thanks!

Hi VickNV,

As I said, any image with this magic size should reproduce it.

But nevertheless, I’ve attached two images here.

my xavier system:

Linux tegra-ubuntu 4.14.102-rt53-tegra #1 SMP PREEMPT RT Fri Sep 20 16:23:45 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

tsukuba_688x464_right.png
tsukuba_688x464_left.png
tsukuba_688x464.yuv.tar.gz (486 KB)

I believe you and we have an internal similar bug to track this on linux also (since you filed one for QNX). Actually I just want to have your input.yuv so let someone able to reproduce it quickly when he has time.

If you can attach “input.yuv” here, it will be appreciate!

sure, no problem.

yuv.tar.gz attached above, the forum does not allow me attaching .yuv files

We can reproduce this issue with your file on DRIVE Software 10.0 but it’s working fine on our main branch.
So the fix will be in the next release. Thanks!

I met the same issue on qnx device. When will next release be published? Is it possible sending us a patch to fix this issue currently?

The error detail is as below

nvmedia: main: Creating NvMedia device
nvmedia: main: Source File Resolution: 1280x1080 (Default size: 1280x1088 macroblocks: 80x68 outRes:320x270)
nvmedia: main: Creating image surfaces
nvmedia: main: Creating mv image surface
nvmedia: main: Creating IOFST device
nvmedia: main: Setting IOFST initialization params
nvmedia: main: Reading First image frame
nvmedia: main: Reading image frame
nvmedia: main: IOFST process frame
nvmedia: Start IOFST Processing
[NvMediaIOFSTProcessFrame:577] TVMRVideoOFSTFeedFrameYUV Failed
nvmedia: ERROR: main: NvMediaIOFSTProcessFrame failed: 7
nvmedia: main: Destroying IOFST Device
nvmedia: main: Destroying image surface: 0
nvmedia: main: Destroying image surface: 1
nvmedia: main: Destroying mv surface
nvmedia: main: Destroying device
total failures: 1

By the way, is this sample support RGBA frame? I tried to update the sample for RGBA support. However, it failed.

nvmedia: main: Creating IOFST device
nvmedia: main: Setting IOFST initialization params
[GetTVMRInputFormat:750] Invalid input format specified
nvmedia: ERROR: main: NvMediaIOFSTCreate failed

It seems that NvMediaIOFSTCreate doesn’t support RGBA input surface type. After updating input surface type from NVM_SURF_FMT_SET_ATTR_YUV(surfFormatAttrs, YUV, 420, SEMI_PLANAR, UINT, 8, BL) to NVM_SURF_FMT_SET_ATTR_RGBA(surfFormatAttrs, RGBA, UINT, 8, PL), the NvMediaIOFSTCreate will report invalid input format.

Is RGBA type supported?

Hi Leslie.Mao,

This forum is only for DRIVE Software support (no QNX support). I assume you get QNX from NVONLINE access so please report any issue on QNX there. Thanks!

Hello VickNV

My issue happens on Xavier Nvidia Drive Platform. I have two platforms on hand. One is equipped with Ubuntu and another is equipped with QNX. The issues described above happens on both two platforms. Just simply run the nvmedia img_ofst demo and the issue above happened.

Do you mean I need to fire another case for QNX fix patch? If so, could you add the link that I could fire a QNX case for Nvidia Drive platform?

I assume you get QNX access via your nvonline (https://partners.nvidia.com/) account so you can file a bug there. Your request will get handled then. Thanks!

Hello VickNV

Thanks, I will. By the way, could you give me the answer if RGBA type is supported for NvMediaIOFSTCreate function. This error happens on Ubuntu Xavier platform.

The following is what I do and the error message I got

I tried to update the sample for RGBA support. However, it failed.

nvmedia: main: Creating IOFST device
nvmedia: main: Setting IOFST initialization params
[GetTVMRInputFormat:750] Invalid input format specified
nvmedia: ERROR: main: NvMediaIOFSTCreate failed

It seems that NvMediaIOFSTCreate doesn’t support RGBA input surface type. After updating input surface type from NVM_SURF_FMT_SET_ATTR_YUV(surfFormatAttrs, YUV, 420, SEMI_PLANAR, UINT, 8, BL) to NVM_SURF_FMT_SET_ATTR_RGBA(surfFormatAttrs, RGBA, UINT, 8, PL), the NvMediaIOFSTCreate will report invalid input format.

It looks you got the answer in your another topic (https://devtalk.nvidia.com/default/topic/1071723/general/is-rgba-type-supported-for-nvmediaiofstcreate-api-/).

Yes. Thanks.