diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-12-24 13:36:13 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-12-24 13:36:13 +0000 |
commit | e3bf0bd6e76600fbfecbc7240278c803539b6c8e (patch) | |
tree | 819c224be2b336de5c117c6c74f0a62c3313ca14 | |
parent | a69701e9bb21f93e06cefdfa6c3feddaca191382 (diff) | |
download | xine-lib-e3bf0bd6e76600fbfecbc7240278c803539b6c8e.tar.gz xine-lib-e3bf0bd6e76600fbfecbc7240278c803539b6c8e.tar.bz2 |
that should fix full rate deinterlacing of some dvds
CVS patchset: 5943
CVS date: 2003/12/24 13:36:13
-rw-r--r-- | src/post/deinterlace/xine_plugin.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index ee2f9fdf4..2843a2073 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.c,v 1.26 2003/12/14 22:13:25 siggi Exp $ + * $Id: xine_plugin.c,v 1.27 2003/12/24 13:36:13 miguelfreitas Exp $ * * advanced video deinterlacer plugin * Jun/2003 by Miguel Freitas @@ -749,7 +749,21 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) } if( framerate_mode == FRAMERATE_FULL ) { - if ( frame->top_field_first ) { + int top_field_first = frame->top_field_first; + + /* if i understood mpeg2 specs correctly, top_field_first + * shall be zero for field pictures and the output order + * is the same that the fields are decoded. + * frame->flags allow us to find the first decoded field. + * + * note: frame->field() is called later to switch decoded + * field but frame->flags do not change. + */ + if ( (frame->flags & VO_BOTH_FIELDS) != VO_BOTH_FIELDS ) { + top_field_first = (frame->flags & VO_TOP_FIELD) ? 1 : 0; + } + + if ( top_field_first ) { fields[0] = 0; fields[1] = 1; } else { |