Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
GeometryTransforms.h File Reference
#include "utils/Geometry.h"
#include <string>
#include <string_view>

Classes

struct  KODI::VIDEO::GEOMETRY::StreamGeometry
 What is known about the stream being played, as coded. More...
 
struct  KODI::VIDEO::GEOMETRY::RenderGeometry
 The resolved geometry reduced to what a render path reads. More...
 
struct  KODI::VIDEO::GEOMETRY::ContentCut
 What a renderer needs to cut its source to one frame's own measurement. More...
 

Namespaces

namespace  KODI
 
namespace  KODI::VIDEO
 
namespace  KODI::VIDEO::GEOMETRY
 

Functions

int KODI::VIDEO::GEOMETRY::NormaliseRotation (int degrees)
 degrees reduced to a quarter turn; anything else is upright.
 
CRect KODI::VIDEO::GEOMETRY::Rotate (const CRect &rect, const CRect &frame, int orientation)
 Turn rect clockwise within frame, both upright and at the origin.
 
float KODI::VIDEO::GEOMETRY::AspectOf (const CRect &rect)
 
int KODI::VIDEO::GEOMETRY::EdgeDistance (const CRectInt &a, const CRectInt &b)
 Chebyshev distance between two rectangles: the furthest any single edge has moved.
 
bool KODI::VIDEO::GEOMETRY::EdgesWithin (const CRectInt &a, const CRectInt &b, unsigned int tolerance)
 Are these the same boundary within tolerance, edge for edge?
 
CRect KODI::VIDEO::GEOMETRY::FractionOf (const CRect &rect, const CRect &frame)
 rect as fractions of frame.
 
CRect KODI::VIDEO::GEOMETRY::FromFraction (const CRect &fraction, const CRect &frame)
 The rectangle fraction describes within frame - FractionOf()'s inverse.
 
CRectInt KODI::VIDEO::GEOMETRY::StereoViewRect (std::string_view stereoMode, unsigned int width, unsigned int height)
 The first view of a packed stereoscopic frame, or an empty rectangle for mono.
 
CRectInt KODI::VIDEO::GEOMETRY::MeasuredFrameRect (std::string_view stereoMode, unsigned int width, unsigned int height)
 The region a measurement describes: one view of a packed frame, else the whole.
 
CRectInt KODI::VIDEO::GEOMETRY::ScaleRect (const CRectInt &rect, unsigned int fromWidth, unsigned int fromHeight, unsigned int toWidth, unsigned int toHeight)
 rect read in one coordinate space, expressed in another of the same shape.
 
StreamGeometry KODI::VIDEO::GEOMETRY::MeasuredStreamGeometry (std::string_view stereoMode, unsigned int width, unsigned int height, float displayAspect)
 What a measurement of a playing stream is expressed against, displayAspect being the ratio the whole packed frame is displayed at.
 
float KODI::VIDEO::GEOMETRY::PixelAspectRatio (const StreamGeometry &stream)
 Width of a coded pixel in display pixels; 1 when the stream declares no ratio.
 
CRect KODI::VIDEO::GEOMETRY::ToSquarePixels (const CRectInt &coded, const StreamGeometry &stream)
 Undo the coding's pixel aspect, leaving the picture oriented as it was coded.
 
CRect KODI::VIDEO::GEOMETRY::FitAspect (float aspect, const CRect &frame)
 The largest rectangle of ratio aspect that fits centred inside frame.
 
bool KODI::VIDEO::GEOMETRY::DescribesFrame (const RenderGeometry &geometry, const CRect &frameSource)
 Whether geometry was resolved from a frame of frameSource's shape.
 
CRect KODI::VIDEO::GEOMETRY::SourceRect (const RenderGeometry &geometry, const CRect &frameSource)
 The part of frameSource holding content, in its own coordinates.
 
ContentCut KODI::VIDEO::GEOMETRY::CutToContent (const RenderGeometry &geometry, const CRectInt &content, const CRect &frameSource)
 frameSource cut to content, a rectangle measured from one frame in the space of RenderGeometry::codedFrame. The pixel aspect and rotation come from geometry.