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 )
}
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();
/* The caller got what he wanted */
......@@ -1733,7 +1733,7 @@ static int Demux( demux_t *p_demux )
#endif
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;
sample.p_sample->Release();
......
......@@ -100,15 +100,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy the S/PDIF headers. */
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[6] = (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
{
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[6] = (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,
}
#endif
}
p_filter->p_libvlc->pf_memset( p_out + 8 + i_frame_size * 2, 0,
AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 );
vlc_memset( p_out + 8 + i_frame_size * 2, 0,
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_bytes = AOUT_SPDIF_SIZE;
......
......@@ -138,9 +138,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
/* Backup frame */
p_filter->p_libvlc->pf_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_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_in_buf->i_nb_bytes );
p_filter->p_sys->i_frames++;
......@@ -174,14 +174,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy the S/PDIF headers. */
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[6] = (( i_length ) >> 5 ) & 0xFF;
p_out[7] = ( i_length << 3 ) & 0xFF;
}
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[6] = ( i_length << 3 ) & 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,
}
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 )
{
p_filter->p_libvlc->pf_memset( p_out + 8 + i_length_padded, 0,
i_fz - i_length_padded - 8 );
vlc_memset( p_out + 8 + i_length_padded, 0,
i_fz - i_length_padded - 8 );
}
}
......
......@@ -215,8 +215,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
break;
case 1:
p_filter->p_libvlc->pf_memcpy( p_samples, p_left,
i_samples * sizeof(mad_fixed_t) );
vlc_memcpy( p_samples, p_left, i_samples * sizeof(mad_fixed_t) );
break;
default:
......
......@@ -246,14 +246,13 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
/* Copy all our samples in p_in */
if( p_filter->p_sys->i_old_wing )
{
p_aout->p_libvlc->pf_memcpy( p_in, p_filter->p_sys->p_buf,
p_filter->p_sys->i_old_wing * 2 *
p_filter->input.i_bytes_per_frame );
vlc_memcpy( p_in, p_filter->p_sys->p_buf,
p_filter->p_sys->i_old_wing * 2 *
p_filter->input.i_bytes_per_frame );
}
p_aout->p_libvlc->pf_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 *
i_nb_channels, p_in_buf->p_buffer,
p_in_buf->i_nb_samples *
p_filter->input.i_bytes_per_frame );
vlc_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 * i_nb_channels,
p_in_buf->p_buffer,
p_in_buf->i_nb_samples * p_filter->input.i_bytes_per_frame );
/* Make sure the output buffer is reset */
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,
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) */
if( !p_filter->b_continuity )
......
......@@ -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
* a new buffer. Currently, this never happens. */
p_aout->p_libvlc->pf_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer,
__MIN(i_out_nb, i_in_nb) * i_sample_bytes );
vlc_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer,
__MIN(i_out_nb, i_in_nb) * i_sample_bytes );
}
if ( i_out_nb > i_in_nb )
......
......@@ -113,7 +113,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
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-- ; )
{
......
......@@ -103,8 +103,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
{
aout_buffer_t * p_old_buffer;
if ( i_available_bytes > 0 )
p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_available_bytes );
vlc_memcpy( p_out, p_in, i_available_bytes );
i_nb_bytes -= 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 )
}
else
{
if ( i_nb_bytes > 0 )
p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_nb_bytes );
vlc_memcpy( p_out, p_in, i_nb_bytes );
p_input->p_first_byte_to_mix = p_in + i_nb_bytes;
break;
}
......
......@@ -1312,7 +1312,9 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
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 );
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;
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
......@@ -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 );
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;
if( i_mData_bytes >= ioData->mBuffers[0].mDataByteSize )
{
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
{
......@@ -1349,7 +1354,8 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
}
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;
}
}
......@@ -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 );
/* move data into output data buffer */
p_aout->p_libvlc->pf_memcpy( BUFFER.mData,
p_buffer->p_buffer, p_buffer->i_nb_bytes );
vlc_memcpy( BUFFER.mData, p_buffer->p_buffer, p_buffer->i_nb_bytes );
aout_BufferFree( p_buffer );
}
else
{
p_aout->p_libvlc->pf_memset( BUFFER.mData, 0, BUFFER.mDataByteSize );
vlc_memset( BUFFER.mData, 0, BUFFER.mDataByteSize );
}
#undef BUFFER
......
......@@ -960,8 +960,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame,
p_sys->i_bits_per_sample );
}
p_aout->p_libvlc->pf_memcpy( p_write_position, p_buffer->p_buffer,
l_bytes1 );
vlc_memcpy( p_write_position, p_buffer->p_buffer, l_bytes1 );
aout_BufferFree( p_buffer );
}
......
......@@ -237,7 +237,7 @@ static int Thread( aout_instance_t * p_aout )
#define i p_sys->nNextBufferIndex
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 );
}
else
......
......@@ -147,8 +147,8 @@ static int paCallback( const void *inputBuffer, void *outputBuffer,
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
p_aout->p_libvlc->pf_memcpy( outputBuffer, p_buffer->p_buffer,
framesPerBuffer * p_sys->i_sample_size );
vlc_memcpy( outputBuffer, p_buffer->p_buffer,
framesPerBuffer * p_sys->i_sample_size );
/* aout_BufferFree may be dangereous here, but then so is
* aout_OutputNextBuffer (calls aout_BufferFree internally).
* one solution would be to link the no longer useful buffers
......@@ -160,8 +160,7 @@ static int paCallback( const void *inputBuffer, void *outputBuffer,
else
/* Audio output buffer shortage -> stop the fill process and wait */
{
p_aout->p_libvlc->pf_memset( outputBuffer, 0,
framesPerBuffer * p_sys->i_sample_size );
vlc_memset( outputBuffer, 0, framesPerBuffer * p_sys->i_sample_size );
}
return 0;
}
......
......@@ -261,12 +261,12 @@ static void SDLCallback( void * _p_aout, uint8_t * p_stream, int i_len )
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 );
}
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,
*/
if(b_spdif)
{
p_aout->p_libvlc->pf_memcpy( p_aout->output.p_sys->p_silence_buffer,
p_buffer->p_buffer,
p_aout->output.p_sys->i_buffer_size );
vlc_memcpy( p_aout->output.p_sys->p_silence_buffer,
p_buffer->p_buffer,
p_aout->output.p_sys->i_buffer_size );
p_aout->output.p_sys->i_repeat_counter = 2;
}
} else {
......@@ -870,10 +870,8 @@ static int PlayWaveOut( aout_instance_t *p_aout, HWAVEOUT h_waveout,
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,
0x00,
p_aout->output.p_sys->i_buffer_size
);
vlc_memset( p_aout->output.p_sys->p_silence_buffer,
0x00, p_aout->output.p_sys->i_buffer_size );
}
}
p_waveheader->lpData = p_aout->output.p_sys->p_silence_buffer;
......
......@@ -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++ )
{
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_dst += i_dst_stride;
}
......@@ -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++ )
{
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_src += i_src_stride;
}
......
......@@ -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++ )
{
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_dst += i_dst_stride;
}
......@@ -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;
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_src += i_src_stride;
}
......
......@@ -231,9 +231,9 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* FIXME: multiple blocks per frame */
if( p_block->i_buffer > i_header_size )
{
p_dec->p_libvlc->pf_memcpy( p_block->p_buffer,
p_block->p_buffer + i_header_size,
p_block->i_buffer - i_header_size );
vlc_memcpy( p_block->p_buffer,
p_block->p_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 )
if( p_block->i_buffer > 0 )
{
p_dec->p_libvlc->pf_memcpy( &p_sys->p_buffer[p_sys->i_buffer],
p_block->p_buffer, p_block->i_buffer );
vlc_memcpy(, &p_sys->p_buffer[p_sys->i_buffer],
p_block->p_buffer, p_block->i_buffer );
p_sys->i_buffer += p_block->i_buffer;
p_block->i_buffer = 0;
}
......
......@@ -118,7 +118,7 @@ int E_(OpenScaler)( vlc_object_t *p_this )
return VLC_EGENERIC;
}
swscale_fast_memcpy = p_filter->p_libvlc->pf_memcpy;
swscale_fast_memcpy = vlc_memcpy;
/* Set CPU capabilities */
i_cpu = vlc_CPU();
......
......@@ -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->i_buffer = p_block->i_buffer;
p_dec->p_libvlc->pf_memcpy( p_sys->p_buffer, p_block->p_buffer,
p_block->i_buffer );
vlc_memcpy( p_sys->p_buffer, p_block->p_buffer, p_block->i_buffer );
memset( p_sys->p_buffer + p_block->i_buffer, 0,
FF_INPUT_BUFFER_PADDING_SIZE );
......@@ -835,7 +834,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
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_size );
vlc_memcpy( p_dst, p_src, i_size );
p_src += i_src_stride;
p_dst += i_dst_stride;
}
......
......@@ -213,11 +213,11 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys->p_decoder->sync();
p_sys->i_counter = 0;
p_frame = p_sys->p_decoder->frame();
p_dec->p_libvlc->pf_memcpy( p_pic->p[0].p_pixels, p_frame, i_width*i_height );
vlc_memcpy( p_dec, p_pic->p[0].p_pixels, p_frame, i_width*i_height );
p_frame += i_width * i_height;
p_dec->p_libvlc->pf_memcpy( p_pic->p[1].p_pixels, p_frame, i_width*i_height/4 );
vlc_memcpy( p_dec, p_pic->p[1].p_pixels, p_frame, i_width*i_height/4 );
p_frame += i_width * i_height/4;
p_dec->p_libvlc->pf_memcpy( p_pic->p[2].p_pixels, p_frame, i_width*i_height/4 );
vlc_memcpy( p_dec, p_pic->p[2].p_pixels, p_frame, i_width*i_height/4 );
p_pic->date = p_sys->i_pts;
}
block_Release( p_block);
......
......@@ -276,7 +276,7 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic )
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 += p_sys->b_invert ? -i_width : i_width;
p_dst += i_width;
}
......@@ -347,12 +347,9 @@ static block_t *SendFrame( decoder_t *p_dec, block_t *p_block )
for( j = 0; j < pic.p[i].i_visible_lines / 2; j++ )
{
p_dec->p_libvlc->pf_memcpy( p_tmp, p_bottom,
pic.p[i].i_visible_pitch );
p_dec->p_libvlc->pf_memcpy( p_bottom, p_top,
pic.p[i].i_visible_pitch );
p_dec->p_libvlc->pf_memcpy( p_top, p_tmp,
pic.p[i].i_visible_pitch );
vlc_memcpy( p_tmp, p_bottom, pic.p[i].i_visible_pitch );
vlc_memcpy( p_bottom, p_top, pic.p[i].i_visible_pitch );
vlc_memcpy( p_top, p_tmp, pic.p[i].i_visible_pitch );
p_top += i_pitch;
p_bottom -= i_pitch;
}
......
......@@ -208,7 +208,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
for ( i = 0; i < p_surface->h; i++ )
{
p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_pitch );
vlc_memcpy( p_dst, p_src, i_pitch );
p_src += p_surface->pitch;
p_dst += p_pic->p[0].i_pitch;
}
......
......@@ -314,7 +314,7 @@ static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic,
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_src_stride );
vlc_memcpy( p_dst, p_src, i_src_stride );
p_src += i_src_stride;
p_dst += i_dst_stride;
......
......@@ -563,8 +563,8 @@ static void theora_CopyPicture( decoder_t *p_dec, picture_t *p_pic,
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_src_xoffset,
i_plane ? yuv->uv_width : yuv->y_width );
vlc_memcpy( p_dst, p_src + i_src_xoffset,
i_plane ? yuv->uv_width : yuv->y_width );
p_src += i_src_stride;
p_dst += i_dst_stride;
}
......
......@@ -289,8 +289,7 @@ static block_t *Encode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
p_sys->p_out_buffer, MAX_CODED_FRAME_SIZE );
p_sys->i_nb_samples = 0;
p_block = block_New( p_enc, i_used );
p_enc->p_libvlc->pf_memcpy( p_block->p_buffer, p_sys->p_out_buffer,
i_used );
vlc_memcpy( p_block->p_buffer, p_sys->p_out_buffer, i_used );
p_block->i_length = (mtime_t)1000000 *
(mtime_t)MPEG_FRAME_SIZE / (mtime_t)p_enc->fmt_out.audio.i_rate;
p_block->i_dts = p_block->i_pts = p_sys->i_pts;
......
......@@ -152,18 +152,18 @@ static void Play( void * _p_aout, void * _p_buffer, size_t i_size,
if( p_aout_buffer != NULL )
{
p_aout->p_libvlc->pf_memcpy( p_buffer, p_aout_buffer->p_buffer,
MIN( i_size, p_aout_buffer->i_nb_bytes ) );
vlc_memcpy( p_buffer, p_aout_buffer->p_buffer,
MIN( i_size, p_aout_buffer->i_nb_bytes ) );
if( p_aout_buffer->i_nb_bytes < i_size )
{
p_aout->p_libvlc->pf_memset( p_buffer + p_aout_buffer->i_nb_bytes,
0, i_size - p_aout_buffer->i_nb_bytes );
vlc_memset( p_buffer + p_aout_buffer->i_nb_bytes,
0, i_size - p_aout_buffer->i_nb_bytes );
}
aout_BufferFree( p_aout_buffer );
}
else
{
p_aout->p_libvlc->pf_memset( p_buffer, 0, i_size );
vlc_memset( p_buffer, 0, i_size );
}
}
......
......@@ -331,8 +331,7 @@ static int Create( vlc_object_t *p_this )
msg_Err( p_intf, "out of memory" );
return VLC_ENOMEM;
}
p_intf->p_libvlc->pf_memcpy( p_sys->p_style, &default_text_style,
sizeof( text_style_t ) );
vlc_memcpy( p_sys->p_style, &default_text_style, sizeof( text_style_t ) );
p_intf->pf_run = Run;
......@@ -417,9 +416,8 @@ static int Create( vlc_object_t *p_this )
for( i = 0; i < FBOSD_RENDER_MAX; i++ )
{
p_intf->p_libvlc->pf_memcpy( &p_sys->render[i].text_style,
&default_text_style,
sizeof( text_style_t ) );
vlc_memcpy( &p_sys->render[i].text_style, &default_text_style,
sizeof( text_style_t ) );
}
p_sys->b_clear = var_CreateGetBoolCommand( p_intf, "fbosd-clear" );
......@@ -841,9 +839,8 @@ static int RenderPicture( intf_thread_t *p_intf, int i_x_offset, int i_y_offset,
if( p_src->p[i].i_pitch == p_dest->p[i].i_pitch )
{
/* There are margins, but with the same width : perfect ! */
p_intf->p_libvlc->pf_memcpy(
p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
p_src->p[i].i_pitch * p_src->p[i].i_visible_lines );
vlc_memcpy( p_dest->p[i].p_pixels, p_src->p[i].p_pixels,
p_src->p[i].i_pitch * p_src->p[i].i_visible_lines );
}
else
{
......@@ -873,8 +870,8 @@ static int RenderPicture( intf_thread_t *p_intf, int i_x_offset, int i_y_offset,
p_out += ( i_y_offset * p_dest->p[i].i_pitch );
for( i_line = 0; i_line < ( p_src->p[i].i_visible_lines - i_y_clip ); i_line++ )
{
p_intf->p_libvlc->pf_memcpy( p_out + i_x, p_in,
p_src->p[i].i_visible_pitch - i_x_clip );
vlc_memcpy( p_out + i_x, p_in,
p_src->p[i].i_visible_pitch - i_x_clip );
p_in += p_src->p[i].i_pitch;
p_out += p_dest->p[i].i_pitch;
}
......@@ -932,8 +929,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
#else
fmt_out = p_region->fmt;
fmt_out.i_bits_per_pixel = 32;
p_intf->p_libvlc->pf_memcpy( p_fmt, &fmt_out,
sizeof(video_format_t) );
vlc_memcpy( p_fmt, &fmt_out, sizeof(video_format_t) );
p_dest = AllocatePicture( VLC_OBJECT(p_intf), &fmt_out );
if( !p_dest )
......@@ -1276,8 +1272,8 @@ static void RenderClear( intf_thread_t *p_intf, struct fbosd_render_t *render )
{
intf_sys_t *p_sys = (intf_sys_t*) p_intf->p_sys;
p_intf->p_libvlc->pf_memcpy( &render->text_style, &default_text_style,
sizeof( text_style_t ) );
vlc_memcpy( &render->text_style, &default_text_style,
sizeof( text_style_t ) );
free( render->psz_string );
render->psz_string = NULL;
......
......@@ -306,8 +306,8 @@ int E_( EStoPES )( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
p_pes->i_length = 0;
if( i_pes_payload > 0 )
{
p_sout->p_libvlc->pf_memcpy( p_pes->p_buffer + i_pes_header,
p_data, i_pes_payload );
vlc_memcpy( p_pes->p_buffer + i_pes_header, p_data,
i_pes_payload );
}
i_pes_count++;
}
......
......@@ -1677,7 +1677,7 @@ static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo )
else if( i_size > STD_PES_PAYLOAD )
{
block_t *p_new = block_New( p_mux, STD_PES_PAYLOAD );
p_mux->p_libvlc->pf_memcpy( p_new->p_buffer, p_data->p_buffer, STD_PES_PAYLOAD );
vlc_memcpy( p_new->p_buffer, p_data->p_buffer, STD_PES_PAYLOAD );
p_new->i_pts = p_data->i_pts;
p_new->i_dts = p_data->i_dts;
p_new->i_length = p_data->i_length * STD_PES_PAYLOAD
......@@ -1706,8 +1706,7 @@ static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo )
}
i_copy = __MIN( STD_PES_PAYLOAD - i_size, p_next->i_buffer );
p_mux->p_libvlc->pf_memcpy( &p_data->p_buffer[i_size], p_next->p_buffer,
i_copy );
vlc_memcpy( &p_data->p_buffer[i_size], p_next->p_buffer, i_copy );
p_next->i_pts += p_next->i_length * i_copy / p_next->i_buffer;
p_next->i_dts += p_next->i_length * i_copy / p_next->i_buffer;
p_next->i_length -= p_next->i_length * i_copy / p_next->i_buffer;
......
......@@ -860,10 +860,8 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
= id->ff_enc_c->coded_frame->motion_subsample_log2;
id->p_frame->mb_type = malloc( ((mb_width + 1) * (mb_height + 1) + 1)
* sizeof(uint32_t) );
p_stream->p_libvlc->pf_memcpy( id->p_frame->mb_type,
id->ff_enc_c->coded_frame->mb_type,
(mb_width + 1) * mb_height
* sizeof(id->p_frame->mb_type[0]));
vlc_memcpy( id->p_frame->mb_type, id->ff_enc_c->coded_frame->mb_type,
(mb_width + 1) * mb_height * sizeof(id->p_frame->mb_type[0]));
for ( i = 0; i < 2; i++ )
{
......@@ -877,24 +875,24 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
{
id->p_frame->motion_val[i] = malloc( 2 * stride * height
* sizeof(int16_t) );
p_stream->p_libvlc->pf_memcpy( id->p_frame->motion_val[i],
id->ff_enc_c->coded_frame->motion_val[i],
2 * stride * height * sizeof(int16_t) );
vlc_memcpy( id->p_frame->motion_val[i],
id->ff_enc_c->coded_frame->motion_val[i],
2 * stride * height * sizeof(int16_t) );
}
if ( id->ff_enc_c->coded_frame->ref_index[i] )
{
id->p_frame->ref_index[i] = malloc( b8_stride * 2 * mb_height
* sizeof(int8_t) );
p_stream->p_libvlc->pf_memcpy( id->p_frame->ref_index[i],
id->ff_enc_c->coded_frame->ref_index[i],
b8_stride * 2 * mb_height * sizeof(int8_t));
vlc_memcpy( id->p_frame->ref_index[i],
id->ff_enc_c->coded_frame->ref_index[i],
b8_stride * 2 * mb_height * sizeof(int8_t));
}
}
}
#endif
p_out = block_New( p_stream, i_out );
p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
vlc_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
p_out->i_length = p_buffer->i_length;
p_out->i_pts = p_buffer->i_dts;
p_out->i_dts = p_buffer->i_dts;
......@@ -937,7 +935,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
return NULL;
p_out = block_New( p_stream, i_out );
p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
vlc_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
p_out->i_length = p_buffer->i_length;
p_out->i_pts = p_buffer->i_dts;
p_out->i_dts = p_buffer->i_dts;
......