Commit 5b55ee1b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use vlc_memset/vlc_memcpy

parent e29b2a0e
...@@ -1644,7 +1644,7 @@ static block_t *ReadCompressed( access_t *p_access ) ...@@ -1644,7 +1644,7 @@ static block_t *ReadCompressed( access_t *p_access )
} }
sample.p_sample->GetPointer( &p_data ); sample.p_sample->GetPointer( &p_data );
p_access->p_libvlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); vlc_memcpy( p_block->p_buffer, p_data, i_data_size );
sample.p_sample->Release(); sample.p_sample->Release();
/* The caller got what he wanted */ /* The caller got what he wanted */
...@@ -1733,7 +1733,7 @@ static int Demux( demux_t *p_demux ) ...@@ -1733,7 +1733,7 @@ static int Demux( demux_t *p_demux )
#endif #endif
p_block = block_New( p_demux, i_data_size ); p_block = block_New( p_demux, i_data_size );
p_demux->p_libvlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); vlc_memcpy( p_block->p_buffer, p_data, i_data_size );
p_block->i_pts = p_block->i_dts = i_pts; p_block->i_pts = p_block->i_dts = i_pts;
sample.p_sample->Release(); sample.p_sample->Release();
......
...@@ -100,15 +100,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -100,15 +100,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy the S/PDIF headers. */ /* Copy the S/PDIF headers. */
if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') ) if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') )
{ {
p_filter->p_libvlc->pf_memcpy( p_out, p_sync_be, 6 ); vlc_memcpy( p_out, p_sync_be, 6 );
p_out[4] = p_in[5] & 0x7; /* bsmod */ p_out[4] = p_in[5] & 0x7; /* bsmod */
p_out[6] = (i_frame_size >> 4) & 0xff; p_out[6] = (i_frame_size >> 4) & 0xff;
p_out[7] = (i_frame_size << 4) & 0xff; p_out[7] = (i_frame_size << 4) & 0xff;
p_filter->p_libvlc->pf_memcpy( &p_out[8], p_in, i_frame_size * 2 ); vlc_memcpy( &p_out[8], p_in, i_frame_size * 2 );
} }
else else
{ {
p_filter->p_libvlc->pf_memcpy( p_out, p_sync_le, 6 ); vlc_memcpy( p_out, p_sync_le, 6 );
p_out[5] = p_in[5] & 0x7; /* bsmod */ p_out[5] = p_in[5] & 0x7; /* bsmod */
p_out[6] = (i_frame_size << 4) & 0xff; p_out[6] = (i_frame_size << 4) & 0xff;
p_out[7] = (i_frame_size >> 4) & 0xff; p_out[7] = (i_frame_size >> 4) & 0xff;
...@@ -124,8 +124,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -124,8 +124,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
} }
#endif #endif
} }
p_filter->p_libvlc->pf_memset( p_out + 8 + i_frame_size * 2, 0, vlc_memset( p_out + 8 + i_frame_size * 2, 0,
AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 ); AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 );
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = AOUT_SPDIF_SIZE; p_out_buf->i_nb_bytes = AOUT_SPDIF_SIZE;
......
...@@ -138,9 +138,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -138,9 +138,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
} }
/* Backup frame */ /* Backup frame */
p_filter->p_libvlc->pf_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_nb_bytes * vlc_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_nb_bytes *
p_filter->p_sys->i_frames, p_in_buf->p_buffer, p_filter->p_sys->i_frames,
p_in_buf->i_nb_bytes ); p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
p_filter->p_sys->i_frames++; p_filter->p_sys->i_frames++;
...@@ -174,14 +174,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -174,14 +174,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy the S/PDIF headers. */ /* Copy the S/PDIF headers. */
if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') ) if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') )
{ {
p_filter->p_libvlc->pf_memcpy( p_out, p_sync_be, 6 ); vlc_memcpy( p_out, p_sync_be, 6 );
p_out[5] = i_ac5_spdif_type; p_out[5] = i_ac5_spdif_type;
p_out[6] = (( i_length ) >> 5 ) & 0xFF; p_out[6] = (( i_length ) >> 5 ) & 0xFF;
p_out[7] = ( i_length << 3 ) & 0xFF; p_out[7] = ( i_length << 3 ) & 0xFF;
} }
else else
{ {
p_filter->p_libvlc->pf_memcpy( p_out, p_sync_le, 6 ); vlc_memcpy( p_out, p_sync_le, 6 );
p_out[4] = i_ac5_spdif_type; p_out[4] = i_ac5_spdif_type;
p_out[6] = ( i_length << 3 ) & 0xFF; p_out[6] = ( i_length << 3 ) & 0xFF;
p_out[7] = (( i_length ) >> 5 ) & 0xFF; p_out[7] = (( i_length ) >> 5 ) & 0xFF;
...@@ -217,13 +217,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -217,13 +217,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
} }
else else
{ {
p_filter->p_libvlc->pf_memcpy( p_out + 8, p_in, i_length ); vlc_memcpy( p_out + 8, p_in, i_length );
} }
if( i_fz > i_length + 8 ) if( i_fz > i_length + 8 )
{ {
p_filter->p_libvlc->pf_memset( p_out + 8 + i_length_padded, 0, vlc_memset( p_out + 8 + i_length_padded, 0,
i_fz - i_length_padded - 8 ); i_fz - i_length_padded - 8 );
} }
} }
......
...@@ -215,8 +215,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -215,8 +215,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
break; break;
case 1: case 1:
p_filter->p_libvlc->pf_memcpy( p_samples, p_left, vlc_memcpy( p_samples, p_left, i_samples * sizeof(mad_fixed_t) );
i_samples * sizeof(mad_fixed_t) );
break; break;
default: default:
......
...@@ -246,14 +246,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -246,14 +246,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy all our samples in p_in */ /* Copy all our samples in p_in */
if( p_filter->p_sys->i_old_wing ) if( p_filter->p_sys->i_old_wing )
{ {
p_aout->p_libvlc->pf_memcpy( p_in, p_filter->p_sys->p_buf, vlc_memcpy( p_in, p_filter->p_sys->p_buf,
p_filter->p_sys->i_old_wing * 2 * p_filter->p_sys->i_old_wing * 2 *
p_filter->input.i_bytes_per_frame ); p_filter->input.i_bytes_per_frame );
} }
p_aout->p_libvlc->pf_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 * vlc_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 * i_nb_channels,
i_nb_channels, p_in_buf->p_buffer, p_in_buf->p_buffer,
p_in_buf->i_nb_samples * p_in_buf->i_nb_samples * p_filter->input.i_bytes_per_frame );
p_filter->input.i_bytes_per_frame );
/* Make sure the output buffer is reset */ /* Make sure the output buffer is reset */
memset( p_out, 0, p_out_buf->i_size ); memset( p_out, 0, p_out_buf->i_size );
......
...@@ -176,7 +176,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -176,7 +176,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
return; return;
} }
p_aout->p_libvlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); vlc_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
/* Take care of the previous input sample (if any) */ /* Take care of the previous input sample (if any) */
if( !p_filter->b_continuity ) if( !p_filter->b_continuity )
......
...@@ -98,8 +98,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -98,8 +98,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
{ {
/* For whatever reason the buffer allocator decided to allocate /* For whatever reason the buffer allocator decided to allocate
* a new buffer. Currently, this never happens. */ * a new buffer. Currently, this never happens. */
p_aout->p_libvlc->pf_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer, vlc_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer,
__MIN(i_out_nb, i_in_nb) * i_sample_bytes ); __MIN(i_out_nb, i_in_nb) * i_sample_bytes );
} }
if ( i_out_nb > i_in_nb ) if ( i_out_nb > i_in_nb )
......
...@@ -113,7 +113,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -113,7 +113,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
return; return;
} }
p_aout->p_libvlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); vlc_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes );
for( i_out = i_out_nb ; i_out-- ; ) for( i_out = i_out_nb ; i_out-- ; )
{ {
......
...@@ -103,8 +103,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) ...@@ -103,8 +103,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
{ {
aout_buffer_t * p_old_buffer; aout_buffer_t * p_old_buffer;
if ( i_available_bytes > 0 ) vlc_memcpy( p_out, p_in, i_available_bytes );
p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_available_bytes );
i_nb_bytes -= i_available_bytes; i_nb_bytes -= i_available_bytes;
p_out += i_available_bytes; p_out += i_available_bytes;
...@@ -120,8 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) ...@@ -120,8 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
} }
else else
{ {
if ( i_nb_bytes > 0 ) vlc_memcpy( p_out, p_in, i_nb_bytes );
p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_nb_bytes );
p_input->p_first_byte_to_mix = p_in + i_nb_bytes; p_input->p_first_byte_to_mix = p_in + i_nb_bytes;
break; break;
} }
......
...@@ -1312,7 +1312,9 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, ...@@ -1312,7 +1312,9 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
if( p_sys->i_total_bytes > 0 ) if( p_sys->i_total_bytes > 0 )
{ {
i_mData_bytes = __MIN( p_sys->i_total_bytes - p_sys->i_read_bytes, ioData->mBuffers[0].mDataByteSize ); i_mData_bytes = __MIN( p_sys->i_total_bytes - p_sys->i_read_bytes, ioData->mBuffers[0].mDataByteSize );
p_aout->p_libvlc->pf_memcpy( ioData->mBuffers[0].mData, &p_sys->p_remainder_buffer[p_sys->i_read_bytes], i_mData_bytes ); vlc_memcpy( ioData->mBuffers[0].mData,
&p_sys->p_remainder_buffer[p_sys->i_read_bytes],
i_mData_bytes );
p_sys->i_read_bytes += i_mData_bytes; p_sys->i_read_bytes += i_mData_bytes;
current_date += (mtime_t) ( (mtime_t) 1000000 / p_aout->output.output.i_rate ) * current_date += (mtime_t) ( (mtime_t) 1000000 / p_aout->output.output.i_rate ) *
( i_mData_bytes / 4 / aout_FormatNbChannels( &p_aout->output.output ) ); // 4 is fl32 specific ( i_mData_bytes / 4 / aout_FormatNbChannels( &p_aout->output.output ) ); // 4 is fl32 specific
...@@ -1331,13 +1333,16 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, ...@@ -1331,13 +1333,16 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
{ {
uint32_t i_second_mData_bytes = __MIN( p_buffer->i_nb_bytes, ioData->mBuffers[0].mDataByteSize - i_mData_bytes ); uint32_t i_second_mData_bytes = __MIN( p_buffer->i_nb_bytes, ioData->mBuffers[0].mDataByteSize - i_mData_bytes );
p_aout->p_libvlc->pf_memcpy( (uint8_t *)ioData->mBuffers[0].mData + i_mData_bytes, p_buffer->p_buffer, i_second_mData_bytes ); vlc_memcpy( (uint8_t *)ioData->mBuffers[0].mData + i_mData_bytes,
p_buffer->p_buffer, i_second_mData_bytes );
i_mData_bytes += i_second_mData_bytes; i_mData_bytes += i_second_mData_bytes;
if( i_mData_bytes >= ioData->mBuffers[0].mDataByteSize ) if( i_mData_bytes >= ioData->mBuffers[0].mDataByteSize )
{ {
p_sys->i_total_bytes = p_buffer->i_nb_bytes - i_second_mData_bytes; p_sys->i_total_bytes = p_buffer->i_nb_bytes - i_second_mData_bytes;
p_aout->p_libvlc->pf_memcpy( p_sys->p_remainder_buffer, &p_buffer->p_buffer[i_second_mData_bytes], p_sys->i_total_bytes ); vlc_memcpy( p_sys->p_remainder_buffer,
&p_buffer->p_buffer[i_second_mData_bytes],
p_sys->i_total_bytes );
} }
else else
{ {
...@@ -1349,7 +1354,8 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, ...@@ -1349,7 +1354,8 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
} }
else else
{ {
p_aout->p_libvlc->pf_memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes, 0, ioData->mBuffers[0].mDataByteSize - i_mData_bytes ); vlc_memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes,
0,ioData->mBuffers[0].mDataByteSize - i_mData_bytes );
i_mData_bytes += ioData->mBuffers[0].mDataByteSize - i_mData_bytes; i_mData_bytes += ioData->mBuffers[0].mDataByteSize - i_mData_bytes;
} }
} }
...@@ -1391,13 +1397,12 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice, ...@@ -1391,13 +1397,12 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
msg_Warn( p_aout, "bytesize: %d nb_bytes: %d", (int)BUFFER.mDataByteSize, (int)p_buffer->i_nb_bytes ); msg_Warn( p_aout, "bytesize: %d nb_bytes: %d", (int)BUFFER.mDataByteSize, (int)p_buffer->i_nb_bytes );
/* move data into output data buffer */ /* move data into output data buffer */
p_aout->p_libvlc->pf_memcpy( BUFFER.mData, vlc_memcpy( BUFFER.mData, p_buffer->p_buffer, p_buffer->i_nb_bytes );
p_buffer->p_buffer, p_buffer->i_nb_bytes );
aout_BufferFree( p_buffer ); aout_BufferFree( p_buffer );
} }
else else
{ {
p_aout->p_libvlc->pf_memset( BUFFER.mData, 0, BUFFER.mDataByteSize ); vlc_memset( BUFFER.mData, 0, BUFFER.mDataByteSize );
} }
#undef BUFFER #undef BUFFER
......
...@@ -960,8 +960,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame, ...@@ -960,8 +960,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame,
p_sys->i_bits_per_sample ); p_sys->i_bits_per_sample );
} }
p_aout->p_libvlc->pf_memcpy( p_write_position, p_buffer->p_buffer, vlc_memcpy( p_write_position, p_buffer->p_buffer, l_bytes1 );
l_bytes1 );
aout_BufferFree( p_buffer ); aout_BufferFree( p_buffer );
} }
......
...@@ -237,7 +237,7 @@ static int Thread( aout_instance_t * p_aout ) ...@@ -237,7 +237,7 @@ static int Thread( aout_instance_t * p_aout )
#define i p_sys->nNextBufferIndex #define i p_sys->nNextBufferIndex
if( p_buffer == NULL ) if( p_buffer == NULL )
{ {
p_aout->p_libvlc->pf_memset( p_sys->ppBuffers[ i ], 0, vlc_memset( p_aout, p_sys->ppBuffers[ i ], 0,
p_sys->nBufferSize ); p_sys->nBufferSize );
} }
else else
......
...@@ -147,8 +147,8 @@ static int paCallback( const void *inputBuffer, void *outputBuffer, ...@@ -147,8 +147,8 @@ static int paCallback( const void *inputBuffer, void *outputBuffer,
p_sys->i_channels, p_sys->pi_chan_table, p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample ); p_sys->i_bits_per_sample );
} }
p_aout->p_libvlc->pf_memcpy( outputBuffer, p_buffer->p_buffer, vlc_memcpy( outputBuffer, p_buffer->p_buffer,
framesPerBuffer * p_sys->i_sample_size ); framesPerBuffer * p_sys->i_sample_size );
/* aout_BufferFree may be dangereous here, but then so is /* aout_BufferFree may be dangereous here, but then so is
* aout_OutputNextBuffer (calls aout_BufferFree internally). * aout_OutputNextBuffer (calls aout_BufferFree internally).
* one solution would be to link the no longer useful buffers * one solution would be to link the no longer useful buffers
...@@ -160,8 +160,7 @@ static int paCallback( const void *inputBuffer, void *outputBuffer, ...@@ -160,8 +160,7 @@ static int paCallback( const void *inputBuffer, void *outputBuffer,
else else
/* Audio output buffer shortage -> stop the fill process and wait */ /* Audio output buffer shortage -> stop the fill process and wait */
{ {
p_aout->p_libvlc->pf_memset( outputBuffer, 0, vlc_memset( outputBuffer, 0, framesPerBuffer * p_sys->i_sample_size );
framesPerBuffer * p_sys->i_sample_size );
} }
return 0; return 0;
} }
......
...@@ -261,12 +261,12 @@ static void SDLCallback( void * _p_aout, uint8_t * p_stream, int i_len ) ...@@ -261,12 +261,12 @@ static void SDLCallback( void * _p_aout, uint8_t * p_stream, int i_len )
if ( p_buffer != NULL ) if ( p_buffer != NULL )
{ {
p_aout->p_libvlc->pf_memcpy( p_stream, p_buffer->p_buffer, i_len ); vlc_memcpy( p_stream, p_buffer->p_buffer, i_len );
aout_BufferFree( p_buffer ); aout_BufferFree( p_buffer );
} }
else else
{ {
p_aout->p_libvlc->pf_memset( p_stream, 0, i_len ); vlc_memset( p_stream, 0, i_len );
} }
} }
...@@ -858,9 +858,9 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout, ...@@ -858,9 +858,9 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout,
*/ */
if(b_spdif) if(b_spdif)
{ {
p_aout->p_libvlc->pf_memcpy( p_aout->output.p_sys->p_silence_buffer, vlc_memcpy( p_aout->output.p_sys->p_silence_buffer,
p_buffer->p_buffer, p_buffer->p_buffer,
p_aout->output.p_sys->i_buffer_size ); p_aout->output.p_sys->i_buffer_size );
p_aout->output.p_sys->i_repeat_counter = 2; p_aout->output.p_sys->i_repeat_counter = 2;
} }
} else { } else {
...@@ -870,10 +870,8 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout, ...@@ -870,10 +870,8 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout,
p_aout->output.p_sys->i_repeat_counter--; p_aout->output.p_sys->i_repeat_counter--;
if(!p_aout->output.p_sys->i_repeat_counter) if(!p_aout->output.p_sys->i_repeat_counter)
{ {
p_aout->p_libvlc->pf_memset( p_aout->output.p_sys->p_silence_buffer, vlc_memset( p_aout->output.p_sys->p_silence_buffer,
0x00, 0x00, p_aout->output.p_sys->i_buffer_size );
p_aout->output.p_sys->i_buffer_size
);
} }
} }
p_waveheader->lpData = p_aout->output.p_sys->p_silence_buffer; p_waveheader->lpData = p_aout->output.p_sys->p_silence_buffer;
......
...@@ -190,7 +190,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec ) ...@@ -190,7 +190,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec )
for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
{ {
p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); vlc_memcpy( p_dst, p_src, i_width );
p_src += i_width; p_src += i_width;
p_dst += i_dst_stride; p_dst += i_dst_stride;
} }
...@@ -410,7 +410,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pic ) ...@@ -410,7 +410,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pic )
for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
{ {
p_enc->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); vlc_memcpy( p_dst, p_src, i_width );
p_dst += i_width; p_dst += i_width;
p_src += i_src_stride; p_src += i_src_stride;
} }
......
...@@ -962,7 +962,7 @@ static void CopyPicture( decoder_t *p_dec, picture_t *p_pic, uint8_t *p_in ) ...@@ -962,7 +962,7 @@ static void CopyPicture( decoder_t *p_dec, picture_t *p_pic, uint8_t *p_in )
for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
{ {
p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); vlc_memcpy( p_dst, p_src, i_width );
p_src += i_width; p_src += i_width;
p_dst += i_dst_stride; p_dst += i_dst_stride;
} }
...@@ -1444,7 +1444,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data ) ...@@ -1444,7 +1444,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines;
i_line++ ) i_line++ )
{ {
p_enc->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); vlc_memcpy( p_dst, p_src, i_width );
p_dst += i_width; p_dst += i_width;
p_src += i_src_stride; p_src += i_src_stride;
} }
......
...@@ -231,9 +231,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -231,9 +231,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* FIXME: multiple blocks per frame */ /* FIXME: multiple blocks per frame */
if( p_block->i_buffer > i_header_size ) if( p_block->i_buffer > i_header_size )
{ {
p_dec->p_libvlc->pf_memcpy( p_block->p_buffer, vlc_memcpy( p_block->p_buffer,
p_block->p_buffer + i_header_size, p_block->p_buffer + i_header_size,
p_block->i_buffer - i_header_size ); p_block->i_buffer - i_header_size );
p_block->i_buffer -= i_header_size; p_block->i_buffer -= i_header_size;
} }
} }
...@@ -248,8 +248,8 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -248,8 +248,8 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_block->i_buffer > 0 ) if( p_block->i_buffer > 0 )
{ {
p_dec->p_libvlc->pf_memcpy( &p_sys->p_buffer[p_sys->i_buffer], vlc_memcpy(, &p_sys->p_buffer[p_sys->i_buffer],
p_block->p_buffer, p_block->i_buffer ); p_block->p_buffer, p_block->i_buffer );
p_sys->i_buffer += p_block->i_buffer; p_sys->i_buffer += p_block->i_buffer;
p_block->i_buffer = 0; p_block->i_buffer = 0;
} }
......
...@@ -118,7 +118,7 @@ int E_(OpenScaler)( vlc_object_t *p_this ) ...@@ -118,7 +118,7 @@ int E_(OpenScaler)( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
swscale_fast_memcpy = p_filter->p_libvlc->pf_memcpy; swscale_fast_memcpy = vlc_memcpy;
/* Set CPU capabilities */ /* Set CPU capabilities */
i_cpu = vlc_CPU(); i_cpu = vlc_CPU();
......
...@@ -547,8 +547,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block ) ...@@ -547,8 +547,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
} }
p_sys->p_buffer = p_sys->p_buffer_orig; p_sys->p_buffer = p_sys->p_buffer_orig;
p_sys->i_buffer = p_block->i_buffer; p_sys->i_buffer = p_block->i_buffer;
p_dec->p_libvlc->pf_memcpy( p_sys->p_buffer, p_block->p_buffer,