Skip to content
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...
1 parent f73b5e9 commit e168f22c0d572617faa05445100cb7809d6f142b @elupus elupus committed
Showing with 0 additions and 8 deletions.
  1. +0 −8 xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
View
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
Team Kodi 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.

@fritsch
Team Kodi 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.

@fritsch
Team Kodi 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;
}
@da-anda
Team Kodi member

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

@elupus
Team Kodi member

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.
Something went wrong with that request. Please try again.