Permalink
Browse files

dxva: revert limit of video resolution

Seems most cards gracefully fail, and some card do support larger rez so allow it.
  • Loading branch information...
elupus committed Sep 7, 2013
1 parent f73b5e9 commit e168f22c0d572617faa05445100cb7809d6f142b
Showing with 0 additions and 8 deletions.
  1. +0 −8 xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
@@ -447,14 +447,6 @@ static bool CheckCompatibility(AVCodecContext *avctx)
return false;
}
- // DXVA has this as a max resolution
- if(avctx->width > 1920
- || avctx->height > 1088)
- {
- CLog::Log(LOGDEBUG, "DXVA - frame size (%dx%d) too large - disallowing", avctx->width, avctx->height);
- return false;
- }
-
// Check for hardware limited to H264 L4.1 (ie Bluray).

5 comments on commit e168f22

@da-anda

This comment has been minimized.

Show comment
Hide comment
@da-anda

da-anda Sep 27, 2013

Member

We need to find a way to detect if GPU/driver can handle it or not. Just got a bluescreen because I accidently clicked on a FullSBS video in XBMC. In doubt, make it an advanced-setting, but crashing the entire OS with like 3year old hardware (Core i5, AMD Radeon HD 4500) is really not an option.

Member

da-anda replied Sep 27, 2013

We need to find a way to detect if GPU/driver can handle it or not. Just got a bluescreen because I accidently clicked on a FullSBS video in XBMC. In doubt, make it an advanced-setting, but crashing the entire OS with like 3year old hardware (Core i5, AMD Radeon HD 4500) is really not an option.

@fritsch

This comment has been minimized.

Show comment
Hide comment
@fritsch

fritsch Sep 27, 2013

Member

From reading the code, adding another (there are already two static arrays) with device ids of legacy AMD devices, like:

static DWORD AMDLEGACYDeviceID [] = {
0x95C0, // whatever
0xfffff, // whatever
0x0000
}

combined with:

static bool Has4kResBug(AVCodecContext *avctx)
{
D3DADAPTER_IDENTIFIER9 AIdentifier = g_Windowing.GetAIdentifier();

  if(AIdentifier.VendorId == PCIV_ATI)
  {
    for (unsigned idx = 0; AMDLEGACYDeviceID [idx] != 0; idx++)
      if (AMDLEGACYDeviceID [idx] == AIdentifier.DeviceId)
        return true;
  }
  return false;
}

And just call later:

 // Some dump AMD legacy cards without proper drivers have issues with large surfaces
  if(Has4kResBug(avctx) && (avctx->width  > 1920 || avctx->height > 1088))
  {
    CLog::Log(LOGDEBUG, "DXVA - frame size (%dx%d) too large - disallowing", avctx->width, avctx->height);
    return false;
  }

I think AMD should fix their driver. Bluescreens need to be handled in there.

Member

fritsch replied Sep 27, 2013

From reading the code, adding another (there are already two static arrays) with device ids of legacy AMD devices, like:

static DWORD AMDLEGACYDeviceID [] = {
0x95C0, // whatever
0xfffff, // whatever
0x0000
}

combined with:

static bool Has4kResBug(AVCodecContext *avctx)
{
D3DADAPTER_IDENTIFIER9 AIdentifier = g_Windowing.GetAIdentifier();

  if(AIdentifier.VendorId == PCIV_ATI)
  {
    for (unsigned idx = 0; AMDLEGACYDeviceID [idx] != 0; idx++)
      if (AMDLEGACYDeviceID [idx] == AIdentifier.DeviceId)
        return true;
  }
  return false;
}

And just call later:

 // Some dump AMD legacy cards without proper drivers have issues with large surfaces
  if(Has4kResBug(avctx) && (avctx->width  > 1920 || avctx->height > 1088))
  {
    CLog::Log(LOGDEBUG, "DXVA - frame size (%dx%d) too large - disallowing", avctx->width, avctx->height);
    return false;
  }

I think AMD should fix their driver. Bluescreens need to be handled in there.

@fritsch

This comment has been minimized.

Show comment
Hide comment
@fritsch

fritsch Sep 28, 2013

Member

Or much easier, just disable it for all AMD cards until they fix their drivers.

D3DADAPTER_IDENTIFIER9 AIdentifier = g_Windowing.GetAIdentifier();
if((AIdentifier.VendorId == PCIV_ATI) && (avctx->width  > 1920 || avctx->height > 1088))
{
   CLog::Log(LOGDEBUG, "DXVA - frame size (%dx%d) too large for your AMD card - disallowing", avctx->width, avctx->height);
   return false;
}
Member

fritsch replied Sep 28, 2013

Or much easier, just disable it for all AMD cards until they fix their drivers.

D3DADAPTER_IDENTIFIER9 AIdentifier = g_Windowing.GetAIdentifier();
if((AIdentifier.VendorId == PCIV_ATI) && (avctx->width  > 1920 || avctx->height > 1088))
{
   CLog::Log(LOGDEBUG, "DXVA - frame size (%dx%d) too large for your AMD card - disallowing", avctx->width, avctx->height);
   return false;
}
@da-anda

This comment has been minimized.

Show comment
Hide comment
@da-anda

da-anda Sep 28, 2013

Member

just tested their 13.04 beta driver and the crash is gone, but the entire screen is green now.

Member

da-anda replied Sep 28, 2013

just tested their 13.04 beta driver and the crash is gone, but the entire screen is green now.

@elupus

This comment has been minimized.

Show comment
Hide comment
@elupus

elupus Oct 2, 2013

Member

Argh.. annoying. Suppose we must blacklist ATI here then. Can we get driver version somehow and blacklist 13.04 and older?

Member

elupus replied Oct 2, 2013

Argh.. annoying. Suppose we must blacklist ATI here then. Can we get driver version somehow and blacklist 13.04 and older?

Please sign in to comment.