mpeg2enc - verbose patch

Herve Flores <[email protected]> Sat, 5 Jan 2008 18:36:01 +0100
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>
Hi, this patch I submit is certainly is the stupidest one :-) (...but  
I'm not a real dev)

on my Core2Duo, with "-v 1", I have 1083 lines of verbose every 4  
seconds
With my "patch", I reduce the amount to less or more 50  lines of  
verbose every 4 seconds

I just change some mjpeg_info() to mjpeg_debug()

If I set verbose to "0", I can not parse the progress.
With this patch, I can continue to parse the progress but my verbose  
file ( &> verbose.txt) doesn't reach 42Mo for a video anymore  
(duration 45') ;-)

hope this help some persons
bye

PS: There is only 3 levels of verbose, none (0), 1 (mjpeg_info) and 2  
(mjpeg_debug), or did I miss one?

PSS: this patch was made with RC3, not with CVS

Hervé

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Mjpeg-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mjpeg-developer
mpeg2enc_verbose.diff (application/octet-stream, 1.3 KB)
--- mpeg2enc/seqencoder.cc	2007-11-01 19:44:11.000000000 +0100
+++ mpeg2enc/seqencoder.cc	2008-01-05 12:42:23.000000000 +0100
@@ -200,7 +200,7 @@
 	for(;;)
 	{
         // Get Job to do and do it!!
-     mjpeg_info( "Worker: getting" );
+     mjpeg_debug( "Worker: getting" );
       
         jobstodo.Get( job );
         if( job->shutdown )
@@ -208,7 +208,7 @@
             mjpeg_info ("SHUTDOWN worker" );
             pthread_exit( 0 );
         }
-        mjpeg_info( "Working: stripe %d/%d %d", job->stripe, parallelism, job->pattern );
+        mjpeg_debug( "Working: stripe %d/%d %d", job->stripe, parallelism, job->pattern );
         Picture *picture = job->picture;
         vector<MacroBlock>::iterator macroblocks_begin;
         vector<MacroBlock>::iterator macroblocks_end;
@@ -254,7 +254,7 @@
         {
             (*mbi.*job->encodingFunc)();
         }
-        mjpeg_info( "Worker: stripe %d done", job->stripe );
+        mjpeg_debug( "Worker: stripe %d done", job->stripe );
         job->working = false;
     }
 }
@@ -854,7 +854,7 @@
       RetainPicture( picture, pass2ratectl );
     }
 
-    mjpeg_info("Pass2 %5d %5d(%2d) %c q=%3.2f %s",
+    mjpeg_debug("Pass2 %5d %5d(%2d) %c q=%3.2f %s",
                picture.decode, 
                picture.present,
                picture.temp_ref,