<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>73530</bug_id>
          
          <creation_ts>2011-11-30 23:35:24 -0800</creation_ts>
          <short_desc>Optimize to not use pow() in the inner loop in AudioParamTimeline</short_desc>
          <delta_ts>2011-12-13 20:57:17 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Audio</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Wei James (wistoch)">james.wei</reporter>
          <assigned_to name="Wei James (wistoch)">james.wei</assigned_to>
          <cc>crogers</cc>
    
    <cc>james.wei</cc>
    
    <cc>kbr</cc>
    
    <cc>rtoy</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>512532</commentid>
    <comment_count>0</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-11-30 23:35:24 -0800</bug_when>
    <thetext>Optimize to not use pow() in the inner loop</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512545</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-30 23:56:45 -0800</bug_when>
    <thetext>Can you be a little more specific as to what you’d like to optimize to not use pow() in the inner loop?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512559</commentid>
    <comment_count>2</comment_count>
      <attachid>117360</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 00:14:02 -0800</bug_when>
    <thetext>Created attachment 117360
optimize to not use pow in the inner loop</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512561</commentid>
    <comment_count>3</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 00:17:02 -0800</bug_when>
    <thetext>in AudioParamTimeline::valuesForTimeRangeImpl to handle AudioEvent, it is mentioned to optimize to not use pow() in the inner loop as it is just a simple exponential ramp. 

this patch to implement this optimization.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512577</commentid>
    <comment_count>4</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 00:30:16 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can you be a little more specific as to what you’d like to optimize to not use pow() in the inner loop?

an error occurs when I use webkit-patch to create this bug entry and leaves just a simple description. Sorry for it. I have added a more detailed information and patch. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512817</commentid>
    <comment_count>5</comment_count>
    <who name="Raymond Toy">rtoy</who>
    <bug_when>2011-12-01 09:03:13 -0800</bug_when>
    <thetext>Thanks for the patch.  I have not yet examined it, but note that there is some discussion in the audio w3c group (http://lists.w3.org/Archives/Public/public-audio/2011OctDec/0107.html) about what the ramp is supposed to do.  The issue is that the starting value cannot currently be 0, because the ramp is, essentially, value1 * exp(t/T).  The implementation of the ramp may change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512946</commentid>
    <comment_count>6</comment_count>
      <attachid>117360</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-01 11:39:04 -0800</bug_when>
    <thetext>Comment on attachment 117360
optimize to not use pow in the inner loop

Raymond and I both reviewed the math and it looks correct. Despite the fact that the ramp function might be redefined soon, I think it&apos;s worth adding this optimization.

I think the patch needs to be rebaselined to top of tree though. Could you take care of that? r- just for this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>512986</commentid>
    <comment_count>7</comment_count>
    <who name="Raymond Toy">rtoy</who>
    <bug_when>2011-12-01 12:18:53 -0800</bug_when>
    <thetext>Also, can you add a comment on what the formula actually is and what the optimization is now doing to the formula?  I think the original is

v(t) = 2^((1-x(t))*v1 + x(t)*v2) with x(t) = (t-t1)*k

You&apos;ve changed this to be

v(t+dt) = v(t)*2^((v2-v1)*k)

roughly.  This makes it easier to tell that the math is right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513264</commentid>
    <comment_count>8</comment_count>
      <attachid>117522</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 16:41:05 -0800</bug_when>
    <thetext>Created attachment 117522
optimize to not use pow in the inner loop -- updated 

Fix patch top tree issue and add comments to explain the formula</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513267</commentid>
    <comment_count>9</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 16:46:36 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Thanks for the patch.  I have not yet examined it, but note that there is some discussion in the audio w3c group (http://lists.w3.org/Archives/Public/public-audio/2011OctDec/0107.html) about what the ramp is supposed to do.  The issue is that the starting value cannot currently be 0, because the ramp is, essentially, value1 * exp(t/T).  The implementation of the ramp may change.

Raymond, thanks for the information. I noticed the notes Alistair sent out. 

If the final exponential ramp algorithm finalized, I have the interest to implement it then. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513270</commentid>
    <comment_count>10</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 16:49:38 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 117360 [details])
&gt; Raymond and I both reviewed the math and it looks correct. Despite the fact that the ramp function might be redefined soon, I think it&apos;s worth adding this optimization.
&gt; 
&gt; I think the patch needs to be rebaselined to top of tree though. Could you take care of that? r- just for this issue.

Ken, thanks for the review. I have updated the patch based on the top of WebKit tree. Also, I added some comments to explain the algorithm of optimization.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513276</commentid>
    <comment_count>11</comment_count>
      <attachid>117522</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-01 16:51:41 -0800</bug_when>
    <thetext>Comment on attachment 117522
optimize to not use pow in the inner loop -- updated 

Thanks for the update. Looks good. Please use &quot;webkit-patch upload&quot; in the future to upload patches as it will streamline some of the process. If you&apos;d like this committed please mark it &quot;cq?&quot;. r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513290</commentid>
    <comment_count>12</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 17:03:39 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (From update of attachment 117522 [details])
&gt; Thanks for the update. Looks good. Please use &quot;webkit-patch upload&quot; in the future to upload patches as it will streamline some of the process. If you&apos;d like this committed please mark it &quot;cq?&quot;. r=me

Ken, thanks for the review and the remind. I have marked it as cq?. could you please help to commit it? thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513298</commentid>
    <comment_count>13</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-01 17:06:24 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; (From update of attachment 117522 [details] [details])
&gt; &gt; Thanks for the update. Looks good. Please use &quot;webkit-patch upload&quot; in the future to upload patches as it will streamline some of the process. If you&apos;d like this committed please mark it &quot;cq?&quot;. r=me
&gt; 
&gt; Ken, thanks for the review and the remind. I have marked it as cq?. could you please help to commit it? thanks

I&apos;ll mark it r+ as soon as it passes the Chromium Linux EWS bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513299</commentid>
    <comment_count>14</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-01 17:06:35 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; (From update of attachment 117522 [details] [details] [details])
&gt; &gt; &gt; Thanks for the update. Looks good. Please use &quot;webkit-patch upload&quot; in the future to upload patches as it will streamline some of the process. If you&apos;d like this committed please mark it &quot;cq?&quot;. r=me
&gt; &gt; 
&gt; &gt; Ken, thanks for the review and the remind. I have marked it as cq?. could you please help to commit it? thanks
&gt; 
&gt; I&apos;ll mark it r+ as soon as it passes the Chromium Linux EWS bot.

Er, I meant cq+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513458</commentid>
    <comment_count>15</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-01 21:08:55 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; (From update of attachment 117522 [details] [details] [details])
&gt; &gt; &gt; Thanks for the update. Looks good. Please use &quot;webkit-patch upload&quot; in the future to upload patches as it will streamline some of the process. If you&apos;d like this committed please mark it &quot;cq?&quot;. r=me
&gt; &gt; 
&gt; &gt; Ken, thanks for the review and the remind. I have marked it as cq?. could you please help to commit it? thanks
&gt; 
&gt; I&apos;ll mark it r+ as soon as it passes the Chromium Linux EWS bot.

thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513629</commentid>
    <comment_count>16</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-02 02:18:42 -0800</bug_when>
    <thetext>Can we get a layout test to validate?  The currentTime var is no longer getting updated - may not be correct...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513634</commentid>
    <comment_count>17</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-02 02:30:44 -0800</bug_when>
    <thetext>Wei thanks for the patch!  I&apos;m on vacation right now, but would like refine this a bit more when I get back (hope you can wait).  Btw the starting at zero issue is not a bug so I dont&apos;t expect the math to change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513695</commentid>
    <comment_count>18</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-02 05:36:52 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; Can we get a layout test to validate?  The currentTime var is no longer getting updated - may not be correct...

Roger, thanks for the comments. 

Is there any reference to write layout test for webaudio AudioParam? I have tried to write a layout test but failed to find a reference and don&apos;t know how to use the layout test to verify the change.  So I just wrote some unit tests to verify the correctness of the optimization algorithm and test the performance of the function. 

for the var currentTime, it is a local variable and not used after the if statement for ExponentialRampToValue, so I just ignore it. you can double check it. 

thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513698</commentid>
    <comment_count>19</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-02 05:42:00 -0800</bug_when>
    <thetext>(In reply to comment #17)
&gt; Wei thanks for the patch!  I&apos;m on vacation right now, but would like refine this a bit more when I get back (hope you can wait).  Btw the starting at zero issue is not a bug so I dont&apos;t expect the math to change.

Roger, that&apos;s ok for me. It is my honor if I can contribute to webaudio. I am very interested in this area but still a newbie. Hope I can be an expert on this area and contribute more to it in future. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514016</commentid>
    <comment_count>20</comment_count>
      <attachid>117522</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-02 12:41:25 -0800</bug_when>
    <thetext>Comment on attachment 117522
optimize to not use pow in the inner loop -- updated 

Since Chris indicated this needs more work I&apos;m changing the review state to r-. Let&apos;s iterate more next week.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514387</commentid>
    <comment_count>21</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-02 19:59:50 -0800</bug_when>
    <thetext>(In reply to comment #19)
&gt; (In reply to comment #17)
&gt; &gt; Wei thanks for the patch!  I&apos;m on vacation right now, but would like refine this a bit more when I get back (hope you can wait).  Btw the starting at zero issue is not a bug so I dont&apos;t expect the math to change.
&gt; 
&gt; Roger, that&apos;s ok for me. It is my honor if I can contribute to webaudio. I am very interested in this area but still a newbie. Hope I can be an expert on this area and contribute more to it in future. thanks

James, thanks for you patience.  I&apos;m getting back around Dec. 11 and look forward to working more with you.  Thanks for your help!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518953</commentid>
    <comment_count>22</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-11 17:36:40 -0800</bug_when>
    <thetext>(In reply to comment #21)
&gt; (In reply to comment #19)
&gt; &gt; (In reply to comment #17)
&gt; &gt; &gt; Wei thanks for the patch!  I&apos;m on vacation right now, but would like refine this a bit more when I get back (hope you can wait).  Btw the starting at zero issue is not a bug so I dont&apos;t expect the math to change.
&gt; &gt; 
&gt; &gt; Roger, that&apos;s ok for me. It is my honor if I can contribute to webaudio. I am very interested in this area but still a newbie. Hope I can be an expert on this area and contribute more to it in future. thanks
&gt; 
&gt; James, thanks for you patience.  I&apos;m getting back around Dec. 11 and look forward to working more with you.  Thanks for your help!

roger, I have marked the patch as r?, could you help to review it? thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519026</commentid>
    <comment_count>23</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-11 22:56:24 -0800</bug_when>
    <thetext>I&apos;ll try to have a look tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519644</commentid>
    <comment_count>24</comment_count>
      <attachid>117522</attachid>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-12 16:10:13 -0800</bug_when>
    <thetext>Comment on attachment 117522
optimize to not use pow in the inner loop -- updated 

View in context: https://bugs.webkit.org/attachment.cgi?id=117522&amp;action=review

&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:262
&gt; +                // So v(t+dt) = v(t) * 2 ^ (k * sampleFrameTimeIncr * (v2 - v1))

This can be made quite a bit simpler if you get rid of the log2() conversions on lines 249:250 and do the math directly in linear space.

Then you can have something like:

double numSampleFrames = deltaTime * sampleRate;
double multiplier = pow(value2 / value1, 1 / numSampleFrames);


Note: I really wish we still were using double-precision here, but to avoid warnings caused by 64bit -&gt; 32bit conversion (double -&gt; float)
we switched a lot of this code over to use float.  Later to avoid accumulated error we probably need to look at this a bit more closely and switch some code back to using doubles.

but (at least for now), we should calculate &quot;numSampleFrames&quot; and &quot;multiplier&quot; as float

&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:269
&gt; +                writeIndex++;

I would remove lines 264:269

&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:273
&gt; +                double multiplier = powf(2.0f, k * sampleFrameTimeIncr * (value2 - value1));

and calculate multiplier as I suggest above (but using float)

&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:276
&gt; +                    values[writeIndex] = temp;

We need to maintain/update the two variables &quot;value&quot; and &quot;currentTime&quot; since they&apos;re propagated to other parts of the code within this loop.

I would suggest this code for the inner loop:

values[writeIndex] = value;
value *= multiplier;
currentTime += sampleFrameTimeIncr;


*** actually the &quot;currentTime&quot; updating can be pulled outside of the loop here and in the linear case...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519732</commentid>
    <comment_count>25</comment_count>
      <attachid>117522</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-12 17:28:51 -0800</bug_when>
    <thetext>Comment on attachment 117522
optimize to not use pow in the inner loop -- updated 

View in context: https://bugs.webkit.org/attachment.cgi?id=117522&amp;action=review

&gt;&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:262
&gt;&gt; +                // So v(t+dt) = v(t) * 2 ^ (k * sampleFrameTimeIncr * (v2 - v1))
&gt; 
&gt; This can be made quite a bit simpler if you get rid of the log2() conversions on lines 249:250 and do the math directly in linear space.
&gt; 
&gt; Then you can have something like:
&gt; 
&gt; double numSampleFrames = deltaTime * sampleRate;
&gt; double multiplier = pow(value2 / value1, 1 / numSampleFrames);
&gt; 
&gt; 
&gt; Note: I really wish we still were using double-precision here, but to avoid warnings caused by 64bit -&gt; 32bit conversion (double -&gt; float)
&gt; we switched a lot of this code over to use float.  Later to avoid accumulated error we probably need to look at this a bit more closely and switch some code back to using doubles.
&gt; 
&gt; but (at least for now), we should calculate &quot;numSampleFrames&quot; and &quot;multiplier&quot; as float

thanks, I will follow this to update the patch. thanks

&gt;&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:269
&gt;&gt; +                writeIndex++;
&gt; 
&gt; I would remove lines 264:269

A question: if we remove this block, the first value will be defaultValue. is it correct?

&gt;&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:273
&gt;&gt; +                double multiplier = powf(2.0f, k * sampleFrameTimeIncr * (value2 - value1));
&gt; 
&gt; and calculate multiplier as I suggest above (but using float)

I will do it. thanks

&gt;&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:276
&gt;&gt; +                    values[writeIndex] = temp;
&gt; 
&gt; We need to maintain/update the two variables &quot;value&quot; and &quot;currentTime&quot; since they&apos;re propagated to other parts of the code within this loop.
&gt; 
&gt; I would suggest this code for the inner loop:
&gt; 
&gt; values[writeIndex] = value;
&gt; value *= multiplier;
&gt; currentTime += sampleFrameTimeIncr;
&gt; 
&gt; 
&gt; *** actually the &quot;currentTime&quot; updating can be pulled outside of the loop here and in the linear case...

got it. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519738</commentid>
    <comment_count>26</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-12 17:40:06 -0800</bug_when>
    <thetext>&gt; &gt; I would remove lines 264:269
&gt; 
&gt; A question: if we remove this block, the first value will be defaultValue. is it correct?
&gt; 

value is initialized to defaultValue at the top of the function, but also its value can change multiple times through the loop as different segments are processed.
So, it should be already at the correct value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519822</commentid>
    <comment_count>27</comment_count>
      <attachid>118942</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-12 19:52:01 -0800</bug_when>
    <thetext>Created attachment 118942
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519823</commentid>
    <comment_count>28</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-12 19:52:57 -0800</bug_when>
    <thetext>(In reply to comment #26)
&gt; &gt; &gt; I would remove lines 264:269
&gt; &gt; 
&gt; &gt; A question: if we remove this block, the first value will be defaultValue. is it correct?
&gt; &gt; 
&gt; 
&gt; value is initialized to defaultValue at the top of the function, but also its value can change multiple times through the loop as different segments are processed.
&gt; So, it should be already at the correct value.

thanks, I have updated the patch. please help to review. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519832</commentid>
    <comment_count>29</comment_count>
      <attachid>118942</attachid>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-12 20:10:59 -0800</bug_when>
    <thetext>Comment on attachment 118942
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118942&amp;action=review

&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:267
&gt; +                float multiplier = powf(value2 / value1, 1 / numSampleFrames);

We should handle the case where value1 is zero to avoid divide-by-zero, and make multiplier zero in this case.

I think we should remove the comments on lines 249:259 and 261:266 and have a very simple one or two line comment directly describing the math in 267, something like:

// The value goes exponentially from value1 to value2 in a duration of deltaTime seconds (corresponding to numSampleFrames).
// Compute the per-sample multiplier.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519846</commentid>
    <comment_count>30</comment_count>
      <attachid>118942</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-12 21:12:11 -0800</bug_when>
    <thetext>Comment on attachment 118942
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118942&amp;action=review

&gt;&gt; Source/WebCore/webaudio/AudioParamTimeline.cpp:267
&gt;&gt; +                float multiplier = powf(value2 / value1, 1 / numSampleFrames);
&gt; 
&gt; We should handle the case where value1 is zero to avoid divide-by-zero, and make multiplier zero in this case.
&gt; 
&gt; I think we should remove the comments on lines 249:259 and 261:266 and have a very simple one or two line comment directly describing the math in 267, something like:
&gt; 
&gt; // The value goes exponentially from value1 to value2 in a duration of deltaTime seconds (corresponding to numSampleFrames).
&gt; // Compute the per-sample multiplier.

roger, for the case that value1 == 0 case, it will not go to this block. as the code said:

           if (value1 &lt;= 0 || value2 &lt;= 0) {
                // Handle negative values error case by propagating previous value.
                for (; writeIndex &lt; fillToFrame; ++writeIndex)
                    values[writeIndex] = value;
            } else {
                   ......

I will simplify the comments. thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519850</commentid>
    <comment_count>31</comment_count>
      <attachid>118949</attachid>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-12 21:29:39 -0800</bug_when>
    <thetext>Created attachment 118949
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520435</commentid>
    <comment_count>32</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2011-12-13 15:47:07 -0800</bug_when>
    <thetext>Looks fine to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520442</commentid>
    <comment_count>33</comment_count>
      <attachid>118949</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-12-13 15:51:35 -0800</bug_when>
    <thetext>Comment on attachment 118949
Patch

Sounds good. rs=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520473</commentid>
    <comment_count>34</comment_count>
    <who name="Wei James (wistoch)">james.wei</who>
    <bug_when>2011-12-13 16:34:56 -0800</bug_when>
    <thetext>(In reply to comment #33)
&gt; (From update of attachment 118949 [details])
&gt; Sounds good. rs=me

Ken, I mark this patch as cq?, could you help to land it? thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520652</commentid>
    <comment_count>35</comment_count>
      <attachid>118949</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-12-13 20:57:11 -0800</bug_when>
    <thetext>Comment on attachment 118949
Patch

Clearing flags on attachment: 118949

Committed r102733: &lt;http://trac.webkit.org/changeset/102733&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520653</commentid>
    <comment_count>36</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-12-13 20:57:17 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>117360</attachid>
            <date>2011-12-01 00:14:02 -0800</date>
            <delta_ts>2011-12-01 16:51:51 -0800</delta_ts>
            <desc>optimize to not use pow in the inner loop</desc>
            <filename>opt-pow.patch</filename>
            <type>text/plain</type>
            <size>2212</size>
            <attacher name="Wei James (wistoch)">james.wei</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAxMDE2MjgpCisrKyBXZWJDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpA
QCAtMSwzICsxLDE2IEBACisyMDExLTEyLTAxICBKYW1lcyBXZWkgPGphbWVzLndlaUBpbnRlbC5j
b20+IAorCisgICAgICAgIE9wdGltaXplIHRvIG5vdCB1c2UgcG93KCkgaW4gdGhlIGlubmVyIGxv
b3AKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTczNTMw
CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkKKworICAgICAgICBObyBuZXcg
dGVzdHMuCisKKyAgICAgICAgKiB3ZWJhdWRpby9BdWRpb1BhcmFtVGltZWxpbmUuY3BwOgorICAg
ICAgICAoV2ViQ29yZTpBdWRpb1BhcmFtVGltZWxpbmU6dmFsdWVzRm9yVGltZVJhbmdlSW1wbCk6
CisKKwogMjAxMS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t3cml0ZUluZGV4XSA9IHRlbXA7
CisgICAgICAgICAgICAgICAgd3JpdGVJbmRleCsrOworCisgICAgICAgICAgICAgICAgLy8gQ2Fs
Y3VsYXRlIHRoZSBtdWx0aXBsaWVyIHZhbHVlCisgICAgICAgICAgICAgICAgLy8gQXMgaXQgaXMg
anVzdCBhIHNpbXBsZSBleHBvbmVudGlhbCByYW1wLCBqdXN0IG11bHRpcGx5IHRoaXMgdmFsdWUg
ZWFjaCB0aW1lCisgICAgICAgICAgICAgICAgZG91YmxlIG11bHRpcGxpZXIgPSBwb3dmKDIuMGYs
IGsgKiBzYW1wbGVGcmFtZVRpbWVJbmNyICogKHZhbHVlMiAtIHZhbHVlMSkpOwogICAgICAgICAg
ICAgICAgIGZvciAoOyB3cml0ZUluZGV4IDwgZmlsbFRvRnJhbWU7ICsrd3JpdGVJbmRleCkgewot
ICAgICAgICAgICAgICAgICAgICBmbG9hdCB4ID0gKGN1cnJlbnRUaW1lIC0gdGltZTEpICogazsK
LSAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSAoMSAtIHgpICogdmFsdWUxICsgeCAqIHZhbHVl
MjsKLSAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwb3dmKDIuMGYsIHZhbHVlKTsKLSAgICAg
ICAgICAgICAgICAgICAgdmFsdWVzW3dyaXRlSW5kZXhdID0gdmFsdWU7Ci0gICAgICAgICAgICAg
ICAgICAgIGN1cnJlbnRUaW1lICs9IHNhbXBsZUZyYW1lVGltZUluY3I7CisgICAgICAgICAgICAg
ICAgICAgIHRlbXAgPSB0ZW1wICogbXVsdGlwbGllcjsKKyAgICAgICAgICAgICAgICAgICAgdmFs
dWVzW3dyaXRlSW5kZXhdID0gdGVtcDsKICAgICAgICAgICAgICAgICB9CisKICAgICAgICAgICAg
IH0KICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIC8vIEhhbmRsZSBldmVudCB0eXBlcyBu
b3QgcmVxdWlyaW5nIGxvb2tpbmcgYWhlYWQgdG8gdGhlIG5leHQgZXZlbnQuCg==
</data>
<flag name="review"
          id="116770"
          type_id="1"
          status="-"
          setter="kbr"
    />
          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>117522</attachid>
            <date>2011-12-01 16:41:05 -0800</date>
            <delta_ts>2011-12-12 18:01:17 -0800</delta_ts>
            <desc>optimize to not use pow in the inner loop -- updated </desc>
            <filename>opt-pow.patch</filename>
            <type>text/plain</type>
            <size>2956</size>
            <attacher name="Wei James (wistoch)">james.wei</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEwMTY0MCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDExLTEyLTAxICBKYW1lcyBX
ZWkgPGphbWVzLndlaUBpbnRlbC5jb20+IAorCisgICAgICAgIE9wdGltaXplIHRvIG5vdCB1c2Ug
cG93KCkgaW4gdGhlIGlubmVyIGxvb3AgaW4gQXVkaW9QYXJhbVRpbWVsaW5lCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD03MzUzMAorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIE5vIG5ldyB0ZXN0cy4KKworICAg
ICAgICAqIHdlYmF1ZGlvL0F1ZGlvUGFyYW1UaW1lbGluZS5jcHA6CisgICAgICAgIChXZWJDb3Jl
OkF1ZGlvUGFyYW1UaW1lbGluZTp2YWx1ZXNGb3JUaW1lUmFuZ2VJbXBsKToKKwogMjAxMS0xMi0w
MSAgRmxvcmluIE1hbGl0YSAgPGZtYWxpdGFAZ29vZ2xlLmNvbT4KIAogICAgICAgICBTVkcgR2F1
c3NpYW4gYmx1ciBpbiAxLWRpbWVuc2lvbiBpcyBpbmNvcnJlY3QKSW5kZXg6IFNvdXJjZS9XZWJD
b3JlL3dlYmF1ZGlvL0F1ZGlvUGFyYW1UaW1lbGluZS5jcHAKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNl
L1dlYkNvcmUvd2ViYXVkaW8vQXVkaW9QYXJhbVRpbWVsaW5lLmNwcAkocmV2aXNpb24gMTAxNjQw
KQorKysgU291cmNlL1dlYkNvcmUvd2ViYXVkaW8vQXVkaW9QYXJhbVRpbWVsaW5lLmNwcAkod29y
a2luZyBjb3B5KQpAQCAtMjQ5LDE0ICsyNDksMzMgQEAKICAgICAgICAgICAgICAgICB2YWx1ZTEg
PSBsb2cyZih2YWx1ZTEpOwogICAgICAgICAgICAgICAgIHZhbHVlMiA9IGxvZzJmKHZhbHVlMik7
CiAKLSAgICAgICAgICAgICAgICAvLyBGSVhNRTogb3B0aW1pemUgdG8gbm90IHVzZSBwb3coKSBp
biBpbm5lciBsb29wLCB0aGlzIGlzIGp1c3QgYSBzaW1wbGUgZXhwb25lbnRpYWwgcmFtcC4KKyAg
ICAgICAgICAgICAgICAvLyBUaGUgZm9ybXVsYSBvZiB0aGUgZXhwb25lbnRpYWwgcmFtcCBpcyAK
KyAgICAgICAgICAgICAgICAvLyB2KHQpID0gMl4oKDEteCh0KSkqdjEgKyB4KHQpKnYyKSB3aXRo
IHgodCkgPSAodC10MSkqaworICAgICAgICAgICAgICAgIC8vCisgICAgICAgICAgICAgICAgLy8g
U28gdih0K2R0KSAvIHYodCkgID0gMl5ZIHdpdGgKKyAgICAgICAgICAgICAgICAvLyBZID0gWygx
LXgodCtkdCkpKnYxICsgeCh0K2R0KSp2MikgXSAtIFsoMS14KHQpKSp2MSArIHgodCkqdjIpXQor
ICAgICAgICAgICAgICAgIC8vICAgPSBbKDEteCh0K2R0KSkqdjEgLSgxLXgodCkpKnYxXSArIFt4
KHQrZHQpKnYyIC0geCh0KSp2Ml0KKyAgICAgICAgICAgICAgICAvLyAgID0gWyh4KHQpIC0geCh0
K2R0KSkqdjFdICsgWygoeCh0K2R0KSAtIHgodCkpICp2Ml0KKyAgICAgICAgICAgICAgICAvLyAg
ID0gW3godCtkdCkgLSB4KHQpXSAqICh2MiAtIHYxKQorICAgICAgICAgICAgICAgIC8vIEFzIHgo
dCkgPSAodC10MSkqaywgc28geCh0K2R0KSAtIHgodCkgPSBkdCprCisgICAgICAgICAgICAgICAg
Ly8gU28gWSA9IGsgKiBkdCAqICh2Mi12MSkgd2l0aCBkdCA9IHNhbXBsZUZyYW1lVGltZUluY3IK
KyAgICAgICAgICAgICAgICAvLyBTbyB2KHQrZHQpID0gdih0KSAqIDIgXiAoayAqIHNhbXBsZUZy
YW1lVGltZUluY3IgKiAodjIgLSB2MSkpCisKKyAgICAgICAgICAgICAgICAvLyBDYWxjdWxhdGUg
dGhlIGZpcnN0IHZhbHVlIHdpdGggcG93ZigpCisgICAgICAgICAgICAgICAgZmxvYXQgeCA9IChj
dXJyZW50VGltZSAtIHRpbWUxKSAqIGs7CisgICAgICAgICAgICAgICAgdmFsdWUgPSAoMSAtIHgp
ICogdmFsdWUxICsgeCAqIHZhbHVlMjsKKyAgICAgICAgICAgICAgICBkb3VibGUgdGVtcCA9IHBv
d2YoMi4wZiwgdmFsdWUpOworICAgICAgICAgICAgICAgIHZhbHVlc1t3cml0ZUluZGV4XSA9IHRl
bXA7CisgICAgICAgICAgICAgICAgd3JpdGVJbmRleCsrOworCisgICAgICAgICAgICAgICAgLy8g
Q2FsY3VsYXRlIHRoZSBtdWx0aXBsaWVyIHZhbHVlCisgICAgICAgICAgICAgICAgLy8gQXMgaXQg
aXMganVzdCBhIHNpbXBsZSBleHBvbmVudGlhbCByYW1wLCBqdXN0IG11bHRpcGx5IHRoaXMgdmFs
dWUgZWFjaCB0aW1lCisgICAgICAgICAgICAgICAgZG91YmxlIG11bHRpcGxpZXIgPSBwb3dmKDIu
MGYsIGsgKiBzYW1wbGVGcmFtZVRpbWVJbmNyICogKHZhbHVlMiAtIHZhbHVlMSkpOwogICAgICAg
ICAgICAgICAgIGZvciAoOyB3cml0ZUluZGV4IDwgZmlsbFRvRnJhbWU7ICsrd3JpdGVJbmRleCkg
ewotICAgICAgICAgICAgICAgICAgICBmbG9hdCB4ID0gKGN1cnJlbnRUaW1lIC0gdGltZTEpICog
azsKLSAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSAoMSAtIHgpICogdmFsdWUxICsgeCAqIHZh
bHVlMjsKLSAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwb3dmKDIuMGYsIHZhbHVlKTsKLSAg
ICAgICAgICAgICAgICAgICAgdmFsdWVzW3dyaXRlSW5kZXhdID0gdmFsdWU7Ci0gICAgICAgICAg
ICAgICAgICAgIGN1cnJlbnRUaW1lICs9IHNhbXBsZUZyYW1lVGltZUluY3I7CisgICAgICAgICAg
ICAgICAgICAgIHRlbXAgPSB0ZW1wICogbXVsdGlwbGllcjsKKyAgICAgICAgICAgICAgICAgICAg
dmFsdWVzW3dyaXRlSW5kZXhdID0gdGVtcDsKICAgICAgICAgICAgICAgICB9CisKICAgICAgICAg
ICAgIH0KICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIC8vIEhhbmRsZSBldmVudCB0eXBl
cyBub3QgcmVxdWlyaW5nIGxvb2tpbmcgYWhlYWQgdG8gdGhlIG5leHQgZXZlbnQuCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>118942</attachid>
            <date>2011-12-12 19:52:01 -0800</date>
            <delta_ts>2011-12-12 21:29:24 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-73530-20111213115241.patch</filename>
            <type>text/plain</type>
            <size>3267</size>
            <attacher name="Wei James (wistoch)">james.wei</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEwMjY0NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDExLTEyLTEzICBKYW1lcyBX
ZWkgPGphbWVzLndlaUBpbnRlbC5jb20+IAorCisgICAgICAgIE9wdGltaXplIHRvIG5vdCB1c2Ug
cG93KCkgaW4gdGhlIGlubmVyIGxvb3AgaW4gQXVkaW9QYXJhbVRpbWVsaW5lCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD03MzUzMAorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIE5vIG5ldyB0ZXN0cy4KKworICAg
ICAgICAqIHdlYmF1ZGlvL0F1ZGlvUGFyYW1UaW1lbGluZS5jcHA6CisgICAgICAgIChXZWJDb3Jl
OkF1ZGlvUGFyYW1UaW1lbGluZTp2YWx1ZXNGb3JUaW1lUmFuZ2VJbXBsKToKKwogMjAxMS0xMi0x
MiAgRXJpayBBcnZpZHNzb24gIDxhcnZAY2hyb21pdW0ub3JnPgogCiAgICAgICAgIFtWOF0gQ29k
ZUdlbmVyYXRvclY4LnBtIGRvZXMgbm90IGNvcnJlY3RseSB3b3JrIHdpdGggaW5oZXJpdGVkIEhh
c0luZGV4R2V0dGVyCkluZGV4OiBTb3VyY2UvV2ViQ29yZS93ZWJhdWRpby9BdWRpb1BhcmFtVGlt
ZWxpbmUuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09P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XSAtIFsoMS14KHQpKSpsb2codjEpICsgeCh0KSps
b2codjIpKV0KKyAgICAgICAgICAgICAgICAvLyAgID0gWygxLXgodCtkdCkpKmxvZyh2MSkgLSgx
LXgodCkpKmxvZyh2MSldICsgW3godCtkdCkqbG9nKHYyKSAtIHgodCkqbG9nKHYyKV0KKyAgICAg
ICAgICAgICAgICAvLyAgID0gWyh4KHQpIC0geCh0K2R0KSkqbG9nKHYxKV0gKyBbKCh4KHQrZHQp
IC0geCh0KSkgKmxvZyh2MildCisgICAgICAgICAgICAgICAgLy8gICA9IFt4KHQrZHQpIC0geCh0
KV0gKiAobG9nKHYyKSAtIGxvZyh2MSkpCisgICAgICAgICAgICAgICAgLy8gQXMgeCh0KSA9ICh0
LXQxKSprLCBzbyB4KHQrZHQpIC0geCh0KSA9IGR0KmsKKyAgICAgICAgICAgICAgICAvLyBTbyBZ
ID0gayAqIGR0ICogKGxvZyh2MikgLSBsb2codjEpKSB3aXRoIGR0ID0gc2FtcGxlRnJhbWVUaW1l
SW5jcgorICAgICAgICAgICAgICAgIC8vIFNvIHYodCtkdCkgPSB2KHQpICogMiBeIChrICogc2Ft
cGxlRnJhbWVUaW1lSW5jciAqIChsb2codjIpIC0gbG9nKHYxKSkpCiAKLSAgICAgICAgICAgICAg
ICAvLyBGSVhNRTogb3B0aW1pemUgdG8gbm90IHVzZSBwb3coKSBpbiBpbm5lciBsb29wLCB0aGlz
IGlzIGp1c3QgYSBzaW1wbGUgZXhwb25lbnRpYWwgcmFtcC4KKyAgICAgICAgICAgICAgICAvLyBB
cyBpdCBpcyBqdXN0IGEgc2ltcGxlIGV4cG9uZW50aWFsIHJhbXAsIGp1c3QgbXVsdGlwbHkgdGhp
cyB2YWx1ZSBlYWNoIHRpbWUuCisgICAgICAgICAgICAgICAgLy8gU28gbXVsdGlwbGllciA9IDJe
KGsgKiBzYW1wbGVGcmFtZVRpbWVJbmNyICogKGxvZyh2MikgLSBsb2codjEpKSkKKyAgICAgICAg
ICAgICAgICAvLyAgICAgICAgICAgICAgID0gMl4oKDEgLyAoIGRlbHRhVGltZSAqIHNhbXBsZVJh
dGUgKSAqKGxvZyh2MikgLSBsb2codjEpKSkKKyAgICAgICAgICAgICAgICAvLyAgICAgICAgICAg
ICAgID0gMl4oKDEgLyBudW1TYW1wbGVGcmFtZXMpICogKGxvZyh2MikgLSBsb2codjEpKSkKKyAg
ICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgID0gKDJeKGxvZyh2MikgLSBsb2codjEpKSkg
XiAoMSAvIG51bVNhbXBsZUZyYW1lcykKKyAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAg
ID0gKHYyIC8gdjEpIF4gKDEgLyBudW1TYW1wbGVGcmFtZXMpCisgICAgICAgICAgICAgICAgZmxv
YXQgbXVsdGlwbGllciA9IHBvd2YodmFsdWUyIC8gdmFsdWUxLCAxIC8gbnVtU2FtcGxlRnJhbWVz
KTsKICAgICAgICAgICAgICAgICBmb3IgKDsgd3JpdGVJbmRleCA8IGZpbGxUb0ZyYW1lOyArK3dy
aXRlSW5kZXgpIHsKLSAgICAgICAgICAgICAgICAgICAgZmxvYXQgeCA9IChjdXJyZW50VGltZSAt
IHRpbWUxKSAqIGs7Ci0gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gKDEgLSB4KSAqIHZhbHVl
MSArIHggKiB2YWx1ZTI7Ci0gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gcG93ZigyLjBmLCB2
YWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgIHZhbHVlc1t3cml0ZUluZGV4XSA9IHZhbHVlOwor
ICAgICAgICAgICAgICAgICAgICB2YWx1ZSAqPSBtdWx0aXBsaWVyOwogICAgICAgICAgICAgICAg
ICAgICBjdXJyZW50VGltZSArPSBzYW1wbGVGcmFtZVRpbWVJbmNyOwogICAgICAgICAgICAgICAg
IH0KICAgICAgICAgICAgIH0K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>118949</attachid>
            <date>2011-12-12 21:29:39 -0800</date>
            <delta_ts>2011-12-13 20:57:10 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-73530-20111213133019.patch</filename>
            <type>text/plain</type>
            <size>2146</size>
            <attacher name="Wei James (wistoch)">james.wei</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEwMjY0NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDExLTEyLTEzICBKYW1lcyBX
ZWkgPGphbWVzLndlaUBpbnRlbC5jb20+IAorCisgICAgICAgIE9wdGltaXplIHRvIG5vdCB1c2Ug
cG93KCkgaW4gdGhlIGlubmVyIGxvb3AgaW4gQXVkaW9QYXJhbVRpbWVsaW5lCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD03MzUzMAorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIE5vIG5ldyB0ZXN0cy4KKworICAg
ICAgICAqIHdlYmF1ZGlvL0F1ZGlvUGFyYW1UaW1lbGluZS5jcHA6CisgICAgICAgIChXZWJDb3Jl
OkF1ZGlvUGFyYW1UaW1lbGluZTp2YWx1ZXNGb3JUaW1lUmFuZ2VJbXBsKToKKwogMjAxMS0xMi0x
MiAgRXJpayBBcnZpZHNzb24gIDxhcnZAY2hyb21pdW0ub3JnPgogCiAgICAgICAgIFtWOF0gQ29k
ZUdlbmVyYXRvclY4LnBtIGRvZXMgbm90IGNvcnJlY3RseSB3b3JrIHdpdGggaW5oZXJpdGVkIEhh
c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GZyb20gdmFsdWUxIHRvIHZhbHVlMiBpbiBhIGR1cmF0aW9u
IG9mIGRlbHRhVGltZSBzZWNvbmRzIChjb3JyZXNwb25kaW5nIHRvIG51bVNhbXBsZUZyYW1lcyku
CisgICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSB0aGUgcGVyLXNhbXBsZSBtdWx0aXBsaWVyLgor
ICAgICAgICAgICAgICAgIGZsb2F0IG11bHRpcGxpZXIgPSBwb3dmKHZhbHVlMiAvIHZhbHVlMSwg
MSAvIG51bVNhbXBsZUZyYW1lcyk7CiAgICAgICAgICAgICAgICAgZm9yICg7IHdyaXRlSW5kZXgg
PCBmaWxsVG9GcmFtZTsgKyt3cml0ZUluZGV4KSB7Ci0gICAgICAgICAgICAgICAgICAgIGZsb2F0
IHggPSAoY3VycmVudFRpbWUgLSB0aW1lMSkgKiBrOwotICAgICAgICAgICAgICAgICAgICB2YWx1
ZSA9ICgxIC0geCkgKiB2YWx1ZTEgKyB4ICogdmFsdWUyOwotICAgICAgICAgICAgICAgICAgICB2
YWx1ZSA9IHBvd2YoMi4wZiwgdmFsdWUpOwogICAgICAgICAgICAgICAgICAgICB2YWx1ZXNbd3Jp
dGVJbmRleF0gPSB2YWx1ZTsKKyAgICAgICAgICAgICAgICAgICAgdmFsdWUgKj0gbXVsdGlwbGll
cjsKICAgICAgICAgICAgICAgICAgICAgY3VycmVudFRpbWUgKz0gc2FtcGxlRnJhbWVUaW1lSW5j
cjsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>