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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,466
|
x265 options for reencoding UHD HDR BD (saving space) in 2025
I did search before posting this thread, but I did not find consistent suggestions as the threads got newer and presumably x265 was refined. I also didn't find any recent threads (though I'm not sure how much x265 is changing over time).
With the latest builds of x265 in early 2025, what is the general guidance for what options to use for x265? I've done lot of SDR encoding, but never HDR. I see that DGDecNV will give me a command line with the HDR and colorimetry data to use to duplicate those of the the source like: Code:
--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "930,197" --frames 190824 --chromaloc 2 FWIW, my intention is to attempt some noise reduction (of grain) with AVIsynth ahead of the encode. Edit: I'm also aware that HDD drive space is likely cheaper than the electricity to do this, but I'm curious and want to play around and am looking for a good starting point. Last edited by Stereodude; 12th March 2025 at 15:54. |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,466
|
Thanks! Does HDR10 material still require a CRF that's about 4 units closer to zero than SDR material to get roughly the same level of visual performance or is that dated advice?
Last edited by Stereodude; 12th March 2025 at 21:12. |
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Aug 2024
Posts: 456
|
hdr10-opt is done like this in the same place as AQ (apply some shift to the AQ adjustment based on the avg luma value of the block)
Code:
if (lumaAvg < 301) qp_adj += 3; else if (lumaAvg >= 301 && lumaAvg < 367) qp_adj += 2; else if (lumaAvg >= 367 && lumaAvg < 434) qp_adj += 1; else if (lumaAvg >= 501 && lumaAvg < 567) qp_adj -= 1; else if (lumaAvg >= 567 && lumaAvg < 634) qp_adj -= 2; else if (lumaAvg >= 634 && lumaAvg < 701) qp_adj -= 3; else if (lumaAvg >= 701 && lumaAvg < 767) qp_adj -= 4; else if (lumaAvg >= 767 && lumaAvg < 834) qp_adj -= 5; else if (lumaAvg >= 834) qp_adj -= 6; So yeah I'd say you should lower the CRF by some amount... but then maybe you get too many bits spent in high light level parts. ![]() Personally, I think the low light shift is somewhat unideal, but high lights, they are very compressed in the QP curve, so they should deserve more bits, I guess. Last edited by Z2697; 13th March 2025 at 10:49. |
![]() |
![]() |
![]() |
#7 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,984
|
Quote:
Most HDR-10 content doesn't normally have many pixels in the high light level parts in general. In common content lots of frames won't have any pixels >100 nits, with detail clustered in the bottom half of the code range. This content has its brightest single pixel at 930 nits and the brightest frame's being overall 197 nits. I'd expect a pixel >300 nits to be present in maybe 10% of the runtime max with those numbers. Given most consumer HDR TVs will ramp-and-clamp well below 1000 nits nominal (as the picture modes boost peak brightness beyond what the panel can actually display), there's rarely a visible difference between a specular highlight at 800 nits versus 4000 nits. Sure, in Filmmaker Mode on a high-end QLED in a dark room, but that's not a common setup. |
|
![]() |
![]() |
![]() |
#8 | Link | |
Registered User
Join Date: Aug 2024
Posts: 456
|
Quote:
I think the frame average and peak should also be taken into account, but that's probably gonna reduce the performance. |
|
![]() |
![]() |
![]() |
#10 | Link | |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,466
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#14 | Link | |
Registered User
Join Date: Aug 2024
Posts: 456
|
Quote:
update: oh, I think they are from input, great! (PicYuv::copyFromPicture) Last edited by Z2697; 18th March 2025 at 18:04. |
|
![]() |
![]() |
![]() |
#15 | Link |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,984
|
Yeah, a brighter peak display is able to get more saturation out of its color gamut in the midrange as well. Which is why you could actually get decent-ish HDR out of those early Rec. 709 400 nit displays; you could have a lot more saturation at 80 nits that nominal Rec. 709 with 100 nit peak could.
|
![]() |
![]() |
![]() |
#18 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,984
|
Quote:
(unfortunately, as the Y in YCbCr isn't quite luminance, accurate values can only determined by converting every pixel into RGB and measuring those). |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|