NVENC SDK 5.0.1 Samples NvEncoder* have problems

Hello All,

I have GTX 980 card. I downloaded nvenc sdk 5.0.1 and nvidia driver 346.35 driver. Both are installed successfully under Linux 64bit Ubuntu 14.04.

hu Feb 12 17:39:53 2015
| NVIDIA-SMI 346.35 Driver Version: 346.35 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce GTX 980 Off | 0000:08:00.0 N/A | N/A |
| 0% 34C P0 N/A / N/A | 15MiB / 4095MiB | N/A Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |
| 0 C+G Not Supported |

I can compile samples under nvenc SDK. NvTranscoder is working fine for transcoding from H264 to HEVC. However, NvEncoder using YUV 420p is not working correctly at all. I have a YUV 420p file 5.7Gbyte. I use below command:

./NvEncoder -i in.yuv -o out.ts -size 1920 1088 -codec 1 -preset hp -fps 25

However out.ts file size is huge like a few Gbytes and TS sync is broken.

Normally if I encode same YUV file to H264 it is 38 MByte (using ffmpeg + nvenc). If I transcode H264 file to HEVC using NvTranscoder it is 18 MByte. Both files working fine with DivX Player.

It looks there are problems with sample codes NvEncoder*. Any idea ?


I found the issue is realted with yuv422. NvEncoder accepts yuv422 but does not make correct calculation due to sample code. It would be good to add yuv422 support in sample code.