[x265] Multiple slices per frame results in unnecessary intra blocks
Richard
ccc7922 at foxmail.com
Mon Feb 17 16:34:05 UTC 2025
My original post at https://forum.doom9.org/showthread.php?p=2014481#post2014481
When using more than 1 slices, x265 creates intra blocks in prediction frames out of nowhere.
Let's do a simple test:
Code:
ffmpeg -lavfi color=gray:s=hd1080:d=10,noise=allf=u:alls=50 -x265-params slices=2 2sli.265
With the given command line, x265 is allowed to encode a completely static video, static noise is applied to add variance to the image, it does not has to be noise, nor does it has to be completely static, you just need some "adequately" high frequency information, a flat color image does not trigger the bug.
The result file is absurdly larger than single slice result.
Viewing the result file with YUView reveals that the encode has a lot of intra blocks near slice borders.
Setting frame-threads=1 seems to mitigate this issue.
The false intra mode in otherwise inter-predictable blocks will make compression ratio a lot worse, if you are planning or forced to use more slices (e.g. UHD Bluray compatible encoding), make sure to use frame-threads=1, slices will provide parallelism silimar to frame-threads.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250218/c5dd3d8b/attachment.htm>
More information about the x265-devel
mailing list