Frame drops with hardware decoding enabled
#46
We need the green line detection code for automation *ducking* ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#47
reverted back to mr.greenline
Reply
#48
Shall intel die in fire for now ... amen.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#49
(2013-01-13, 21:08)jingai Wrote: Bisected down to commit aad9c2b being the culprit.
Thanks for this. Helped me on my way to get Vda decoding working on my Intel 3000 mini in Frodo.

(2013-01-13, 21:36)davilla Wrote: what that does is force the green-line drawing mode. g_Windowing.GetRenderVendor().Find("Intel") is not working for some reason which is why it was forced
Looking in System info->Video, OpenGL vendor shows "intel inc.". Changing the comparison to lowercase i looks like it works on my machine. Commit https://github.com/Rassi/xbmc/commit/f8a...7eaecf8270

Regarding frame drops, I also noticed them, and begun scouring commits. This caught my eye https://github.com/xbmc/xbmc/commit/7d42...b7fc6f3d2c and it seems like it removes frame drops for intel after I commented it out, so possibly this could be excluded for intel.
Reply
#50
FYI I'm on 10.7.5 and experienced green line issue, so doesn't seem to be isolated to ML.
Reply
#51
(2013-02-10, 16:13)Rassi Wrote: Looking in System info->Video, OpenGL vendor shows "intel inc.". Changing the comparison to lowercase i looks like it works on my machine. Commit https://github.com/Rassi/xbmc/commit/f8a...7eaecf8270

Regarding frame drops, I also noticed them, and begun scouring commits. This caught my eye https://github.com/xbmc/xbmc/commit/7d42...b7fc6f3d2c and it seems like it removes frame drops for intel after I commented it out, so possibly this could be excluded for intel.

Reverting 7d42c13 and changing comparison to lowercase here and going to test. Will let you all know if it solves the problem for me too.
Reply
#52
With the two changes above, I now have no green line and no frame drops Smile
Reply
#53
(2013-02-11, 14:39)jingai Wrote: With the two changes above, I now have no green line and no frame drops Smile

Great news,
So what do i have to do to also resolve this ? Can you give some instructions ?
Or will it be cooked up in a patch ?

Again excelllent work !!!
How to post a debug log ; MacOS acces the hidden userdata folder ; How to post a question ; How to fix gatekeeper issues
Reply
#54
(2013-02-11, 18:32)Walt74 Wrote:
(2013-02-11, 14:39)jingai Wrote: With the two changes above, I now have no green line and no frame drops Smile

So what do i have to do to also resolve this ? Can you give some instructions ?
Or will it be cooked up in a patch ?

For now you'd have to build from sources. I can put up my build for you tonight if you're on 64-bit OSX. Or just wait -- I suspect it'll be patched in git soon enough.
Reply
#55
@jingai, please post a diff of what you changed, I want to be 100 percent on what you changed. THx.
Reply
#56
I just removed the ATI workaround, but you'll probably want to use GetRenderVendor() to skip it if it's 'intel'. But here ya go:

Code:
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
index 2f27c68..4b96a1e 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
@@ -804,8 +804,7 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
     }
  
     m_use_cvBufferRef = true;
-#if 0
-    //TODO fix after Frodo if (g_Windowing.GetRenderVendor().Find("Intel") > -1)
+    if (g_Windowing.GetRenderVendor().Find("intel") > -1)
     {
       m_dllSwScale = new DllSwScale;
       if (!m_dllSwScale->Load())
@@ -848,7 +847,6 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)

       m_use_cvBufferRef = false;
     }
-#endif

     // setup the decoder configuration dict
     CFMutableDictionaryRef decoderConfiguration = CFDictionaryCreateMutable(
@@ -1023,10 +1021,6 @@ 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_queue_depth < m_max_ref_frames)
     return VC_BUFFER;
Reply
#57
maybe

if (g_Windowing.GetRenderVendor().Find("ati") > -1)

for the ATI GPU workaround ?

Code:
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
index 2f27c68..9e33be6 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
@@ -804,8 +804,8 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
     }
  
     m_use_cvBufferRef = true;
-#if 0
-    //TODO fix after Frodo if (g_Windowing.GetRenderVendor().Find("Intel") > -1)
+
+    if (g_Windowing.GetRenderVendor().Find("intel") > -1)
     {
       m_dllSwScale = new DllSwScale;
       if (!m_dllSwScale->Load())
@@ -848,7 +848,6 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)

       m_use_cvBufferRef = false;
     }
-#endif

     // setup the decoder configuration dict
     CFMutableDictionaryRef decoderConfiguration = CFDictionaryCreateMutable(
@@ -1023,9 +1022,11 @@ 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 (g_Windowing.GetRenderVendor().Find("ati") > -1)
+    // 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;
Reply
#58
(2013-02-11, 21:16)davilla Wrote: maybe

if (g_Windowing.GetRenderVendor().Find("ati") > -1)

for the ATI GPU workaround ?

That was my first thought, but I wasn't sure if that would catch all of the GPUs that the workaround was originally for.

Also, can the case be different (e.g., "ati" vs "ATI") for different hardware? Maybe a case-insensitive compare (for the intel one too)?
Reply
#59
if (g_Windowing.GetRenderVendor().Left(5).CompareNoCase("intel") !=0)
{
// I canHz Intel
}
Reply
#60
Wasn't asking how Smile Was asking if mixed-case in the wild was a possibility. If it is, probably should be a case-insensitive compare for both.

Haven't compiled/tested yet, but I presume this should do the trick:

Code:
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
index 2f27c68..7da5d5a 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
@@ -804,8 +804,7 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
     }
  
     m_use_cvBufferRef = true;
-#if 0
-    //TODO fix after Frodo if (g_Windowing.GetRenderVendor().Find("Intel") > -1)
+    if (g_Windowing.GetRenderVendor().Left(5).CompareNoCase("intel") != 0)
     {
       m_dllSwScale = new DllSwScale;
       if (!m_dllSwScale->Load())
@@ -848,7 +847,6 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)

       m_use_cvBufferRef = false;
     }
-#endif

     // setup the decoder configuration dict
     CFMutableDictionaryRef decoderConfiguration = CFDictionaryCreateMutable(
@@ -1023,9 +1021,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 (g_Windowing.GetRenderVendor().Left(3).CompareNoCase("ati") != 0)
+  {
+    // 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;

I'll test when I get home to make sure it still works on intel.
Reply

Logout Mark Read Team Forum Stats Members Help
Frame drops with hardware decoding enabled0