Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th October 2020, 08:51   #1  |  Link
TEB
Registered User
 
Join Date: Feb 2003
Location: Palmcoast of Norway
Posts: 363
X265 vs x264 CRF values mapping

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?
TEB is offline   Reply With Quote
Old 30th October 2020, 10:56   #2  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
A CRF of 18 in x264 corresponds to 20 in x265.
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 30th October 2020, 13:28   #3  |  Link
outhud
Registered User
 
Join Date: Aug 2018
Posts: 21
Quote:
Originally Posted by microchip8 View Post
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?
outhud is offline   Reply With Quote
Old 30th October 2020, 14:24   #4  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
Quote:
Originally Posted by outhud View Post
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)
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 30th October 2020, 14:28   #5  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by TEB View Post
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:

Quote:
Originally Posted by benwaggoner View Post
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.
filler56789 is offline   Reply With Quote
Old 30th October 2020, 15:54   #6  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 326
Quote:
Originally Posted by microchip8 View Post
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.
excellentswordfight is offline   Reply With Quote
Old 30th October 2020, 16:24   #7  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
Quote:
Originally Posted by excellentswordfight View Post
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
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 30th October 2020, 21:06   #8  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
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.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.