I'm using ffmpeg libx265 to encode some fun gameplay clips from old games. Typically this means low resolution pixel art, with small sprites moving against a static or scrolling background. The default settings for the x265 codec are poorly suited for this and give large areas of blocky noise artifacts around the moving sprites. I can of course just increase bitrate, e.g. "crf=22" and allow more computation time "-preset slow" to reduce the problem, but I guess there are better ways to tune the codec parameters to better deal with these types of visuals.
EDIT: hmm, I need >10 rep to be allowed to post more than two links. So I'm deleting the old examples and posting updated better examples.
Adding better examples (now with source) Very simple graphics. Both sprites moving against static background and scrolling background. The major distortions are found when sprites are moving on static background. The noise distortions can extend quite far around the sprites: e.g. @15s
Download the files and view in fullscreen. The gdrive viewer will reencode and destroy.
source (x264 ultrafast crf=0)
ffmpeg -i source.mkv -libx265 -preset medium -libx265-params "crf=28" out.mkv
ffmpeg -i source.mkv -libx265 -preset veryslow -libx265-params "crf=22" out.mkv
This one looks a bit better due to higher bitrate and more compute time. Noise artifacts are smaller, but still disturbing.