redundant code

Michael T. Babcock mbabcock at web.fibrespeed.net
Wed Oct 17 00:37:47 CEST 2001


Hello all, this is my first day on this list and with a working VLC.

I ran vlc through gprof to see what was being used a lot to take a look at the appropriate code and unfortunately stumbled over vpar_blocks.c which isn't the most fun to grok, but I did find one line I wondered about:

if ( meuh == 3745 ) i_coeff = 0;

Well, its really on two lines, but the point is that its immediately followed by "i_coeff = -1;" and is therefore a redundant test.  It seems like it probably once did something useful, but having commented it out of my code I get a very small performance difference on that function.

--- src/video_decoder/vpar_blocks.c.orig	Tue Oct 16 17:32:24 2001
+++ src/video_decoder/vpar_blocks.c	Tue Oct 16 17:50:36 2001
@@ -491,8 +491,8 @@
     static int meuh = 0;
     meuh++;
 
-    if( meuh == 3745 )
-        i_coeff = 0;
+/* MTB seems redundant based on next line
+    if( meuh == 3745 ) i_coeff = 0; */
 
     i_coeff = -1;
     i_mismatch = 1;

-- 
Michael T. Babcock
CTO, FibreSpeed Ltd.




More information about the vlc-devel mailing list