diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-06-06 19:42:04 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-06-06 19:42:04 +0000 |
commit | 738c241460754cfd0c666bd0d5611db92957458d (patch) | |
tree | 95349316218eb08924a8e9901d295d712fa0f5d2 | |
parent | 26e9e5c15e9895118188d77df605dacb12010e21 (diff) | |
download | xine-lib-738c241460754cfd0c666bd0d5611db92957458d.tar.gz xine-lib-738c241460754cfd0c666bd0d5611db92957458d.tar.bz2 |
initial ideas for automatic enabling/disabling deinterlacer
fixes, comments, suggestions are welcome
CVS patchset: 5011
CVS date: 2003/06/06 19:42:04
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 10 | ||||
-rw-r--r-- | src/libxinevdec/yuv_frames.c | 5 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 3 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 6 |
4 files changed, 19 insertions, 5 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index f7efebf9f..63a853558 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.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_decoder.c,v 1.122 2003/05/29 01:04:54 jstembridge Exp $ + * $Id: xine_decoder.c,v 1.123 2003/06/06 19:42:04 miguelfreitas Exp $ * * xine decoder plugin using ffmpeg * @@ -938,6 +938,14 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { buf->pts = 0; img->duration = this->video_step; + /* FIXME: which codecs can be interlaced? + FIXME: check interlaced DCT and other codec specific info. */ + if( codec_type == BUF_VIDEO_DV || + codec_type == BUF_VIDEO_MPEG || + codec_type == BUF_VIDEO_MJPEG || + codec_type == BUF_VIDEO_HUFFYUV ) + img->progressive_frame = 0; + this->skipframes = img->draw(img, this->stream); if( this->skipframes < 0 ) this->skipframes = 0; diff --git a/src/libxinevdec/yuv_frames.c b/src/libxinevdec/yuv_frames.c index a16616fd8..6571aa12f 100644 --- a/src/libxinevdec/yuv_frames.c +++ b/src/libxinevdec/yuv_frames.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: yuv_frames.c,v 1.2 2003/01/19 19:42:48 guenter Exp $ + * $Id: yuv_frames.c,v 1.3 2003/06/06 19:42:04 miguelfreitas Exp $ * * dummy video decoder for uncompressed video frames as delivered by v4l */ @@ -74,7 +74,8 @@ static void yuv_frames_decode_data (video_decoder_t *this_gen, buf_element_t *bu xine_fast_memcpy (img->base[1], buf->content+frame_size, frame_size/4); xine_fast_memcpy (img->base[2], buf->content+frame_size*5/4, frame_size/4); - + img->progressive_frame = 0; + img->draw (img, this->stream); img->free (img); diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index fa4e80180..2abf037ca 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.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: video_out.c,v 1.160 2003/05/31 18:33:31 miguelfreitas Exp $ + * $Id: video_out.c,v 1.161 2003/06/06 19:42:05 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -284,6 +284,7 @@ static vo_frame_t *vo_get_frame (xine_video_port_t *this_gen, img->format = format; img->copy_called = 0; img->bad_frame = 0; + img->progressive_frame = 2; /* progressive by default */ extra_info_reset ( img->extra_info ); /* let driver ensure this image has the right format */ diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 63f08fc19..be3c120f7 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -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: video_out.h,v 1.89 2003/06/03 03:33:16 miguelfreitas Exp $ + * $Id: video_out.h,v 1.90 2003/06/06 19:42:05 miguelfreitas Exp $ * * * xine version of video_out.h @@ -115,6 +115,10 @@ struct vo_frame_s { /* info that can be used for interlaced output (e.g. tv-out) */ int top_field_first; int repeat_first_field; + /* note: progressive_frame is set wrong on many mpeg2 streams. for + * that reason, values 0 and 1 should be interpreted as "hints" + * while 2 means "progressive for sure", -1 = "interlaced for sure". + */ int progressive_frame; /* pan/scan offset */ |