VideoTransform
The viewer's framing controls, on top of VideoScale: force a display aspect the container did not declare (mpv's video-aspect-override), magnify (mpv's video-zoom), and pan the magnified picture (mpv's video-pan-x/-y). The engine owns the value and every renderer is told it, the same delivery law as VideoScale and VideoAdjustments; the renderers fold it into the same one-pass geometry that letterboxes, so it costs nothing per frame.
Order, applied by the geometry: the aspect override reshapes the content, the scale mode fits that shape to the viewport, the zoom scales the fitted rectangle about its centre, and the pan then moves it by a fraction of its own drawn size. Pixel aspect and rotation are folded in before all four, as always.
It also turns and mirrors the picture (#428), on top of what the file asks for, as mpv's video-rotate and VLC's transform do: for a phone clip filmed sideways with no rotation tag, a webcam that recorded mirrored, or a screen mounted on its side. The mirrors apply to the picture as the file shows it, and the turn after them. Every renderer folds the result into the turn it already draws, through orient, so it costs nothing per frame and keeps hardware decoding, and everything that follows the picture's shape follows it.
Constructors
Properties
The display aspect (width over height) to present the picture at, replacing the container's own, or null to trust the container. The classic use is a DVD rip that stored 4:3 pixels and lost its 16:9 flag.
True for the neutral value, which keeps every geometry on its untouched fast path.
Mirrors the picture left to right, as the file shows it.
Mirrors the picture top to bottom, as the file shows it.
A clockwise turn of the picture, after the file's own: 0, 90, 180 or 270 degrees.
True when this turns or mirrors the picture at all.
Functions
How a picture whose file asks for rotationDegrees and mirrored is drawn under this transform: as one mirror and one turn, the form every renderer draws a frame's own in (#428). A turn that is not a quarter turn counts as none, as a renderer draws it.