[vlc-commits] transcode: add comments on why we check frame dropping on 2 places
Ilkka Ollakka
git at videolan.org
Sun Feb 2 14:59:13 CET 2014
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Feb 1 12:39:04 2014 +0200| [eed05ce7725e3b5ce69ca3c63bb461511646605c] | committer: Ilkka Ollakka
transcode: add comments on why we check frame dropping on 2 places
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eed05ce7725e3b5ce69ca3c63bb461511646605c
---
modules/stream_out/transcode/video.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 12c974e..0c811ca 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -670,7 +670,10 @@ static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream
/* If input pts + input_frame_interval is lower than next_output_pts - output_frame_interval
* Then the future input frame should fit better and we can drop this one
*
- * Duplication need is checked in OutputFrame */
+ * We check it here also because we can have case that video filters outputs multiple
+ * pictures but we don't need to use them all, for example yadif2x and outputting to some
+ * different fps value
+ */
if( ( p_pic->date + (mtime_t)id->i_input_frame_interval ) <
( date_Get( &id->next_output_pts ) ) )
{
@@ -934,6 +937,9 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
/* If input pts + input_frame_interval is lower than next_output_pts - output_frame_interval
* Then the future input frame should fit better and we can drop this one
*
+ * We check this here as we don't need to run video filter at all for pictures
+ * we are going to drop anyway
+ *
* Duplication need is checked in OutputFrame */
if( ( p_pic->date + (mtime_t)id->i_input_frame_interval ) <
( date_Get( &id->next_output_pts ) ) )
More information about the vlc-commits
mailing list