Skip to content
Browse files

[osx] fixs #13907, fixes #13740 and tastes good too. VDA issues on in…

…tel/ati GPUs
  • Loading branch information...
1 parent dc28054 commit 5cee1fe5369d3a521679d9dcff3a78896cc697c4 @davilla davilla committed Feb 11, 2013
View
22 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
@@ -802,10 +802,16 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
CFRelease(avcCData);
return false;
}
-
+
+ CStdString rendervendor = g_Windowing.GetRenderVendor();
+ rendervendor.MakeLower();
+
+ m_decode_async = true;
+ if (rendervendor.find("ati technologies") != std::string::npos)
+ m_decode_async = false;
+
m_use_cvBufferRef = true;
-#if 0
- //TODO fix after Frodo if (g_Windowing.GetRenderVendor().Find("Intel") > -1)
+ if (rendervendor.find("intel corporation") != std::string::npos)
{
m_dllSwScale = new DllSwScale;
if (!m_dllSwScale->Load())
@@ -848,7 +854,6 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
m_use_cvBufferRef = false;
}
-#endif
// setup the decoder configuration dict
CFMutableDictionaryRef decoderConfiguration = CFDictionaryCreateMutable(
@@ -1023,9 +1028,12 @@ int CDVDVideoCodecVDA::Decode(BYTE* pData, int iSize, double dts, double pts)
}
}
- // force synchronous decode to fix issues with ATI GPUs,
- // we still have to sort returned frames by pts to handle out-of-order demuxer packets.
- m_dll->VDADecoderFlush((VDADecoder)m_vda_decoder, kVDADecoderFlush_EmitFrames);
+ if (!m_decode_async)
+ {
+ // force synchronous decode to fix issues with ATI GPUs,
+ // we still have to sort returned frames by pts to handle out-of-order demuxer packets.
+ m_dll->VDADecoderFlush((VDADecoder)m_vda_decoder, kVDADecoderFlush_EmitFrames);
+ }
if (m_queue_depth < m_max_ref_frames)
return VC_BUFFER;
View
1 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.h
@@ -68,6 +68,7 @@ class CDVDVideoCodecVDA : public CDVDVideoCodec
int32_t m_format;
const char *m_pFormatName;
bool m_DropPictures;
+ bool m_decode_async;
double m_sort_time_offset;
pthread_mutex_t m_queue_mutex; // mutex protecting queue manipulation

0 comments on commit 5cee1fe

Please sign in to comment.
Something went wrong with that request. Please try again.