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. |
1st August 2021, 17:46 | #1 | Link |
Video Fanatic
Join Date: Jul 2021
Location: Surrey
Posts: 89
|
2021 Consensus on Sample Adaptive Offset (sao)
I've read thousands of posts over hundreds of threads going back to ~2015 and it seems there's a lack of consensus over disabling sao for an encode, with many people saying it produces a 'wax-like' result.
With the relative maturity of x265, what's your opinion and why (for or against)?
__________________
PC: R9 5900X | 32GB 3600 MT/s RAM | 2*1TB NVMe | RTX 3080 | water-cooled NAS: SM 48-bay 240TB+ storage | Xeon 1220 | 32GB DDR4 ECC HTPC: Pentium J5005 | 16GB RAM | 256GB SSD | 15W |
1st August 2021, 19:11 | #3 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
SAO = Smooth All Objects . It's not usable at all so I always disable it.
x265 may be mature, but SAO has had little development apart from the possibility to use it only on certain frame types.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
2nd August 2021, 20:01 | #4 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Yeah, SAO in HEVC has a good amount of flexibility with parameters, but x265 only uses a fixed set. And I don't think there is any way to tweak them.
SAO is a big help at lower bits-per-pixel, but there's a crossover point if detail is prioritized over compression efficiency. |
3rd August 2021, 18:34 | #6 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Quote:
I did find this paper proposing one implementation of it: https://ieeexplore.ieee.org/document/7889300 |
|
5th August 2021, 18:20 | #7 | Link |
Registered User
Join Date: Dec 2013
Posts: 349
|
When I checked a couple of years ago the x265 implementation of SAO was broken. When I checked recently with x265 version 3.4 it was still broken. And with broken I mean artifacts broken and not bad subjective quality broken.
|
7th August 2021, 02:03 | #11 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
I personally leave SAO on unless I'm targeting transparency. The blocking suppression is too good, even if the loss in fine detail in still frame comparison makes it look bad at first glance.
In terms of an ABR ladder that means almost always leaving it on. Maybe the very top rungs get it disabled. I wonder if Ateme has a better SAO implementation? They have a lot of really sharp folks working on HEVC, AV1, and VVC these days. Maybe Beamr as well? They're both the first names that come to mind for good commercial HEVC encoders. I've not deeply evaluated either |
7th August 2021, 11:44 | #12 | Link | |
Registered User
Join Date: Dec 2013
Posts: 349
|
Quote:
https://drive.google.com/file/d/1U_l...ew?usp=sharing With a x265 command line like this: Code:
./x265-10b.exe --input gradient_with_noise_1920x1080_10b.yuv --fps 24000/1001 --input-depth 10 --input-res 1920x1080 --crf 30 --preset veryslow -o sao_failure.265 |
|
8th August 2021, 06:59 | #13 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
Fascinating! I see the opposite with real world content, typically
By blocking suppression I mean that if you compare two low bitrate encodes that are identically configured other than one having SAO enabled and one having it disabled, some of the blocking artifacts (particularly in motion) in the version without SAO will not be visible in motion in the version with SAO enabled.
__________________
These are all my personal statements, not those of my employer :) Last edited by Blue_MiSfit; 8th August 2021 at 07:05. |
8th August 2021, 10:39 | #14 | Link | |
Registered User
Join Date: Dec 2013
Posts: 349
|
Quote:
Regarding you statement about blocks going away, I hope you know SAO works only on 64x64 blocks or whatever LCU size you have configured so I guess either your blocks in motion are aligned on a 64x64 block grid that SAO can work on or you are seeing things. |
|
8th August 2021, 20:41 | #15 | Link | |
SuperVirus
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
|
Quote:
For the notes... the last I checked, Rovi's HEVC Encoder in the TotalStudio software offered three types of SAO — for luma only, for chroma only, and for both luma and chroma. But there were no user-configurable parameters and I didn't bother to check whether their SAO implementation was good or not. Last edited by filler56789; 8th August 2021 at 20:42. Reason: . |
|
8th August 2021, 21:37 | #16 | Link | |
Registered User
Join Date: Dec 2013
Posts: 349
|
Quote:
SAO has 6 different modes it can apply to a CTU, the most important mode is the "dont touch the pixels" mode if an encoder cannot derive satisfactory parameters for the modes that actually do change some of the pixels. x265 produces worse results when SAO is enabled as can be seen with the sequence I posted. x265 just shouldnt modify a CTU through SAO if it cannot derive parameters that improve the CTU subjective or objectively but it does anyway. |
|
9th August 2021, 00:56 | #17 | Link | |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
|
Quote:
Do you have any experience with any of them doing better?
__________________
madVR options explained |
|
Tags |
sample adaptive offset, sao |
|
|