Error in 'Init' function of NV Optical Flow for SDK API version 4

I am using the NVIDIA Optical Flow SDK (CUDA Interface) in a C++ Windows Application, Visual Studio 2022, Cuda Toolkit 11.8. I have a Geforce RTX 3090, latest drivers are installed.

When I am setting the Optical Flow SDK major version to ‘2’, it works great.

Strangely, when I am setting the optical flow SDK major version to ‘4’, I get an error when invoking the Initialization routine ‘nvOFInit’. Using ‘nvOFGetLastError’, I get the error message: “NvOFInit() API failed, Incorrect NV_OF_INIT_PARAMS::inputBufferFormat value”

I am using exactly the same init parameters (see the attached image) in both cases.

What am I doing wrong ?