[x265] Unexpected banding issues with x265 12bit lossy encoding
PDR PDR
pdr0 at shaw.ca
Thu Sep 3 18:50:14 CEST 2020
This is a repost of
https://bitbucket.org/multicoreware/x265_git/issues/1/unexpected-banding-issues-with-x265-12bit
Low CRF or QP values, like 0 or 1 for lossy encoding a simple 12bit ramp produces unexpected gaps and duplicate values
Test: 12bit ramp, 4K DCI 4096x2160, Y= 0 to 4095. Every x= position coordinate has the same value in the Y channel. 1 frame.
Result: Repeats and gaps in the waveform at regular intervals. eg. x=252, x=253 both have a Y value of 252. The value Y=256 is missing, etc... x=4060, 4061 both have a Y value of 4060, and Y value of 4064 missing, etc…
eg. --crf 0 Y waveform PSNR y:81.274910
[ https://i.postimg.cc/nhFd7Kvt/x265-yuv444p12-crf0.png | https://i.postimg.cc/nhFd7Kvt/x265-yuv444p12-crf0.png ]
[code]
vspipe --y4m 4k_greyramp_yuv444p12.vpy - | "x265.exe" --y4m - --input-csp i444 --input-depth 12 --output-depth 12 --qp 1 -o x265_yuv444p12_qp1.hevc
[/code]
Double checked values with vapoursynth picker (missing values/gaps, and repeated values), and psnr testing.
--lossless is ok - so that mostly rules out a script or toolchain issue; a decoder side issue also less likely. But also checked ffmpeg yuv4mpegpipe on the ffv1 below, instead of vspipe - same issue
eg. --lossless Y waveform PSNR y: inf
[ https://i.postimg.cc/ZnPcv0nR/x265-yuv444p12-lossless.png | https://i.postimg.cc/ZnPcv0nR/x265-yuv444p12-lossless.png ]
When using --qp 0, --qp 1, or --crf 0, --crf 1 , I also tested some variations like --tune psnr... , tried adding --tskip --cu-lossles, checked several different x265 builds => always gaps, banding without the --lossless switch
A simple gradient ramp should be lossless at low qp values - it is with 10bit ramps; e.g. even at crf16 with default settings, x264 is lossless on a simple 10bit ramp (probably at higher qp’s or crf’s too)
Source file ffv1 yuv444p12le for testing (lossless, PSNR infinity compared to original script)
[ http://www.mediafire.com/file/2h4xrmvug0lm127/4k_greyramp_yuv444p12_ffv1.mkv/file | http://www.mediafire.com/file/2h4xrmvug0lm127/4k_greyramp_yuv444p12_ffv1.mkv/file ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200903/be7674aa/attachment.html>
More information about the x265-devel
mailing list