Need help with Encoder/Decoder of Video Streams

Hello

So I’ve made a program to encode a video stream in H264 on the GPU using the Video Codec SDK 9.1.13.
But I have a weird issue, have a look :

https://ibb.co/5cnzL8x

As you can see, the encoded/decoded version is slightly more pixelated.

As for the code, I don’t really know what would be useful and I can’t really post the whole program here. But do you have an idea as to what could have gone wrong?