[Mplayer-cvslog] CVS: main mencoder.c,1.242,1.243

Richard Felker CVS syncmail at mplayerhq.hu
Wed Apr 28 06:29:20 CEST 2004


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv28752

Modified Files:
	mencoder.c 
Log Message:
soft skipping for mencoder. rather than skipping decoding/filtering
frames that will be skipped, mencoded tells vf_softskip (if present)
that it should drop the next frame. this allows filters that need to
see every input frame (inverse telecine, denoise3d, ...) to see
skipped frames before they get dropped.

in principle, a smarter softskip filter could be written that would
buffer frames and choose to drop the one with least change, rather
than strictly dropping the next one.



Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -r1.242 -r1.243
--- mencoder.c	28 Apr 2004 04:02:46 -0000	1.242
+++ mencoder.c	28 Apr 2004 04:29:17 -0000	1.243
@@ -1289,14 +1289,16 @@
     break;
 default:
     // decode_video will callback down to ve_*.c encoders, through the video filters
-    blit_frame=decode_video(sh_video,start,in_size,(skip_flag>0)?1:0);
+    blit_frame=decode_video(sh_video,start,in_size,
+      skip_flag>0 && vf_next_control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE);
     if(!blit_frame){
       badframes++;
       if(skip_flag<=0){
 	// unwanted skipping of a frame, what to do?
 	if(skip_limit==0){
 	    // skipping not allowed -> write empty frame:
-	    muxer_write_chunk(mux_v,0,0);
+	    if (!encode_duplicates || vf_next_control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
+	      muxer_write_chunk(mux_v,0,0);
 	} else {
 	    // skipping allowed -> skip it and distriubute timer error:
 	    v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;




More information about the MPlayer-cvslog mailing list