Log in

View Full Version : 4 HDR to 1080p


Bluedraft
3rd November 2024, 05:27
Skin tones in HDR movies looks different when I downscale from 4K to 1080p. The skin tone is even in the original and has some gray spots in the encode. any ideas on how to improve this?

Samples
Original 4K HDR [HEVC 10 bits 92 Mb/s]
https://i.ibb.co/gJNwLKV/4-K-Original-HDR.png (https://ibb.co/gJNwLKV)

1080p HDR [HEVC 10bits 14 Mb/s 2pass slow]
https://i.ibb.co/xfQBPpj/1080p-x265-10bit-HDR.png (https://ibb.co/xfQBPpj)



4K HDR Info

Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.2020
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 325 cd/m2
Maximum Frame-Average Light Level : 169 cd/m2

1080p HDR Info

Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.2020
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 325
MaxCLL_Original : 325 cd/m2
Maximum Frame-Average Light Level : 169
MaxFALL_Original : 169 cd/m2

I'm using Handbrake 1.8.2 for the encoding
Tried also with Staxrip and get the same result

Thanks in advance for any help

Selur
3rd November 2024, 05:54
The skin tone is even in the original and has some gray spots in the encode. any ideas on how to improve this?
A Full HD image contains 25% of the information of a UHD image in terms of pixel count, so slight color changes are to be expected due to down scaling.
If you have 4 pixels and one of these pixels is white, and now you convert these four pixels to one pixel, how could the colors stay the same?

You can try to add some noise, use a different down scaler.

Bluedraft
3rd November 2024, 08:02
That make a lot of sense, Thanks Selur!

Z2697
3rd November 2024, 11:34
There's obvious compression artifact in your 1080p encode, the bitrate is probably not enough.
Also, due to the PQ function, the pixel value is "squeezed" compared to SDR functions, some encoder might struggle to handle some scenes. I bet the original frame already has ugly chroma, the compression just emphasizes that.
Downscaling is of course a factor at play here, but I assume it's not the major reason.

You can try:
Increase bitrate, if you don't know what bitrate is enough (and not worried file get a lot bigger), use CRF, I've seen "high quality UHD encodes" use 12~18.
Use dark area biased AQ: --aq-mode 3.
Set chroma qp offset. --cbqpoffs and --crqpoffs. You want negative offset.
Downscale to 1080p YUV444, this will preserve the chroma resolution but x265 will refuse to use --hdr10-opt because the hdr10 standard is YUV420. (you can mod the x265 source code)

Bluedraft
4th November 2024, 00:02
Thanks for the tips Z2697! I'll give it a try! I will also try to keep it in 4k at a decent bitrate and see what happens. Also recently tried in Handbrake converting to SDR by applying the BT.709 color space filter, it looks fine and there are no gray spots but it takes a reddish hue that looks very unnatural.