home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
MediaPortal Audio renderer - better video playback quality
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="tourettes" data-source="post: 661532" data-attributes="member: 10858"><p>Just wondering about how to detect the A/V sync drifting (we must assume that the EVR presenter itself is not causing any drifting... otherwise it will get too complex - but the dropped frames should make the piling up of the error impossible).</p><p></p><p>Would following give use the required debug info?</p><p></p><p>[code]</p><p>if (m_dStartQpcHW == 0)</p><p> m_dStartQpcHW = hwQpc;</p><p></p><p> if (m_dStartTimeHW == 0)</p><p> m_dStartTimeHW = hwClock;</p><p></p><p> if (m_dStartTimeSystem == 0)</p><p> m_dStartTimeSystem = dwTime;</p><p></p><p> if (m_dStartTimeCorrected == 0)</p><p> m_dStartTimeCorrected = m_rtPrivateTime;</p><p></p><p> m_dDurationHW = (hwClock - m_dStartTimeHW) / 10000;</p><p> m_dDurationSystem = (dwTime - m_dStartTimeSystem); </p><p> m_dDurationCorrected = (m_rtPrivateTime - m_dStartTimeCorrected) / 10000;</p><p></p><p> //Log("hw: %I64d sys: %I64d cor: %I64d hwsy: %I64d hwcor: %I64d", m_dDurationHW, m_dDurationSystem, m_dDurationCorrected, m_dDurationHW - m_dDurationSystem, m_dDurationHW - m_dDurationCorrected);</p><p></p><p> if (m_dPrevTimeHW > hwClock)</p><p> {</p><p> m_dStartTimeHW = m_dPrevTimeHW = hwClock;</p><p> m_dStartQpcHW = m_dPrevQpcHW = hwQpc;</p><p> m_dStartTimeSystem = dwTime;</p><p> m_dStartTimeCorrected = m_rtPrivateTime;</p><p> }</p><p>[/code]</p><p></p><p>[code]</p><p>void CSyncClock::GetClockData(CLOCKDATA *pClockData)</p><p>{</p><p> // pointer is validated already in CMPAudioRenderer</p><p> pClockData->driftMultiplier = m_dSystemClockMultiplier;</p><p> pClockData->driftHWvsSystem = m_dDurationHW - m_dDurationSystem;</p><p> pClockData->driftHWvsCorrected = m_dDurationHW - m_dDurationCorrected / m_dBias;</p><p>}</p><p>[/code]</p><p></p><p><strong>driftHWvsSystem</strong> <-- drift in this should be constantly going into up or down, with the speed of the driftMultiplier. If that happens the correction should be working ok.</p><p></p><p><strong>driftHWvsCorrected</strong> <-- this should be quite static? If this increases or decreases it should tell us that the A/V sync is failing apart? Of course it wont take the bias into account. Also the adjustment might falsely cause drifting (or it could even cause real drifting).</p><p></p><p>Are those assumptions valid? Or should we use something else to compute the real A/V sync drifting? I really cannot sit in the front of TV / monitor for months to watch the A/V sync slowly getting out of the drift and then make a single code line change after 2 hours have passed (to be able to detect the sync drifting) <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p></blockquote><p></p>
[QUOTE="tourettes, post: 661532, member: 10858"] Just wondering about how to detect the A/V sync drifting (we must assume that the EVR presenter itself is not causing any drifting... otherwise it will get too complex - but the dropped frames should make the piling up of the error impossible). Would following give use the required debug info? [code] if (m_dStartQpcHW == 0) m_dStartQpcHW = hwQpc; if (m_dStartTimeHW == 0) m_dStartTimeHW = hwClock; if (m_dStartTimeSystem == 0) m_dStartTimeSystem = dwTime; if (m_dStartTimeCorrected == 0) m_dStartTimeCorrected = m_rtPrivateTime; m_dDurationHW = (hwClock - m_dStartTimeHW) / 10000; m_dDurationSystem = (dwTime - m_dStartTimeSystem); m_dDurationCorrected = (m_rtPrivateTime - m_dStartTimeCorrected) / 10000; //Log("hw: %I64d sys: %I64d cor: %I64d hwsy: %I64d hwcor: %I64d", m_dDurationHW, m_dDurationSystem, m_dDurationCorrected, m_dDurationHW - m_dDurationSystem, m_dDurationHW - m_dDurationCorrected); if (m_dPrevTimeHW > hwClock) { m_dStartTimeHW = m_dPrevTimeHW = hwClock; m_dStartQpcHW = m_dPrevQpcHW = hwQpc; m_dStartTimeSystem = dwTime; m_dStartTimeCorrected = m_rtPrivateTime; } [/code] [code] void CSyncClock::GetClockData(CLOCKDATA *pClockData) { // pointer is validated already in CMPAudioRenderer pClockData->driftMultiplier = m_dSystemClockMultiplier; pClockData->driftHWvsSystem = m_dDurationHW - m_dDurationSystem; pClockData->driftHWvsCorrected = m_dDurationHW - m_dDurationCorrected / m_dBias; } [/code] [b]driftHWvsSystem[/b] <-- drift in this should be constantly going into up or down, with the speed of the driftMultiplier. If that happens the correction should be working ok. [b]driftHWvsCorrected[/b] <-- this should be quite static? If this increases or decreases it should tell us that the A/V sync is failing apart? Of course it wont take the bias into account. Also the adjustment might falsely cause drifting (or it could even cause real drifting). Are those assumptions valid? Or should we use something else to compute the real A/V sync drifting? I really cannot sit in the front of TV / monitor for months to watch the A/V sync slowly getting out of the drift and then make a single code line change after 2 hours have passed (to be able to detect the sync drifting) :P [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
MediaPortal Audio renderer - better video playback quality
Contact us
RSS
Top
Bottom