/adptvgrnMod

adaptive graining with extra features

Primary LanguagePythonMIT LicenseMIT

adptvgrnMod

A modified kagefunc.adaptive_grain. New additions include GrainFactory3's grain size and sharpness, fading values near illegal range and protecting neutral grays. To access the graining without using the adaptive_grain mask, see sizedgrn.

"""
:param clip_in: Input clip.
:param strength: Grainer strength. Use a list to specify [luma, chroma] graining. Default chroma grain is luma / 2.
:param size: Grain size. >1 values are generated by upscaling from lower resolution, <1 by downscaling from higher.
:param sharp: Grain sharpness. Determines b and c values in bicubic resampler used for grain size.
              No effect if size = 1.
:param static: Static or dynamic grain.
:param luma_scaling: Luma-adaptive mask's sensitivity. Lower values will grain brights more, higher less.
:param grainer: Custom grainer instead of AddGrain.
:param fade_edges: Keeps grain from exceeding legal range. With this, values which go towards the neutral point but
                   would generate illegal values if they pointed in the other direction are also limited. This is
                   better at maintaining average values and prevents flickering pixels on OLEDs.
:param tv_range: TV/PC legal range.
:param lo: Overwrite legal range's minimums. Value is scaled from 8-bit to clip depth.
:param hi: Overwrite legal range's maximums. Value is scaled from 8-bit to clip depth.
:param protect_neutral: Disable chroma grain on 100% white and 0% black.
:param seed: Grain seed for AddGrain.
:param show_mask: Show adaptive_grain mask.

:returns: Grained clip.
"""

sizedgrn

A grainer that includes GrainFactory3's grain size and sharpness, fading values near illegal range and protecting neutral grays.

"""
:param clip: Input clip.
:param strength: Grainer strength. Use a list to specify [luma, chroma] graining. Default chroma grain is luma / 2.
:param size: Grain size. >1 values are generated by upscaling from lower resolution, <1 by downscaling from higher.
:param sharp: Grain sharpness. Determines b and c values in bicubic resampler used for grain size.
              No effect if size = 1.
:param static: Static or dynamic grain.
:param grainer: Custom grainer instead of AddGrain.
:param fade_edges: Keeps grain from exceeding legal range. With this, values which go towards the neutral point but
                   would generate illegal values if they pointed in the other direction are also limited. This is
                   better at maintaining average values and prevents flickering pixels on OLEDs.
:param tv_range: TV/PC legal range.
:param lo: Overwrite legal range's minimums. Value is scaled from 8-bit to clip depth.
:param hi: Overwrite legal range's maximums. Value is scaled from 8-bit to clip depth.
:param protect_neutral: Disable chroma grain on 100% white and 0% black.
:param seed: Grain seed for AddGrain.

:returns: Grained clip.
"""

Contact

  • IRC Channel: #OpusGang on irc.libera.chat