Skip to content

Commit

Permalink
Merge pull request #88 from fritsch/xvba-eden
Browse files Browse the repository at this point in the history
xvba: cherry-pick 2k fix and the decoder string
  • Loading branch information
FernetMenta committed Nov 4, 2012
2 parents 4eb9ee7 + cab6650 commit d711d90
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, unsigne
#elif defined(_LINUX) && !defined(__APPLE__)
hwSupport += "VAAPI:no ";
#endif
#if defined(HAVE_LIBXVBA) && defined(TARGET_LINUX)
hwSupport += "XVBA:yes ";
#elif defined(TARGET_LINUX)
hwSupport += "XVBA:no ";
#endif

CLog::Log(LOGDEBUG, "CDVDFactoryCodec: compiled in hardware support: %s", hwSupport.c_str());

Expand Down
15 changes: 15 additions & 0 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,21 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned
return false;
}

// Fixme: Revisit with new SDK
// Workaround for 0.74.01-AES-2 that does not signal if surfaces are too large
// it seems that xvba does not support anything > 2k
// return false, for files that are larger
// if you are unlucky, this would kill your decoder
// we limit to 2048x1536(+8) now - as this was tested working
int surfaceWidth = (avctx->coded_width+15) & ~15;
int surfaceHeight = (avctx->coded_height+15) & ~15;
if(surfaceHeight > 1544 || surfaceWidth > 2048)
{
CLog::Log(LOGERROR, "Surface too large, decoder skipped: surfaceWidth %u, surfaceHeight %u",
surfaceWidth, surfaceHeight);
return false;
}

if (!m_dllAvUtil.Load())
return false;

Expand Down

0 comments on commit d711d90

Please sign in to comment.