Skip to content

Commit

Permalink
Merge pull request #3781 from afedchin/dxva-hd-fix-warn
Browse files Browse the repository at this point in the history
[dxva-hd] remove mistakenly redefined members
  • Loading branch information
wsoltys committed Dec 7, 2013
2 parents 45c7af5 + 828ec6b commit 3907cde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
14 changes: 7 additions & 7 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,23 @@ bool CProcessorHD::PreInit()
return false;
}

CHECK(m_pDXVAHD->GetVideoProcessorDeviceCaps( &m_caps ));
CHECK(m_pDXVAHD->GetVideoProcessorDeviceCaps( &m_VPDevCaps ));

if (m_caps.VideoProcessorCount == 0)
if (m_VPDevCaps.VideoProcessorCount == 0)
{
CLog::Log(LOGWARNING, __FUNCTION__" - unable to find any video processor. GPU drivers doesn't support DXVA-HD.");
return false;
}

// Create the array of video processor caps.
DXVAHD_VPCAPS* pVPCaps = new (std::nothrow) DXVAHD_VPCAPS[ m_caps.VideoProcessorCount ];
DXVAHD_VPCAPS* pVPCaps = new (std::nothrow) DXVAHD_VPCAPS[ m_VPDevCaps.VideoProcessorCount ];
if (pVPCaps == NULL)
{
CLog::Log(LOGERROR, __FUNCTION__" - unable to create video processor caps array. Out of memory.");
return false;
}

HRESULT hr = m_pDXVAHD->GetVideoProcessorCaps( m_caps.VideoProcessorCount, pVPCaps );
HRESULT hr = m_pDXVAHD->GetVideoProcessorCaps( m_VPDevCaps.VideoProcessorCount, pVPCaps );
if(FAILED(hr))
{
CLog::Log(LOGERROR, __FUNCTION__" - failed get processor caps with error %x.", hr);
Expand All @@ -225,7 +225,7 @@ bool CProcessorHD::PreInit()
m_max_back_refs = 0;
m_max_fwd_refs = 0;

for (unsigned int i = 0; i < m_caps.VideoProcessorCount; i++)
for (unsigned int i = 0; i < m_VPDevCaps.VideoProcessorCount; i++)
{
if (pVPCaps[i].FutureFrames > m_max_fwd_refs)
{
Expand All @@ -243,7 +243,7 @@ bool CProcessorHD::PreInit()
// Get the image filtering capabilities.
for (long i = 0; i < NUM_FILTERS; i++)
{
if (m_caps.FilterCaps & (1 << i))
if (m_VPDevCaps.FilterCaps & (1 << i))
{
m_pDXVAHD->GetVideoProcessorFilterRange(PROCAMP_FILTERS[i], &m_Filters[i].Range);
m_Filters[i].bSupported = true;
Expand Down Expand Up @@ -361,7 +361,7 @@ bool CProcessorHD::CreateSurfaces()
(m_width + 15) & ~15,
(m_height + 15) & ~15,
m_format,
m_caps.InputPool,
m_VPDevCaps.InputPool,
&m_surfaces[idx],
NULL));

Expand Down
12 changes: 1 addition & 11 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ class CProcessorHD

IDXVAHD_Device *m_pDXVAHD; // DXVA-HD device.
IDXVAHD_VideoProcessor *m_pDXVAVP; // DXVA-HD video processor.
DXVAHD_VPDEVCAPS m_caps;
DXVAHD_VPDEVCAPS m_VPDevCaps;
DXVAHD_VPCAPS m_VPCaps;
GUID m_device;
unsigned int m_width;
unsigned int m_height;
D3DFORMAT m_format;
Expand All @@ -100,15 +99,6 @@ class CProcessorHD
};
typedef std::deque<SFrame> SFrames;
SFrames m_frames;

CSurfaceContext* m_context;
unsigned m_size;
unsigned m_max_back_refs;
unsigned m_max_fwd_refs;
unsigned m_index;

LPDIRECT3DSURFACE9* m_surfaces;
CCriticalSection m_section;
};

};

0 comments on commit 3907cde

Please sign in to comment.