f3kdb ¶
Classes:
-
F3kdb
–Debander wrapper around the f3kdb plugin.
-
RandomAlgo
–Random number algorithm for reference positions / grains.
-
SampleMode
–
F3kdb dataclass
¶
F3kdb(
radius: int | None = None,
thr: int | list[int] | None = None,
grain: int | list[int] | None = None,
sample_mode: SampleMode | SampleModeMidDiffInfo | None = None,
seed: int | None = None,
dynamic_grain: int | None = None,
blur_first: bool | None = None,
)
Bases: Debander
Debander wrapper around the f3kdb plugin.
Methods:
-
deband
–Args:
Attributes:
-
blur_first
(bool | None
) – -
dynamic_grain
(int | None
) – -
grain
(int | list[int] | None
) – -
radius
(int | None
) – -
sample_mode
(SampleMode | SampleModeMidDiffInfo | None
) – -
seed
(int | None
) – -
thr
(int | list[int] | None
) –
sample_mode class-attribute
instance-attribute
¶
sample_mode: SampleMode | SampleModeMidDiffInfo | None = None
deband ¶
deband(
clip: VideoNode,
radius: int = 16,
thr: int | list[int] = 96,
grain: float | list[float] = 0.0,
sample_mode: SampleMode | SampleModeMidDiffInfo = SQUARE,
dynamic_grain: bool = False,
blur_first: bool | None = None,
seed: int | None = None,
random: RandomAlgoT | tuple[RandomAlgoT, RandomAlgoT] = UNIFORM,
planes: PlanesT = None,
_func: FuncExceptT | None = None,
) -> VideoNode
Parameters:
-
clip
¶VideoNode
) –Input clip.
-
radius
¶int
, default:16
) –Banding detection range.
-
thr
¶int | list[int]
, default:96
) –Banding detection threshold for respective plane. If difference between current pixel and reference pixel is less than threshold, it will be considered as banded
-
grain
¶float | list[float]
, default:0.0
) –Specifies amount of grains added in the last debanding stage.
-
sample_mode
¶SampleMode | SampleModeMidDiffInfo
, default:SQUARE
) –Determines how pixels are taken as reference.
-
dynamic_grain
¶bool
, default:False
) –Use different grain pattern for each frame.
-
blur_first
¶bool | None
, default:None
) –If True current pixel is compared with average value of all pixels. If False current pixel is compared with all pixels. The pixel is considered as banded pixel only if all differences are less than threshold.
-
seed
¶int | None
, default:None
) –Seed for random number generation
-
random
¶RandomAlgoT | tuple[RandomAlgoT, RandomAlgoT]
, default:UNIFORM
) –Random number algorithm for reference positions / grains.
-
planes
¶PlanesT
, default:None
) –Which planes to process.
Source code
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
|
RandomAlgo ¶
Bases: CustomIntEnum
Random number algorithm for reference positions / grains.
Methods:
-
__call__
–
Attributes:
SampleMode ¶
Bases: CustomIntEnum
Methods:
-
__call__
–
Attributes:
-
COLUMN
–Take 2 pixels as reference pixel. Reference pixels are in the same column of current pixel.
-
COL_ROW_MEAN
–Arithmetic mean of COLUMN and ROW. Reference points are randomly picked within the range.
-
MEAN_DIFF
–Similar to COL_ROW_MEAN, adds max/mid diff thresholds.
-
ROW
–Take 2 pixels as reference pixel. Reference pixels are in the same row of current pixel.
-
SQUARE
–Take 4 pixels as reference pixel. Reference pixels are in the square around current pixel.
COLUMN class-attribute
instance-attribute
¶
COLUMN = 1
Take 2 pixels as reference pixel. Reference pixels are in the same column of current pixel.
COL_ROW_MEAN class-attribute
instance-attribute
¶
COL_ROW_MEAN = 4
Arithmetic mean of COLUMN and ROW. Reference points are randomly picked within the range.
MEAN_DIFF class-attribute
instance-attribute
¶
MEAN_DIFF = 5
Similar to COL_ROW_MEAN, adds max/mid diff thresholds.
ROW class-attribute
instance-attribute
¶
ROW = 3
Take 2 pixels as reference pixel. Reference pixels are in the same row of current pixel.
SQUARE class-attribute
instance-attribute
¶
SQUARE = 2
Take 4 pixels as reference pixel. Reference pixels are in the square around current pixel.