summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-28 04:29:17 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-28 04:29:17 +0000
commit46ca153401ef3852b8870f491c0358b74c6c108b (patch)
tree6b7958f85c8e24586de5997acff29fc21d356f94 /mencoder.c
parentb7e594f57db070ef36927e83e498734cf9fcaad1 (diff)
downloadmpv-46ca153401ef3852b8870f491c0358b74c6c108b.tar.bz2
mpv-46ca153401ef3852b8870f491c0358b74c6c108b.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12338 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c
index 0a347f3ba8..069235652c 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1289,14 +1289,16 @@ case VCODEC_FRAMENO:
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;