Log in

View Full Version : cg encoding - erase dithering on dark areas of the picture - or clip to zero


OvejaNegra
3rd October 2022, 15:49
hi,
I have the following problem, i'm trying to encode some cg generated clips with x265.

Some of those clips have some amount of banding, so i used

f3kdb(dither_algo=2,keep_tv_range=true)

that solves the problem of bandind, but also creates dithering / grain on the dark / black areas of the picture.

There is nothing on those areas, this is cg, there is no dark detail, only pure black on the shadows or in any other similar area.

f3kdb puts dither there and that makes the encodes bigger.

someone could say, well, just lower aq. that solves part of the problem, lowering aq (0.4 - 0.6 - 0.8) in fact makes gives less
bits to dark areas and that makes the encodes smaller, but the higher quantizer on the dark areas, converts the dither to some uggly dark patches, that i find very distracting.

I cant find any option on x265 to clip / ignore the pixels on the dark areas. so i'm thinking if i'ts possible with avisynth, erase the dither on those areas or simply clip all the values to black (no more noise, just black).

Is that posible?
thanks

kedautinh12
3rd October 2022, 16:02
You can try GradFun3plus(thr=0.25, radius=10, mask=2, smode=0,UV=1)
https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/GradFun3plus.avsi