* Preamble
*****************************************************************************/
#include <errno.h>
-#include <stdlib.h> /* malloc(), free() */
-#include <string.h>
#include <vlc/vlc.h>
#include <vlc_vout.h>
vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock );
#if defined(CAN_COMPILE_C_ALTIVEC)
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC )
+ if( vlc_CPU() & CPU_CAPABILITY_ALTIVEC )
{
p_vout->p_sys->pf_merge = MergeAltivec;
p_vout->p_sys->pf_end_merge = NULL;
else
#endif
#if defined(CAN_COMPILE_SSE)
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE2 )
+ if( vlc_CPU() & CPU_CAPABILITY_SSE2 )
{
p_vout->p_sys->pf_merge = MergeSSE2;
p_vout->p_sys->pf_end_merge = EndMMX;
else
#endif
#if defined(CAN_COMPILE_MMXEXT)
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+ if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
{
p_vout->p_sys->pf_merge = MergeMMXEXT;
p_vout->p_sys->pf_end_merge = EndMMX;
else
#endif
#if defined(CAN_COMPILE_3DNOW)
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW )
+ if( vlc_CPU() & CPU_CAPABILITY_3DNOW )
{
p_vout->p_sys->pf_merge = Merge3DNow;
p_vout->p_sys->pf_end_merge = End3DNow;
static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout )
{
vout_thread_t *p_real_vout = NULL;
- video_format_t fmt = {0};
+ video_format_t fmt;
+ memset( &fmt, 0, sizeof( video_format_t ) );
msg_Dbg( p_vout, "spawning the real video output" );
const uint8_t *p_s1 = (const uint8_t *)_p_s1;
const uint8_t *p_s2 = (const uint8_t *)_p_s2;
uint8_t* p_end;
- while( (ptrdiff_t)p_s1 % 16 )
+ while( (uintptr_t)p_s1 % 16 )
{
*p_dest++ = ( (uint16_t)(*p_s1++) + (uint16_t)(*p_s2++) ) >> 1;
- }
+ }
p_end = p_dest + i_bytes - 16;
while( p_dest < p_end )
{
uint8_t *src = &p_pic->p[i_plane].p_pixels[8*y*i_src];
#ifdef CAN_COMPILE_MMXEXT
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+ if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
XDeintBand8x8MMXEXT( dst, i_dst, src, i_src, i_mbx, i_modx );
else
#endif
}
#ifdef CAN_COMPILE_MMXEXT
- if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT )
+ if( vlc_CPU() & CPU_CAPABILITY_MMXEXT )
emms();
#endif
}