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. |
15th March 2021, 21:47 | #1 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
|
Modern x265 grain tuning
--tune grain has been around for years now, and is rather a blunderbuss, mainly turning off cu-size recursion and yield a near-constant QP within and between frames. It works for heavy film grain, but really reduces compression efficiency for clean content, and some for light grain. The performance hit of turning off rskip is also substantial.
Since --tune grain was introduced, default x265 is a lot better at light-moderate grain. And we've got newer tools that seem like they should help us to better tune for quality and performance with moderately grainy content. In particular: --rskip now has a mode 2 based on CU edge density, and with that we have --rskip-edge-threshold to set what the recursion threshold should be Has anyone played around with those? Beyond that, I think --rdoq 20 and --psy-rd 4.0 are likely higher than needed these days. What tweaks are people using for grainy sources these days? |
15th March 2021, 22:07 | #2 | Link | |
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 570
|
Quote:
Maybe it was a one-off though.. What I know is that disabling strong intra smoothing is often useful for larger grain.
__________________
LG C2 OLED | GitHub Projects |
|
15th March 2021, 22:36 | #3 | Link |
Registered User
Join Date: Dec 2013
Posts: 343
|
Strong intra smoothing is just smoothing the prediction pels at the border of a CU from which the prediction is formed, its better left ON than to have some sharp angular prediction details across a whole CU which then have to be removed by the residual.
What wonders me is that the last x265 versions I tried had SAO badly broken and introducing blocks in slight gradients overlayed with grain. I do not get why the wont fix that. Its probably been in there for years. |
15th March 2021, 23:10 | #4 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
|
Quote:
Of course, UHD resolution masters, especially remasters, often have way more visible grain than the original creatives ever would have seen on a perf screen. Super 35mm movies can look like 720p upsampled to 2160p and then a jacked-up film grain effect applied. |
|
16th March 2021, 05:41 | #5 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
|
I use --psy-rd 4.0 --psy-rdoq 15 -qcomp 0.7 --rskip 2 --rskip-edge-threshold 0.2 --strong-intra-smoothing for both clean and noisy content. Am very happy with these settings for both types of content. I only encode FHD, though. UHD on my fastest PC is too slow to encode
|
16th March 2021, 23:44 | #6 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
|
Quote:
What bitrates are you targeting/getting with what CRF? |
|
17th March 2021, 06:07 | #7 | Link | |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
|
Quote:
I've also disabled SAO and lowered deblocking strength to -4,-4. HME is turned on as well (umh,umh,star). Can't virtually never tell a difference between original and the encode The reason I upped --psy-rd and --psy-rdoq is that at low values, I was able to spot halo's in dark scenes when encoding Blade Runner 2049 which is pretty clean with little mosquito noise. Increasing these values made the problem go away and I stuck at using them Last edited by microchip8; 17th March 2021 at 06:15. |
|
17th March 2021, 08:00 | #8 | Link |
Registered User
Join Date: Aug 2018
Location: Germany
Posts: 118
|
I also use --rskip 2 for my UHD encodes. But I have --rskip-edge-threshold at the default, because I'm unsure how to tune this setting. And you do not find much information about --rskip-edge-threshold in the internet.
|
17th March 2021, 09:10 | #9 | Link |
Registered User
Join Date: Mar 2021
Posts: 6
|
Wow, you guys are using high psy-values.
I noticed that high psy-setting make grain look sharp and annoying to me, it gets amplified. Lower settings keep it looking natural. I'm just using this type of settings: Code:
--crf 21.3 --input-res 1664x936 --fps 24000/1001 --frames 12345 --frame-threads 2 --preset slower --ref 6 --ctu 32 --rd 3 --limit-refs 3 --limit-tu 0 --deblock -3:-3 --keyint 360 --min-keyint 24 --merange 26 --no-sao --psy-rd 2.0 --psy-rdoq 1.2 --rc-lookahead 60 --aq-mode 3 --aq-strength 0.85 --no-cutree --qcomp 0.65 --cbqpoffs -1 --crqpoffs -1 --range limited --colorprim 1 --transfer 1 --colormatrix 1 --output-depth 10 --profile main10 --level-idc 5.0 --high-tier --no-open-gop --repeat-headers --aud --hrd I'm using 10 bit even for 8 bits sources too. |
17th March 2021, 17:06 | #10 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,752
|
Quote:
|
|
18th March 2021, 05:48 | #13 | Link |
Registered User
Join Date: May 2009
Posts: 328
|
If we want to find out if it's improved, wouldn't encoding Alien be the best test? I remember previously someone attempted to do it and the result was that the encode came out larger than the original. I do not own the movie, so I personally am not able to do this.
|
20th March 2021, 09:31 | #16 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,718
|
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
24th March 2021, 14:19 | #17 | Link |
Registered User
Join Date: Oct 2001
Posts: 454
|
Stanley Cubrik used to work with very hig ISO Films in order to capture the "natural look of low ambient lighting" in some scenes, resulting in a lot of grain in darker scenes. I can imagine these movies could be a good test-source, too.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|