Need help with Encoder/Decoder of Video Streams


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 :

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?