Permalink
Browse files

Merge pull request #88 from fritsch/xvba-eden

xvba: cherry-pick 2k fix and the decoder string
  • Loading branch information...
2 parents 4eb9ee7 + cab6650 commit d711d90f7d3669738d3b4f8fa7d90ea3025e4cc2 @FernetMenta committed Nov 4, 2012
@@ -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());
@@ -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;

0 comments on commit d711d90

Please sign in to comment.