Commit c036a996 authored by Felix Paul Kühne's avatar Felix Paul Kühne

i420->yuv2 converter: disabled altivec usage if video's width isn't a multiple of 32

This fixes the video output on PowerPC based Macs. A proper fix would be welcome.
parent f3bc257a
......@@ -34,7 +34,8 @@
#include <vlc_plugin.h>
#include <vlc_filter.h>
#if defined (MODULE_NAME_IS_i420_yuy2_altivec) && defined(HAVE_ALTIVEC_H)
//#if defined (MODULE_NAME_IS_i420_yuy2_altivec) && defined(HAVE_ALTIVEC_H)
#ifdef __powerpc__
# include <altivec.h>
#endif
......@@ -241,11 +242,13 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
}
}
}
#warning FIXME: converting widths % 16 but !widths % 32 is broken on altivec
#if 0
else if( !( ( p_filter->fmt_in.video.i_width % 16 ) |
( p_filter->fmt_in.video.i_height % 4 ) ) )
{
/* Width is only a multiple of 16, we take 4 lines at a time */
for( i_y = p_filter->fmt_in.video.i_height / 4 ; i_y-- ; )
for( i_y = p_filter->fmt_in.video.i_height / 4 ; i_y-- ; )
{
/* Line 1 and 2, pixels 0 to ( width - 16 ) */
VEC_NEXT_LINES( );
......@@ -273,6 +276,7 @@ static void I420_YUY2( filter_t *p_filter, picture_t *p_source,
}
}
}
#endif
else
{
/* Crap, use the C version */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment