Log in

View Full Version : X265 vs x264 CRF values mapping


TEB
30th October 2020, 08:51
hi, anyone know what the eq. of CRF 20 is in X264 vs x265? Is there a 1:1 map somewhere i can use as a reference?

microchip8
30th October 2020, 10:56
A CRF of 18 in x264 corresponds to 20 in x265.

outhud
30th October 2020, 13:28
A CRF of 18 in x264 corresponds to 20 in x265.

Does that mean they give about the same file size? Or the same image quality?

microchip8
30th October 2020, 14:24
Does that mean they give about the same file size? Or the same image quality?

file size and image quality are correlated. x265 is roughly 30-35% more efficient than x264 at the same bitrate

I personally use in x265 a CRF of 21 with a qcomp of 0.7 and high psy-rd and psy-rdoq values. I cannot tell the difference between it and the same encoded with x264 @ CRF 18 and almost the highest possible setting (except exhaustive ME search as it's a placebo)

filler56789
30th October 2020, 14:28
hi, anyone know what the eq. of CRF 20 is in X264 vs x265? Is there a 1:1 map somewhere i can use as a reference?

for x264: QP = 12 + 6 * log ₂ (qscale[i])
for x265: QP = 12 + 6 * log ₂ (qscale[i] / 0.85)

source: https://www.cnblogs.com/lakeone/p/5436481.html

But NOTICE:

Note that CRF~QP only roughly. It's on the same log scale as QP, but with an offset based on frame complexity. I wouldn't expect it to map linearly to any other quality control algorithms.

excellentswordfight
30th October 2020, 15:54
A CRF of 18 in x264 corresponds to 20 in x265.
At what settings? Default? Cause how can we say that crf18 in x264 equals crf20 terms of image quality in x265, when crf20 preset 'fast' will produce image quality vastly different to crf20 preset 'slower'?

In my experience slower presets uses higher bitrate at given crf-value than faster ones in x265, and the opposite is true for x264. So TS question can only be answered (at best) at specific encoder settings.

microchip8
30th October 2020, 16:24
At what settings? Default? Cause how can we say that crf18 in x264 equals crf20 terms of image quality in x265, when crf20 preset 'fast' will produce image quality vastly different to crf20 preset 'slower'?

In my experience slower presets uses higher bitrate at given crf-value than faster ones in x265, and the opposite is true for x264. So TS question can only be answered (at best) at specific encoder settings.

at medium preset

benwaggoner
30th October 2020, 21:06
Also, HEVC has a lot of tools to encode more efficiently or to suppress encoding artifacts that H.264 doesn't have. So, depending on the content, x265 can look better than x264 at the same QP. This will be somewhat content dependent. I'd think x265 anime using --tskip would look at lot better at the same QP than x264. But for noisy film grain content, the gap might be smaller or non-existent. In x264 a 10-bit QP looks better than the same QP at 8-bit, but HEVC doesn't have nearly the same gap.

So, at a high level, starting with the same CRF is a decent ballpark, but I don't think we're going to have anything substantially more accurate without specifying parameters and content. I'd probably start an x265 encode tuning with the same CRF as x264, and go from there. Or maybe start it at 2 higher if I think the CRF might have been overkill in some sequences in x264.