11 #include "DVDCodecs/Video/DVDVideoCodecFFmpeg.h" 12 #include "DVDCodecs/Video/DXVA.h" 13 #include "VideoRenderers/HwDecRender/DXVAEnumeratorHD.h" 14 #include "VideoRenderers/Windows/RendererBase.h" 15 #include "guilib/D3DResource.h" 16 #include "utils/Geometry.h" 20 #include <wrl/client.h> 28 struct ProcColorSpaces;
37 bool Open(
const VideoPicture& picture, std::shared_ptr<DXVA::CEnumeratorHD> enumerator);
39 bool Render(
CRect src,
CRect dst, ID3D11Resource* target,
CRenderBuffer **views, DWORD flags, UINT frameIdx, UINT rotation,
float contrast,
float brightness);
40 uint8_t PastRefs()
const {
return std::min(m_procCaps.m_rateCaps.PastFrames, 4u); }
50 void OnCreateDevice()
override {}
51 void OnDestroyDevice(
bool)
override 53 std::unique_lock<CCriticalSection> lock(m_section);
57 static bool IsSuperResolutionSuitable(
const VideoPicture& picture);
58 void TryEnableVideoSuperResolution();
59 bool IsVideoSuperResolutionEnabled()
const {
return m_superResolutionEnabled; }
60 bool Supports(ERENDERFEATURE feature)
const;
65 bool CheckFormats()
const;
67 void ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER filter,
int value,
int min,
int max,
int def)
const;
68 ComPtr<ID3D11VideoProcessorInputView> GetInputView(
CRenderBuffer* view)
const;
72 bool CheckVideoParameters(
const CRect& src,
75 const float& contrast,
76 const float& brightness,
79 void EnableIntelVideoSuperResolution();
80 void EnableNvidiaRTXVideoSuperResolution();
82 CCriticalSection m_section;
84 ComPtr<ID3D11VideoDevice> m_pVideoDevice;
85 ComPtr<ID3D11VideoContext> m_pVideoContext;
86 ComPtr<ID3D11VideoProcessor> m_pVideoProcessor;
87 std::shared_ptr<CEnumeratorHD> m_enumerator;
89 AVColorPrimaries m_color_primaries{AVCOL_PRI_UNSPECIFIED};
90 AVColorTransferCharacteristic m_color_transfer{AVCOL_TRC_UNSPECIFIED};
93 bool m_superResolutionEnabled{
false};
95 bool m_isValidConversion{
false};
100 bool m_configured{
false};
103 UINT m_lastInputFrameOrField{0};
104 UINT m_lastOutputIndex{0};
107 UINT m_lastRotation{0};
108 float m_lastContrast{.0f};
109 float m_lastBrightness{.0f};
111 AVColorSpace m_lastColorSpace{AVCOL_SPC_UNSPECIFIED};
112 bool m_lastFullRange{
false};
Definition: RendererBase.h:57
Definition: DXVAEnumeratorHD.h:85
Definition: D3DResource.h:36
Definition: DVDVideoCodec.h:36
Definition: DXVAEnumeratorHD.h:60