Problems with calling "nvEncInitializeEncoder".

Hi,

I met some problems of using “nvEncInitializeEncoder”. If I only provide NV_ENC_INITIALIZE_PARAMS with |version|, |encodeWidth| and |encodeHeight|, then “nvEncInitializeEncoder” failed with error code NV_ENC_ERR_INVALID_VERSION. However if I also provide version for |encodeConfig| , then “nvEncInitializeEncoder” will fail with error NV_ENC_ERR_INVALID_PARAM.

Can someone help me with this issue?

I am using linux system and the SDK version is 9.0.20. The minimum driver version in readme.txt is 418.30 and my driver version is 418.67. My gpu is GeForce GTX 1060 6GB.

Thanks!

Hi.
All the fields in the structures passed to the encode API are supposed to be initialized correctly.
Please look into samples provided along with the SDK for reference.

Thanks.

As you said, the reason is that I didn’t initialize all parameters correctly. Thanks!

Hi, can you please take a look of my another question? Thanks!

https://devtalk.nvidia.com/default/topic/1063429/video-codec-and-optical-flow-sdk/what-is-the-layout-of-yuv420-n12-on-gpu-memory-/post/5385007/#5385007