I’m writing a simple video encoder that compresses YUV420p video. I noticed that the resulting file always looks slightly different when I regenerate it from the same input file with the same compression settings. No big changes, it’s usually just a few bits that suffer from a “cosmic ray bit flip” effect.
At no point in my program I use randomized values, so the resulting output should always be the same. I suspect that my program performs reads/writes outside its allocated memory, which would explain the randomness of the data.
Aside from regular debugging practices, are there special tools/tricks to help me detect the cause of these shenanigans?
If on Windows OS, you can try AppVerifier