diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2003-04-24 17:39:04 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2003-04-24 17:39:04 +0000 |
commit | 5e42f1576afa4a60c243003fdc3f9a101d53a16b (patch) | |
tree | f81cffe54705209a4c295dd8921abed10bd7a034 | |
parent | b26abf615fb8e587a8b152ba1c49e07f2761d3fd (diff) | |
download | xine-lib-5e42f1576afa4a60c243003fdc3f9a101d53a16b.tar.gz xine-lib-5e42f1576afa4a60c243003fdc3f9a101d53a16b.tar.bz2 |
- just don't deinterlace when the method is not supported, rather than silently slowing down xine with memcpy's
CVS patchset: 4672
CVS date: 2003/04/24 17:39:04
-rw-r--r-- | src/video_out/deinterlace.c | 20 | ||||
-rw-r--r-- | src/video_out/deinterlace.h | 1 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 5 |
3 files changed, 24 insertions, 2 deletions
diff --git a/src/video_out/deinterlace.c b/src/video_out/deinterlace.c index fac701b79..f9f46b675 100644 --- a/src/video_out/deinterlace.c +++ b/src/video_out/deinterlace.c @@ -825,6 +825,26 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[], } } +int deinterlace_yuv_supported ( int method ) +{ + switch( method ) { + case DEINTERLACE_NONE: + return 1; + case DEINTERLACE_BOB: + case DEINTERLACE_WEAVE: + case DEINTERLACE_GREEDY: + case DEINTERLACE_ONEFIELD: + return check_for_mmx(); + case DEINTERLACE_ONEFIELDXV: + printf ("deinterlace: ONEFIELDXV must be handled by the video driver.\n"); + return 0; + case DEINTERLACE_LINEARBLEND: + return 1; + } + + return 0; +} + char *deinterlace_methods[] = { "none", "bob", diff --git a/src/video_out/deinterlace.h b/src/video_out/deinterlace.h index 9cdbab1dd..e4a1329c3 100644 --- a/src/video_out/deinterlace.h +++ b/src/video_out/deinterlace.h @@ -29,6 +29,7 @@ #include "video_out.h" +int deinterlace_yuv_supported ( int method ); void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[], int width, int height, int method ); diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 27f5d75d1..6c0f3ced4 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.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_xv.c,v 1.163 2003/04/16 11:30:17 miguelfreitas Exp $ + * $Id: video_out_xv.c,v 1.164 2003/04/24 17:39:05 hadess Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -713,7 +713,8 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { */ if (this->deinterlace_enabled && this->deinterlace_method - && frame->format == XINE_IMGFMT_YV12) + && frame->format == XINE_IMGFMT_YV12 + && deinterlace_yuv_supported( this->deinterlace_method ) == 1) xv_deinterlace_frame (this); /* |