Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CRendererBase Class Referenceabstract

#include <RendererBase.h>

Inheritance diagram for CRendererBase:
CRendererHQ CRendererSoftware CRendererDXVA CRendererShaders

Public Member Functions

virtual ~CRendererBase ()
 
virtual CRenderInfo GetRenderInfo ()
 
virtual bool Configure (const VideoPicture &picture, float fps, unsigned int orientation)
 
virtual bool Supports (ESCALINGMETHOD method) const =0
 
virtual bool Supports (ERENDERFEATURE feature) const
 
virtual bool WantsDoublePass ()
 
virtual bool NeedBuffer (int idx)
 
void AddVideoPicture (const VideoPicture &picture, int index)
 
void Render (int index, int index2, CD3DTexture &target, const CRect &sourceRect, const CRect &destRect, const CRect &viewRect, unsigned flags)
 
void Render (CD3DTexture &target, const CRect &sourceRect, const CRect &destRect, const CRect &viewRect, unsigned flags=0)
 
void ManageTextures ()
 
int NextBuffer () const
 
void ReleaseBuffer (int idx)
 
bool Flush (bool saveBuffers)
 
void SetBufferSize (int numBuffers)
 
DEBUG_INFO_VIDEO GetDebugInfo (int idx)
 

Static Public Member Functions

static DXGI_FORMAT GetDXGIFormat (const VideoPicture &picture)
 
static DXGI_FORMAT GetDXGIFormat (CVideoBuffer *videoBuffer)
 
static AVPixelFormat GetAVFormat (DXGI_FORMAT dxgi_format)
 
static DXGI_HDR_METADATA_HDR10 GetDXGIHDR10MetaData (CRenderBuffer *rb)
 

Protected Member Functions

 CRendererBase (CVideoSettings &videoSettings)
 
bool CreateIntermediateTarget (unsigned int width, unsigned int height, bool dynamic=false, DXGI_FORMAT format=DXGI_FORMAT_UNKNOWN)
 
void OnCMSConfigChanged (AVColorPrimaries srcPrimaries)
 
void ReorderDrawPoints (const CRect &destRect, CPoint(&rotatedPoints)[4]) const
 
bool CreateRenderBuffer (int index)
 
void DeleteRenderBuffer (int index)
 
void ProcessHDR (CRenderBuffer *rb)
 
bool ActualRenderAsHDR ()
 Call after rendering has started to find out if the output is configured as SDR or HDR.
 
virtual void RenderImpl (CD3DTexture &target, CRect &sourceRect, CPoint(&destPoints)[4], uint32_t flags)=0
 
virtual void FinalOutput (CD3DTexture &source, CD3DTexture &target, const CRect &sourceRect, const CPoint(&destPoints)[4])
 
virtual CRenderBufferCreateBuffer ()=0
 
virtual void UpdateVideoFilters ()
 
virtual void CheckVideoParameters ()
 
virtual void OnViewSizeChanged ()
 
virtual void OnOutputReset ()
 
virtual std::string GetRenderMethodDebugInfo () const
 

Static Protected Member Functions

static bool IntendToRenderAsHDR (const VideoPicture &picture)
 Call before rendering begins to find out if rendering will be attempted as SDR or HDR.
 

Protected Attributes

bool m_toneMapping = false
 
bool m_useDithering = false
 
bool m_cmsOn = false
 
bool m_lutIsLoading = false
 
bool m_useHLGtoPQ = false
 
ETONEMAPMETHOD m_toneMapMethod = VS_TONEMAPMETHOD_OFF
 
int m_iBufferIndex = 0
 
int m_iNumBuffers = 0
 
int m_iBuffersRequired = 0
 
int m_ditherDepth = 0
 
int m_cmsToken = -1
 
int m_lutSize = 0
 
unsigned m_sourceWidth = 0
 
unsigned m_sourceHeight = 0
 
unsigned m_viewWidth = 0
 
unsigned m_viewHeight = 0
 
unsigned m_renderOrientation = 0
 
float m_fps = 0.0f
 
uint64_t m_frameIdx = 0
 
AVPixelFormat m_format = AV_PIX_FMT_NONE
 
CD3DTexture m_IntermediateTarget
 
std::shared_ptr< COutputShaderm_outputShader
 
std::unique_ptr< CColorManagerm_colorManager
 
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > m_pLUTView
 
CVideoSettingsm_videoSettings
 
std::map< int, CRenderBuffer * > m_renderBuffers
 
DXGI_HDR_METADATA_HDR10 m_lastHdr10 = {}
 
HDR_TYPE m_HdrType = HDR_TYPE::HDR_INVALID
 
bool m_AutoSwitchHDR = false
 
bool m_initialHdrEnabled = false
 
std::string m_renderMethodName
 

Constructor & Destructor Documentation

◆ ~CRendererBase()

CRendererBase::~CRendererBase ( )
virtual

◆ CRendererBase()

CRendererBase::CRendererBase ( CVideoSettings & videoSettings)
explicitprotected

Member Function Documentation

◆ ActualRenderAsHDR()

bool CRendererBase::ActualRenderAsHDR ( )
inlineprotected

Call after rendering has started to find out if the output is configured as SDR or HDR.

Returns
true: HDR output, false: SDR output

◆ AddVideoPicture()

void CRendererBase::AddVideoPicture ( const VideoPicture & picture,
int index )

◆ CheckVideoParameters()

void CRendererBase::CheckVideoParameters ( )
protectedvirtual

Reimplemented in CRendererDXVA, CRendererHQ, and CRendererShaders.

◆ Configure()

bool CRendererBase::Configure ( const VideoPicture & picture,
float fps,
unsigned int orientation )
virtual

◆ CreateBuffer()

virtual CRenderBuffer * CRendererBase::CreateBuffer ( )
protectedpure virtual

◆ CreateIntermediateTarget()

bool CRendererBase::CreateIntermediateTarget ( unsigned int width,
unsigned int height,
bool dynamic = false,
DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN )
protected

◆ CreateRenderBuffer()

bool CRendererBase::CreateRenderBuffer ( int index)
protected

◆ DeleteRenderBuffer()

void CRendererBase::DeleteRenderBuffer ( int index)
protected

◆ FinalOutput()

void CRendererBase::FinalOutput ( CD3DTexture & source,
CD3DTexture & target,
const CRect & sourceRect,
const CPoint(&) destPoints[4] )
protectedvirtual

Reimplemented in CRendererHQ, and CRendererSoftware.

◆ Flush()

bool CRendererBase::Flush ( bool saveBuffers)

◆ GetAVFormat()

AVPixelFormat CRendererBase::GetAVFormat ( DXGI_FORMAT dxgi_format)
static

◆ GetDebugInfo()

DEBUG_INFO_VIDEO CRendererBase::GetDebugInfo ( int idx)

◆ GetDXGIFormat() [1/2]

DXGI_FORMAT CRendererBase::GetDXGIFormat ( const VideoPicture & picture)
static

◆ GetDXGIFormat() [2/2]

DXGI_FORMAT CRendererBase::GetDXGIFormat ( CVideoBuffer * videoBuffer)
static

◆ GetDXGIHDR10MetaData()

DXGI_HDR_METADATA_HDR10 CRendererBase::GetDXGIHDR10MetaData ( CRenderBuffer * rb)
static

◆ GetRenderInfo()

CRenderInfo CRendererBase::GetRenderInfo ( )
virtual

Reimplemented in CRendererDXVA.

◆ GetRenderMethodDebugInfo()

virtual std::string CRendererBase::GetRenderMethodDebugInfo ( ) const
inlineprotectedvirtual

Reimplemented in CRendererDXVA.

◆ IntendToRenderAsHDR()

bool CRendererBase::IntendToRenderAsHDR ( const VideoPicture & picture)
staticprotected

Call before rendering begins to find out if rendering will be attempted as SDR or HDR.

Parameters
picturedescription of the source
Returns
true: intent to render as HDR, false: intent to render as SDR

◆ ManageTextures()

void CRendererBase::ManageTextures ( )

◆ NeedBuffer()

virtual bool CRendererBase::NeedBuffer ( int idx)
inlinevirtual

Reimplemented in CRendererDXVA.

◆ NextBuffer()

int CRendererBase::NextBuffer ( ) const

◆ OnCMSConfigChanged()

void CRendererBase::OnCMSConfigChanged ( AVColorPrimaries srcPrimaries)
protected

◆ OnOutputReset()

virtual void CRendererBase::OnOutputReset ( )
inlineprotectedvirtual

Reimplemented in CRendererHQ.

◆ OnViewSizeChanged()

virtual void CRendererBase::OnViewSizeChanged ( )
inlineprotectedvirtual

◆ ProcessHDR()

void CRendererBase::ProcessHDR ( CRenderBuffer * rb)
protected

◆ ReleaseBuffer()

void CRendererBase::ReleaseBuffer ( int idx)

◆ Render() [1/2]

void CRendererBase::Render ( CD3DTexture & target,
const CRect & sourceRect,
const CRect & destRect,
const CRect & viewRect,
unsigned flags = 0 )

◆ Render() [2/2]

void CRendererBase::Render ( int index,
int index2,
CD3DTexture & target,
const CRect & sourceRect,
const CRect & destRect,
const CRect & viewRect,
unsigned flags )

◆ RenderImpl()

virtual void CRendererBase::RenderImpl ( CD3DTexture & target,
CRect & sourceRect,
CPoint(&) destPoints[4],
uint32_t flags )
protectedpure virtual

◆ ReorderDrawPoints()

void CRendererBase::ReorderDrawPoints ( const CRect & destRect,
CPoint(&) rotatedPoints[4] ) const
protected

◆ SetBufferSize()

void CRendererBase::SetBufferSize ( int numBuffers)
inline

◆ Supports() [1/2]

bool CRendererBase::Supports ( ERENDERFEATURE feature) const
virtual

Reimplemented in CRendererDXVA.

◆ Supports() [2/2]

virtual bool CRendererBase::Supports ( ESCALINGMETHOD method) const
pure virtual

◆ UpdateVideoFilters()

void CRendererBase::UpdateVideoFilters ( )
protectedvirtual

Reimplemented in CRendererHQ, and CRendererShaders.

◆ WantsDoublePass()

virtual bool CRendererBase::WantsDoublePass ( )
inlinevirtual

Reimplemented in CRendererDXVA.

Member Data Documentation

◆ m_AutoSwitchHDR

bool CRendererBase::m_AutoSwitchHDR = false
protected

◆ m_cmsOn

bool CRendererBase::m_cmsOn = false
protected

◆ m_cmsToken

int CRendererBase::m_cmsToken = -1
protected

◆ m_colorManager

std::unique_ptr<CColorManager> CRendererBase::m_colorManager
protected

◆ m_ditherDepth

int CRendererBase::m_ditherDepth = 0
protected

◆ m_format

AVPixelFormat CRendererBase::m_format = AV_PIX_FMT_NONE
protected

◆ m_fps

float CRendererBase::m_fps = 0.0f
protected

◆ m_frameIdx

uint64_t CRendererBase::m_frameIdx = 0
protected

◆ m_HdrType

HDR_TYPE CRendererBase::m_HdrType = HDR_TYPE::HDR_INVALID
protected

◆ m_iBufferIndex

int CRendererBase::m_iBufferIndex = 0
protected

◆ m_iBuffersRequired

int CRendererBase::m_iBuffersRequired = 0
protected

◆ m_initialHdrEnabled

bool CRendererBase::m_initialHdrEnabled = false
protected

◆ m_IntermediateTarget

CD3DTexture CRendererBase::m_IntermediateTarget
protected

◆ m_iNumBuffers

int CRendererBase::m_iNumBuffers = 0
protected

◆ m_lastHdr10

DXGI_HDR_METADATA_HDR10 CRendererBase::m_lastHdr10 = {}
protected

◆ m_lutIsLoading

bool CRendererBase::m_lutIsLoading = false
protected

◆ m_lutSize

int CRendererBase::m_lutSize = 0
protected

◆ m_outputShader

std::shared_ptr<COutputShader> CRendererBase::m_outputShader
protected

◆ m_pLUTView

Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> CRendererBase::m_pLUTView
protected

◆ m_renderBuffers

std::map<int, CRenderBuffer*> CRendererBase::m_renderBuffers
protected

◆ m_renderMethodName

std::string CRendererBase::m_renderMethodName
protected

◆ m_renderOrientation

unsigned CRendererBase::m_renderOrientation = 0
protected

◆ m_sourceHeight

unsigned CRendererBase::m_sourceHeight = 0
protected

◆ m_sourceWidth

unsigned CRendererBase::m_sourceWidth = 0
protected

◆ m_toneMapMethod

ETONEMAPMETHOD CRendererBase::m_toneMapMethod = VS_TONEMAPMETHOD_OFF
protected

◆ m_toneMapping

bool CRendererBase::m_toneMapping = false
protected

◆ m_useDithering

bool CRendererBase::m_useDithering = false
protected

◆ m_useHLGtoPQ

bool CRendererBase::m_useHLGtoPQ = false
protected

◆ m_videoSettings

CVideoSettings& CRendererBase::m_videoSettings
protected

◆ m_viewHeight

unsigned CRendererBase::m_viewHeight = 0
protected

◆ m_viewWidth

unsigned CRendererBase::m_viewWidth = 0
protected

The documentation for this class was generated from the following files: