Skip to main content

Module grade

Module grade 

Source
Expand description

The grade: everything libplacebo does to a frame between decode and encode.

Structs§

ColorMapTuning
Tuning for libplacebo’s tone and gamut mapping (pl_color_map_params). The defaults are the prototype’s (libavfilter libplacebo with its defaults).
ColorOverride
Overrides for the source’s colour tags (the prototype’s setparams before the grade).
Crop
A rectangle in pixels: a source crop in input pixels, or a placement in output pixels.
Deband
libplacebo’s debanding on the source planes (pl_deband_params).
Denoise
A denoise stage: temporal, then spatial on its result. Either may be off.
Dither
Dithering to the output bit depth.
Grade
One libplacebo render pass: colour conversion (incl. tone and gamut mapping), crop/scale, LUT and user shaders, ending in output.
Grain
Hook
An inline mpv .hook shader and the values of its //!PARAMs.
LutStage
A LUT and how to apply it.
ParamTrack
One //!PARAM’s value per output frame: frame i uses values[i], the last one holds past the end.
Scaling
Scaling behaviour. The default matches swscale (lanczos, gamma light, no sigmoid) so GPU and CPU geometry agree.
Size
Output size in pixels.
Spatial
Spatial NLM part.
Temporal
Temporal (motion-compensated) part.
Warp
A per-frame warp in the grade pass (the GPU stabilizer’s output): for output frame i, transforms[i] maps output pixels to source pixels, in source pixel coordinates before the crop (the last one repeats past the end). Applied at libplacebo’s MAIN stage with a Catmull-Rom bicubic, black outside the source; the grade’s crop is folded into it.

Enums§

Border
What fills the output around a placed picture (Grade::place).
DitherMethod
Dither algorithm for the output quantization.
GamutMapping
How out-of-gamut colours are brought into the target gamut.
Scaler
Resampling filter.
ToneMapping
HDR -> SDR tone curve.