[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-filesystem-dev
Subject:    [Filesystem-dev] CR needed: Symbian 420Brizo/HEAD : Constant
From:       <Junhong.Liu () nokia ! com>
Date:       2010-09-23 21:28:52
Message-ID: 673F5EF8B307EB4488DDABBBD521B327015DD2 () 008-AM1MPN1-003 ! mgdnok ! nokia ! com
[Download RAW message or body]

Modified by: Junhong.liu@nokia.com
Reviewed by: Ashish.As.Gupta@nokia.com
Date: 09/23/2010
Project: symbian_client_apps
ErrorId: ou1cimx1#562804
Synopsis: Constant reloading for high frame rate clips
Overview:
For Brizo420 and HEAD branches, we are experiencing long start-up time, constant \
reloading, and less CPU idle time on Power Save mode. This was introduced by the \
change http://lists.helixcommunity.org/pipermail/helix-client-dev/2006-August/004927.html \
on FillBuffers() logic.   On asynchronous file i/o, each HXPlayer::ProcessIdle() \
(30ms interval) can only read one packet at most.  This was the root cause of  all \
these problems. This CR is to issue another FillBuffers() in PacketReady callback \
until 5 packets are received. After that, schedule an immediate SourceInfo callback \
to move these 5 packets to Renderer.  The reason of choosing 5 as max is because : 1) \
if the number is too big, then we fill data too far ahead and load too much data to \
RAM.  2) If we can read 5 packets in 30ms interval, prerolling 1 second of 30fps clip \
will take 180ms. This is good enough for us. Together with this CR, I also removed \
the 15 ms (1/64 second) restriction on Rtimer's resolution because it has been \
changed to 1ms since EKA2 Files Added:
None.
Files Modified:
client/core/hxflsrc.cpp
common/system/platform/symbian/symbianthreads.cpp
Image Size and Heap Use impact: minor
Module Release testing (STIF) : ongoing
Test case(s) Added : No.
Memory leak check performed : Yes. No new leaks introduced
Platforms and Profiles Build Verified:
helix-client-symbian-4
Platforms and Profiles Functionality verified: armv5, winscw
Branch: 420Brizo, HEAD

Thanks,

Junhong


===================================================================
RCS file: /cvsroot/client/core/hxflsrc.cpp,v
retrieving revision 1.138.12.1.2.2
diff -w -u -r1.138.12.1.2.2 hxflsrc.cpp
--- hxflsrc.cpp 5 Mar 2010 13:18:41 -0000       1.138.12.1.2.2
+++ hxflsrc.cpp 23 Sep 2010 14:34:09 -0000
@@ -109,6 +109,13 @@
 #define SOURCE_TIMELINE_TOL  500
 #define LOCALSOURCE_FAST_START_BW_CAPACITY_THRESHOLD   150     // A percentage of \
source bitrate

+#ifdef _SYMBIAN
+#define MAX_NUM_EVENTS 5
+#else
+#define MAX_NUM_EVENTS 0
+#endif
+
+
 HXFileSource::HXFileSource()
     : m_lRefCount(0)
     , m_ulLastBufferingReturned(0)
@@ -2804,8 +2811,15 @@

     if(!m_bInFillMode)
     {
+    if (lEventList->GetNumEvents() <= MAX_NUM_EVENTS)
+    {
         FillBuffers(HX_GET_BETTERTICKCOUNT());
     }
+    else
+    {
+        m_pSourceInfo->ScheduleProcessCallback();
+    }
+    }

     if (!theErr)
     {
@@ -3423,7 +3437,7 @@

        if (!lpStreamInfo->m_bSrcStreamDone)
        {
-           if (lpStreamInfo->m_EventList.GetNumEvents() == 0)
+           if (lpStreamInfo->m_EventList.GetNumEvents() <= MAX_NUM_EVENTS)
            {
                bHasUnfilledStreams = TRUE;

@@ -3439,7 +3453,7 @@

            if (!lpStreamInfo->m_bPacketRequested)
            {
-               if (lpStreamInfo->m_EventList.GetNumEvents() == 0)
+               if (lpStreamInfo->m_EventList.GetNumEvents() <= MAX_NUM_EVENTS)
                {
                    lpStreamInfoOut = lpStreamInfo;
                    bSelectedStream = TRUE;


Index: symbianthreads.cpp
===================================================================
RCS file: /cvsroot/common/system/platform/symbian/symbianthreads.cpp,v
retrieving revision 1.22.10.1
diff -w -u -r1.22.10.1 symbianthreads.cpp
--- symbianthreads.cpp  26 Feb 2010 21:15:12 -0000      1.22.10.1
+++ symbianthreads.cpp  23 Sep 2010 15:39:18 -0000
@@ -963,10 +963,6 @@
     HX_ASSERT( pTimer != NULL );
     if( pTimer != NULL )
     {
-        //Make sure the timeout is an even multiple of our
-        //system tick. 15ms for Symbian phones we have ported
-        //to so far. XXXgfw get this from a Symbian call.
-        ulTimeOut = ulTimeOut/15*15;
         pTimer->Init(ulTimeOut, pReceivingThread );

         //Add new timer to map.
@@ -1007,7 +1003,6 @@
     HX_ASSERT( pTimer != NULL );
     if( pTimer != NULL )
     {
-        ulTimeOut = ulTimeOut/15*15;
         pTimer->Init(ulTimeOut, pfExecFunc );

         //Add new timer to map.


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 \
2px solid; } --></style> </head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div style="margin-top:5pt;margin-bottom:5pt;">Modified by: \
Junhong.liu@nokia.com</div> <div style="margin-top:5pt;margin-bottom:5pt;">Reviewed \
by<font color="blue">: </font>Ashish.As.Gupta@nokia.com</div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Date: 09/23/2010 </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Project: symbian_client_apps </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">ErrorId: ou1cimx1#562804</div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Synopsis: Constant reloading for high frame \
rate clips</div> <div style="margin-top:5pt;margin-bottom:5pt;">Overview: </div>
<div style="margin-top:5pt;margin-bottom:5pt;">For Brizo420 and HEAD branches, we are \
experiencing long start-up time, constant reloading, and less CPU idle time on Power \
Save mode. This was introduced by the change </div> <div \
style="margin-top:5pt;margin-bottom:5pt;"><a \
href="http://lists.helixcommunity.org/pipermail/helix-client-dev/2006-August/004927.html"><font \
color="blue"><u>http://lists.helixcommunity.org/pipermail/helix-client-dev/2006-August/004927.html</u></font></a>&nbsp;
 on FillBuffers() logic.&nbsp;  On asynchronous file i/o, each \
HXPlayer::ProcessIdle() (30ms interval) can only read one packet at most.&nbsp; This \
was the root cause of&nbsp; all these problems. </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">This CR is to issue another FillBuffers() \
in PacketReady callback until 5 packets are received. After that, schedule an \
immediate SourceInfo callback to move these 5 packets to Renderer.&nbsp; The reason \
of choosing 5 as max is because : 1) if the number is too big, then we fill data too \
far ahead and load too much data to RAM.&nbsp; 2) If we can read 5 packets in 30ms \
interval, prerolling 1 second of 30fps clip will take 180ms. This is good enough for \
us. </div> <div style="margin-top:5pt;margin-bottom:5pt;">Together with this CR, I \
also removed the 15 ms (1/64 second) restriction on Rtimer's resolution because it \
has been changed to 1ms since EKA2 </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Files Added: </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">None. </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Files Modified: </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">client/core/hxflsrc.cpp</div> <div \
style="margin-top:5pt;margin-bottom:5pt;">common/system/platform/symbian/symbianthreads.cpp</div>
 <div style="margin-top:5pt;margin-bottom:5pt;">Image Size and Heap Use impact: minor \
</div> <div style="margin-top:5pt;margin-bottom:5pt;">Module Release testing (STIF) : \
ongoing </div> <div style="margin-top:5pt;margin-bottom:5pt;">Test case(s) Added : \
No. </div> <div style="margin-top:5pt;margin-bottom:5pt;">Memory leak check performed \
: Yes. No new leaks introduced </div> <div \
style="margin-top:5pt;margin-bottom:5pt;">Platforms and Profiles Build Verified: \
</div> <div style="margin-top:5pt;margin-bottom:5pt;">helix-client-symbian-4 </div>
<div style="margin-top:5pt;margin-bottom:5pt;">Platforms and Profiles Functionality \
verified: armv5, winscw </div> <div style="margin-top:5pt;margin-bottom:5pt;">Branch: \
420Brizo, HEAD</div> <div>&nbsp;</div>
<div>Thanks,</div>
<div>&nbsp;</div>
<div>Junhong</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>===================================================================</div>
<div>RCS file: /cvsroot/client/core/hxflsrc.cpp,v</div>
<div>retrieving revision 1.138.12.1.2.2</div>
<div>diff -w -u -r1.138.12.1.2.2 hxflsrc.cpp</div>
<div>--- hxflsrc.cpp 5 Mar 2010 13:18:41 -0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
1.138.12.1.2.2</div> <div>&#43;&#43;&#43; hxflsrc.cpp 23 Sep 2010 14:34:09 \
-0000</div> <div>@@ -109,6 &#43;109,13 @@</div>
<div> #define SOURCE_TIMELINE_TOL&nbsp; 500</div>
<div> #define LOCALSOURCE_FAST_START_BW_CAPACITY_THRESHOLD&nbsp;&nbsp; \
150&nbsp;&nbsp;&nbsp;&nbsp; // A percentage of source bitrate</div> <div>&nbsp;</div>
<div>&#43;#ifdef _SYMBIAN</div>
<div>&#43;#define MAX_NUM_EVENTS 5</div>
<div>&#43;#else</div>
<div>&#43;#define MAX_NUM_EVENTS 0</div>
<div>&#43;#endif</div>
<div>&#43;</div>
<div>&#43;</div>
<div> HXFileSource::HXFileSource() </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; : m_lRefCount(0)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; , m_ulLastBufferingReturned(0)</div>
<div>@@ -2804,8 &#43;2811,15 @@</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; if(!m_bInFillMode)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>&#43;&nbsp;&nbsp;&nbsp; if (lEventList-&gt;GetNumEvents() &lt;= MAX_NUM_EVENTS) \
</div> <div>&#43;&nbsp;&nbsp;&nbsp; {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
FillBuffers(HX_GET_BETTERTICKCOUNT());</div> <div>&nbsp;&nbsp;&nbsp;&nbsp; }</div>
<div>&#43;&nbsp;&nbsp;&nbsp; else</div>
<div>&#43;&nbsp;&nbsp;&nbsp; {</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
m_pSourceInfo-&gt;ScheduleProcessCallback();</div> <div>&#43;&nbsp;&nbsp;&nbsp; \
}</div> <div>&#43;&nbsp;&nbsp;&nbsp; }</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; if (!theErr)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>@@ -3423,7 &#43;3437,7 @@</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if \
(!lpStreamInfo-&gt;m_bSrcStreamDone)</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div> \
<div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if \
(lpStreamInfo-&gt;m_EventList.GetNumEvents() == 0)</div> \
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if \
(lpStreamInfo-&gt;m_EventList.GetNumEvents() &lt;= MAX_NUM_EVENTS)</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
bHasUnfilledStreams = TRUE;</div> <div>&nbsp;</div>
<div>@@ -3439,7 &#43;3453,7 @@</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if \
(!lpStreamInfo-&gt;m_bPacketRequested)</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div> \
<div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
if (lpStreamInfo-&gt;m_EventList.GetNumEvents() == 0)</div> \
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
if (lpStreamInfo-&gt;m_EventList.GetNumEvents() &lt;= MAX_NUM_EVENTS)</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
{</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
lpStreamInfoOut = lpStreamInfo;</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
bSelectedStream = TRUE;</div> <div>&nbsp;</div>
<div>&nbsp;</div>
<div>Index: symbianthreads.cpp</div>
<div>===================================================================</div>
<div>RCS file: /cvsroot/common/system/platform/symbian/symbianthreads.cpp,v</div>
<div>retrieving revision 1.22.10.1</div>
<div>diff -w -u -r1.22.10.1 symbianthreads.cpp</div>
<div>--- symbianthreads.cpp&nbsp; 26 Feb 2010 21:15:12 \
-0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.22.10.1</div> <div>&#43;&#43;&#43; \
symbianthreads.cpp&nbsp; 23 Sep 2010 15:39:18 -0000</div> <div>@@ -963,10 &#43;963,6 \
@@</div> <div>&nbsp;&nbsp;&nbsp;&nbsp; HX_ASSERT( pTimer != NULL );</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; if( pTimer != NULL )</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Make sure the timeout is an even \
multiple of our</div> <div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //system tick. \
15ms for Symbian phones we have ported</div> \
<div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //to so far. XXXgfw get this from a \
Symbian call.</div> <div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulTimeOut = \
ulTimeOut/15*15;</div> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
pTimer-&gt;Init(ulTimeOut, pReceivingThread );</div> <div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Add new timer to map.</div>
<div>@@ -1007,7 &#43;1003,6 @@</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; HX_ASSERT( pTimer != NULL );</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; if( pTimer != NULL )</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulTimeOut = ulTimeOut/15*15;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pTimer-&gt;Init(ulTimeOut, \
pfExecFunc );</div> <div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Add new timer to map.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>



_______________________________________________
Filesystem-dev mailing list
Filesystem-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev

--===============1305883299==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic