[vlc-devel] commit: Use less CPU : reduction of the number of iteration when it draws the frame. Some non-code corrections of the previous patch. (Adrien Maglo )

git version control git at videolan.org
Tue Jun 10 08:39:58 CEST 2008


vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Jun  5 14:24:56 2008 +0200| [27479a57a9eda150ad9e221f0368fc4f8c0fd5fc]

Use less CPU : reduction of the number of iteration when it draws the frame. Some non-code corrections of the previous patch.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27479a57a9eda150ad9e221f0368fc4f8c0fd5fc
---

 modules/visualization/visual/effects.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/visualization/visual/effects.c b/modules/visualization/visual/effects.c
index cdacdb5..df318cd 100644
--- a/modules/visualization/visual/effects.c
+++ b/modules/visualization/visual/effects.c
@@ -5,6 +5,7 @@
  * $Id$
  *
  * Authors: Clément Stenac <zorglub at via.ecp.fr>
+ *          Adrien Maglo <magsoft at videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -830,7 +831,7 @@ int scope_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
 
 
 /*****************************************************************************
- * vuMeter_Run: scope effect
+ * vuMeter_Run: vu meter effect
  *****************************************************************************/
 int vuMeter_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
               aout_buffer_t * p_buffer , picture_t * p_picture)
@@ -899,7 +900,7 @@ int vuMeter_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
                 /* Draw the two scales */
                 k = 0;
                 teta_grad = GRAD_ANGLE_MIN;
-                for ( teta = -M_PI_4; teta <= M_PI_4; teta = teta + 0.001 )
+                for ( teta = -M_PI_4; teta <= M_PI_4; teta = teta + 0.003 )
                 {
                         for ( i = 140; i <= 150; i++ )
                         {
@@ -941,7 +942,7 @@ int vuMeter_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
                 }
 
                 /* Draw the hand bases */
-                for ( teta = -M_PI_2; teta <= M_PI_2 + 0.01; teta = teta + 0.001 )
+                for ( teta = -M_PI_2; teta <= M_PI_2 + 0.01; teta = teta + 0.003 )
                 {
                         for ( i = 0; i < 10; i++ )
                         {




More information about the vlc-devel mailing list