[Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c,1.330,1.331

Måns Rullgård CVS mru
Tue May 31 13:49:58 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv26077

Modified Files:
	ffmpeg.c 
Log Message:
add -gray command line flag


Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffmpeg.c,v
retrieving revision 1.330
retrieving revision 1.331
diff -u -d -r1.330 -r1.331
--- ffmpeg.c	26 May 2005 08:59:05 -0000	1.330
+++ ffmpeg.c	31 May 2005 11:49:55 -0000	1.331
@@ -209,6 +209,7 @@
 static int frame_skip_exp= 0;
 static int frame_skip_cmp= FF_CMP_DCTMAX;
 extern int loop_input; /* currently a hack */
+static int gray_only = 0;
 
 static int gop_size = 12;
 static int intra_only = 0;
@@ -2987,6 +2988,8 @@
                 enc->flags|= CODEC_FLAG_BITEXACT;
             if(me_threshold)
                 enc->debug |= FF_DEBUG_MV;
+            if(gray_only)
+                enc->flags |= CODEC_FLAG_GRAY;
 
             if (enc->time_base.den != rfps || enc->time_base.num != rfps_base) { 
 
@@ -3292,6 +3295,9 @@
                 if (no_output) {
                     video_enc->flags2 |= CODEC_FLAG2_NO_OUTPUT;
                 }
+                if (gray_only) {
+                    video_enc->flags |= CODEC_FLAG_GRAY;
+                }
                 video_enc->qmin = video_qmin;
                 video_enc->qmax = video_qmax;
                 video_enc->lmin = video_lmin;
@@ -4126,6 +4132,7 @@
     { "skip_factor", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&frame_skip_factor}, "frame skip factor", "factor" },
     { "skip_exp", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&frame_skip_exp}, "frame skip exponent", "exponent" },
     { "skip_cmp", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)&frame_skip_cmp}, "frame skip compare function", "compare function" },
+    { "gray", OPT_BOOL | OPT_EXPERT | OPT_VIDEO, { &gray_only }, "encode/decode grayscale" },
 
     /* audio options */
     { "ab", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_bitrate}, "set audio bitrate (in kbit/s)", "bitrate", },





More information about the ffmpeg-cvslog mailing list