]> git.sesse.net Git - vlc/commitdiff
Use field order (top/bottom) for correct bob/linear deinterlacing.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 12 Oct 2007 19:49:44 +0000 (19:49 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 12 Oct 2007 19:49:44 +0000 (19:49 +0000)
(Decoder that does not set this info should be fixed)

modules/video_filter/deinterlace.c

index 27919cebd9ff3d709527bb528c667e8e5f3d198c..ad13c4e90d1a972e9bc02f58d9fc2b6e97303674 100644 (file)
@@ -530,16 +530,16 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
             break;
 
         case DEINTERLACE_BOB:
-            RenderBob( p_vout, pp_outpic[0], p_pic, 0 );
+            RenderBob( p_vout, pp_outpic[0], p_pic, p_pic->b_top_field_first ? 0 : 1 );
             vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
-            RenderBob( p_vout, pp_outpic[1], p_pic, 1 );
+            RenderBob( p_vout, pp_outpic[1], p_pic, p_pic->b_top_field_first ? 1 : 0 );
             vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[1] );
             break;
 
         case DEINTERLACE_LINEAR:
-            RenderLinear( p_vout, pp_outpic[0], p_pic, 0 );
+            RenderLinear( p_vout, pp_outpic[0], p_pic, p_pic->b_top_field_first ? 0 : 1 );
             vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
-            RenderLinear( p_vout, pp_outpic[1], p_pic, 1 );
+            RenderLinear( p_vout, pp_outpic[1], p_pic, p_pic->b_top_field_first ? 1 : 0 );
             vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[1] );
             break;