Reduce blocking artifacts when using the presets 12 to 7
Encoding videos using the presets 12 to 7 generates certain blocking artifacts that become too annoying in certain cases.
I've seen some related issues, where a possible solution was to use tune=0 or enable-tf=0, but when using either of these possible solutions, the blocking artifacts are still there (and even get worse when using tune=0).
So I decided to check the source code to see what could be causing the problem, and found it in the dlf_level value setting in \Source\Lib\Encoder\Codec\EncModeConfig.c file.
Setting dlf_level value to 4 or 5 on all presets seems to do nothing to remove the bloking artifacts. Setting the dlf_level value to 3 for all presets seems to fix the problem only in some cases; while in other cases the blocking artifacts are still there. Setting the dlf_level value to 2 for all presets seems to fix the problem completely (although in some cases the blocks are still slightly noticeable), in exchange for a speed reduction of up to 30% for preset 12, 15% for preset 11, 10% for preset 10 and 9, and 5% for preset 8 and 7.
Below I leave a google drive link with some clips encoded with master branch svt-av1 and the modified version that uses dlf_level 2 for all presets (it also contains a windows ffmpeg build with the modified svt-av1 encoder), encoded using crf 55:
https://drive.google.com/drive/folders/1ev_0wuTcQ5-DiPVd70XJHJG701CTn-4h?usp=drive_link
I think that removing all those annoying blocking artifacts is worth at the expense of a maximum speed decrease of 30%, also say that noisiness and blurriness are much less annoying than those blocking artifacts.
Also I would like to ask, if svt-av1 could use dlf_level 2 on all presets by default and also if the dlf_level value could be set from the command line.