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 )
(p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) )
{
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) &&
......@@ -492,7 +492,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
return NULL;
}
p_out->i_samples = (p_block->i_samples / p_filter->p_sys->i_nb_channels) *
aout_FormatNbChannels( &(p_filter->fmt_out.audio) );
aout_FormatNbChannels( &(p_filter->fmt_out.audio) );
p_out->i_dts = p_block->i_dts;
p_out->i_pts = p_block->i_pts;
p_out->i_length = p_block->i_length;
......@@ -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;
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
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;
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
{
memset( p_slide, 0, i_out_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
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 ) );
}
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