[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>
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. </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. 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. </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> </div>
<div>Thanks,</div>
<div> </div>
<div>Junhong</div>
<div> </div>
<div> </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 \
1.138.12.1.2.2</div> <div>+++ hxflsrc.cpp 23 Sep 2010 14:34:09 \
-0000</div> <div>@@ -109,6 +109,13 @@</div>
<div> #define SOURCE_TIMELINE_TOL 500</div>
<div> #define LOCALSOURCE_FAST_START_BW_CAPACITY_THRESHOLD \
150 // A percentage of source bitrate</div> <div> </div>
<div>+#ifdef _SYMBIAN</div>
<div>+#define MAX_NUM_EVENTS 5</div>
<div>+#else</div>
<div>+#define MAX_NUM_EVENTS 0</div>
<div>+#endif</div>
<div>+</div>
<div>+</div>
<div> HXFileSource::HXFileSource() </div>
<div> : m_lRefCount(0)</div>
<div> , m_ulLastBufferingReturned(0)</div>
<div>@@ -2804,8 +2811,15 @@</div>
<div> </div>
<div> if(!m_bInFillMode)</div>
<div> {</div>
<div>+ if (lEventList->GetNumEvents() <= MAX_NUM_EVENTS) \
</div> <div>+ {</div>
<div> \
FillBuffers(HX_GET_BETTERTICKCOUNT());</div> <div> }</div>
<div>+ else</div>
<div>+ {</div>
<div>+ \
m_pSourceInfo->ScheduleProcessCallback();</div> <div>+ \
}</div> <div>+ }</div>
<div> </div>
<div> if (!theErr)</div>
<div> {</div>
<div>@@ -3423,7 +3437,7 @@</div>
<div> </div>
<div> if \
(!lpStreamInfo->m_bSrcStreamDone)</div> \
<div> {</div> \
<div>- if \
(lpStreamInfo->m_EventList.GetNumEvents() == 0)</div> \
<div>+ if \
(lpStreamInfo->m_EventList.GetNumEvents() <= MAX_NUM_EVENTS)</div> \
<div> {</div> \
<div> \
bHasUnfilledStreams = TRUE;</div> <div> </div>
<div>@@ -3439,7 +3453,7 @@</div>
<div> </div>
<div> if \
(!lpStreamInfo->m_bPacketRequested)</div> \
<div> {</div> \
<div>- \
if (lpStreamInfo->m_EventList.GetNumEvents() == 0)</div> \
<div>+ \
if (lpStreamInfo->m_EventList.GetNumEvents() <= MAX_NUM_EVENTS)</div> \
<div> \
{</div> <div> \
lpStreamInfoOut = lpStreamInfo;</div> \
<div> \
bSelectedStream = TRUE;</div> <div> </div>
<div> </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 26 Feb 2010 21:15:12 \
-0000 1.22.10.1</div> <div>+++ \
symbianthreads.cpp 23 Sep 2010 15:39:18 -0000</div> <div>@@ -963,10 +963,6 \
@@</div> <div> HX_ASSERT( pTimer != NULL );</div>
<div> if( pTimer != NULL )</div>
<div> {</div>
<div>- //Make sure the timeout is an even \
multiple of our</div> <div>- //system tick. \
15ms for Symbian phones we have ported</div> \
<div>- //to so far. XXXgfw get this from a \
Symbian call.</div> <div>- ulTimeOut = \
ulTimeOut/15*15;</div> <div> \
pTimer->Init(ulTimeOut, pReceivingThread );</div> <div> </div>
<div> //Add new timer to map.</div>
<div>@@ -1007,7 +1003,6 @@</div>
<div> HX_ASSERT( pTimer != NULL );</div>
<div> if( pTimer != NULL )</div>
<div> {</div>
<div>- ulTimeOut = ulTimeOut/15*15;</div>
<div> pTimer->Init(ulTimeOut, \
pfExecFunc );</div> <div> </div>
<div> //Add new timer to map.</div>
<div> </div>
<div> </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