From 49ac51d80f4f0e02abbdb4caca5affbb08f8fdee Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Tue, 4 May 2004 13:57:48 +0000 Subject: [PATCH] + video_chroma/i420_yuy2.c : fixed conversion for non-multiple-of-8 widths (MMX untested) --- modules/video_chroma/i420_yuy2.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c index 03ec04215d..16c72e7ef3 100644 --- a/modules/video_chroma/i420_yuy2.c +++ b/modules/video_chroma/i420_yuy2.c @@ -262,17 +262,21 @@ static void I420_YUY2( vout_thread_t *p_vout, picture_t *p_source, p_y1 = p_y2; p_y2 += p_source->p[Y_PLANE].i_pitch; - for( i_x = p_vout->render.i_width / 8 ; i_x-- ; ) - { #if !defined (MODULE_NAME_IS_i420_yuy2_mmx) + for( i_x = p_vout->render.i_width / 2 ; i_x-- ; ) + { C_YUV420_YUYV( ); - C_YUV420_YUYV( ); - C_YUV420_YUYV( ); - C_YUV420_YUYV( ); + } #else + for( i_x = p_vout->render.i_width / 8 ; i_x-- ; ) + { MMX_CALL( MMX_YUV420_YUYV ); -#endif } + for( i_x = ( p_vout->render.i_width % 8 ) / 2; i_x-- ; ) + { + C_YUV420_YUYV( ); + } +#endif p_y1 += i_source_margin; p_y2 += i_source_margin; -- 2.39.5