Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
FrameReduction.cpp File Reference
#include "FrameReduction.h"
#include <algorithm>
#include <cmath>
#include <vector>

Namespaces

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

Functions

ReducedSize KODI::VIDEO::GEOMETRY::ReductionOutputSize (unsigned int sourceWidth, unsigned int sourceHeight, unsigned int targetWidth)
 The extent ReduceFrame produces: targetWidth clamped to the source, the height following its shape, both even. Exposed so a GPU reducer can size its blit target the same.
 
bool KODI::VIDEO::GEOMETRY::ReduceFrame (const ReductionSource &source, unsigned int targetWidth, ReducedFrame &out)
 Downscale a decoded frame to a small planar 8-bit YUV420 copy on the CPU, each output sample being the box average of the source samples it covers. False when the source is not describable, leaving out untouched.