Expand description
libplacebo user shaders (mpv .hook format) generated by ffcine.
Structs§
- Look
Params - Parameters of
look: the prototype’s post-LUT grade (render.pygrade_filters).
Functions§
- alpha
- Alpha for a
crate::Layer:opacitytimes a rounded-rectangle mask with cornerradiusin layer pixels (antialiased over one pixel), as anOUTPUThook. Both can be per-frame tracks. - background
- A generated background replacing the picture (split-screen backdrop,
render.pylayout_bg): the colourbg_r/g/b, darkened towards the edges by1 − vignette · ((1.5 (x − ½))² + (1.8 (y − ½))²). - finish
- Per-shot finishing after the look, as one
PREOUTPUThook (the prototype’spostfilters inrender.py):darken(RGB multiplier), ffmpeg’svignette(anglein radians; the factor iscos(angle · d)^4withdthe distance from the middle over the half diagonal, 0 past it), the shutterflash(lift: blacks raised towards white,out = lift + (1 - lift) in, ascolorlevels romin), then afadetowardsfade_r/g/b(fade1 = the picture, 0 = the colour, ffmpeg’sfadeon gamma-encoded values).fadeandliftare per-frame tracks. - layer_
alpha - Alpha for a comp layer (
ffcine-comp,docs/compositing.md#placement):alpha’sopacityand rounded corners (radius, texture pixels), times a shape mask:shape0 none, 1 rectangle, 2 ellipse, insidemask_x/y/w/h(fractions of the texture), with a soft edgefeathertexture pixels wide centred on the shape’s edge (antialiased over one pixel at 0), andinvert(1 keeps the outside).radiusandfeatherare horizontal texture pixels;kyis how many vertical texture pixels make one horizontal (a layer scaled unevenly). AnOUTPUThook; every value can be a per-frame track. - look
- The prototype’s post-LUT chain as one
PREOUTPUThook (gamma-encoded RGB after the LUT), its parameters as//!PARAMs so every variant shares one compiled shader:exposure(stops, a gain in display-linear light, gamma 2.4), thencolorbalance(rs/bs = ±0.4 w,rm = w,gm = −tint,bm = −w,rh/bh = ±0.6 w,pl=0, ffmpeg’s shadow/mid/highlight weights), thencurves(y = x^(1/gamma),y −= contrast/π · ½ sin 2πy,y = lift + (gain − lift) y, evaluated exactly instead of through 17 spline points), then the Rec.709-luma saturation matrix. - motion_
blur - Directional motion blur for whip transitions:
bluroutput pixels along(dir_x, dir_y)(32 taps, box), aPREOUTPUThook.bluris a per-frame track; 0 passes the picture. - solid
- A solid colour layer’s picture (
ffcine-comp):solid_r/g/b(gamma-encoded output values, asbackground) replacing the picture, aPREOUTPUThook ahead of the finish. - unsharp
- ffmpeg’s
unsharp=5:5:amount(luma only) as aPREOUTPUThook: after scaling and the LUT, on gamma-encoded RGB, where the CPU chain runs it. The 5x5 kernel is the separable binomial[1 4 6 4 1]/16blur,out = in + amount * (in - blur)on BT.601 luma (what ffmpeg’s auto-inserted RGB -> YUV conversion uses); adding the same delta to R, G and B moves Y only.