Commit e2364ce5 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Use CPU optimized memcpy if available.

parent 48940cc2
...@@ -373,7 +373,7 @@ static int OpenFilter( vlc_object_t *p_this ) ...@@ -373,7 +373,7 @@ static int OpenFilter( vlc_object_t *p_this )
(p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) ) (p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) )
{ {
msg_Err( p_this, "filter discarded (invalid format)" ); msg_Err( p_this, "filter discarded (invalid format)" );
return -1; return VLC_EGENERIC;
} }
if( (p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format) && if( (p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format) &&
...@@ -583,9 +583,9 @@ static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_fil ...@@ -583,9 +583,9 @@ static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_fil
i_overflow_size = p_sys->i_overflow_buffer_size; i_overflow_size = p_sys->i_overflow_buffer_size;
if ( i_out_size > i_overflow_size ) if ( i_out_size > i_overflow_size )
memcpy( p_out, p_overflow, i_overflow_size ); p_filter->p_vlc->pf_memcpy( p_out, p_overflow, i_overflow_size );
else else
memcpy( p_out, p_overflow, i_out_size ); p_filter->p_vlc->pf_memcpy( p_out, p_overflow, i_out_size );
p_slide = p_sys->p_overflow_buffer; p_slide = p_sys->p_overflow_buffer;
while( p_slide < p_overflow + i_overflow_size ) while( p_slide < p_overflow + i_overflow_size )
...@@ -594,9 +594,10 @@ static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_fil ...@@ -594,9 +594,10 @@ static void stereo2mono_downmix( aout_instance_t * p_aout, aout_filter_t * p_fil
{ {
memset( p_slide, 0, i_out_size ); memset( p_slide, 0, i_out_size );
if( p_slide + 2 * i_out_size < p_overflow + i_overflow_size ) if( p_slide + 2 * i_out_size < p_overflow + i_overflow_size )
memcpy( p_slide, p_slide + i_out_size, i_out_size ); p_filter->p_vlc->pf_memcpy( p_slide, p_slide + i_out_size,
i_out_size );
else else
memcpy( p_slide, p_slide + i_out_size, p_filter->p_vlc->pf_memcpy( p_slide, p_slide + i_out_size,
p_overflow + i_overflow_size - ( p_slide + i_out_size ) ); p_overflow + i_overflow_size - ( p_slide + i_out_size ) );
} }
else else
......
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