Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
31c8cef1
Commit
31c8cef1
authored
Jul 02, 2012
by
Rafaël Carré
Committed by
Rémi Denis-Courmont
Jul 03, 2012
Browse files
s/vlc_memcpy/memcpy/
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
102f976a
Changes
42
Hide whitespace changes
Inline
Side-by-side
modules/access/dshow/dshow.cpp
View file @
31c8cef1
...
...
@@ -1832,7 +1832,7 @@ static block_t *ReadCompressed( access_t *p_access )
}
sample
.
p_sample
->
GetPointer
(
&
p_data
);
vlc_
memcpy
(
p_block
->
p_buffer
,
p_data
,
i_data_size
);
memcpy
(
p_block
->
p_buffer
,
p_data
,
i_data_size
);
sample
.
p_sample
->
Release
();
/* The caller got what he wanted */
...
...
@@ -1921,7 +1921,7 @@ static int Demux( demux_t *p_demux )
#endif
p_block
=
block_New
(
p_demux
,
i_data_size
);
vlc_
memcpy
(
p_block
->
p_buffer
,
p_data
,
i_data_size
);
memcpy
(
p_block
->
p_buffer
,
p_data
,
i_data_size
);
p_block
->
i_pts
=
p_block
->
i_dts
=
i_pts
;
sample
.
p_sample
->
Release
();
...
...
modules/access/linsys/linsys_sdi.c
View file @
31c8cef1
...
...
@@ -948,7 +948,7 @@ static int DecodeAudio( demux_t *p_demux, sdi_audio_t *p_audio )
if
(
p_audio
->
i_left_samples
==
p_audio
->
i_nb_samples
&&
p_audio
->
i_right_samples
==
p_audio
->
i_nb_samples
)
vlc_
memcpy
(
p_output
,
p_audio
->
p_buffer
,
memcpy
(
p_output
,
p_audio
->
p_buffer
,
p_audio
->
i_nb_samples
*
sizeof
(
int16_t
)
*
2
);
else
{
...
...
@@ -1054,7 +1054,7 @@ static const uint8_t *GetLine( demux_t *p_demux, const uint8_t **pp_parser,
if
(
p_sys
->
i_line_buffer
)
{
unsigned
int
i_remaining
=
i_total_size
-
p_sys
->
i_line_buffer
;
vlc_
memcpy
(
p_sys
->
p_line_buffer
+
p_sys
->
i_line_buffer
,
memcpy
(
p_sys
->
p_line_buffer
+
p_sys
->
i_line_buffer
,
*
pp_parser
,
i_remaining
);
*
pp_parser
+=
i_remaining
;
p_sys
->
i_line_buffer
=
0
;
...
...
@@ -1064,7 +1064,7 @@ static const uint8_t *GetLine( demux_t *p_demux, const uint8_t **pp_parser,
if
(
p_end
-
*
pp_parser
<
(
int
)
i_total_size
)
{
vlc_
memcpy
(
p_sys
->
p_line_buffer
,
*
pp_parser
,
memcpy
(
p_sys
->
p_line_buffer
,
*
pp_parser
,
p_end
-
*
pp_parser
);
p_sys
->
i_line_buffer
=
p_end
-
*
pp_parser
;
return
NULL
;
...
...
modules/access/pulse.c
View file @
31c8cef1
...
...
@@ -181,7 +181,7 @@ static void stream_read_cb(pa_stream *s, size_t length, void *userdata)
block_t
*
block
=
block_Alloc
(
length
);
if
(
likely
(
block
!=
NULL
))
{
vlc_
memcpy
(
block
->
p_buffer
,
ptr
,
length
);
memcpy
(
block
->
p_buffer
,
ptr
,
length
);
block
->
i_nb_samples
=
samples
;
block
->
i_dts
=
block
->
i_pts
=
pts
;
if
(
sys
->
discontinuity
)
{
...
...
modules/access/shm.c
View file @
31c8cef1
...
...
@@ -367,7 +367,7 @@ static void Demux (void *data)
if
(
block
==
NULL
)
return
;
vlc_
memcpy
(
block
->
p_buffer
,
sys
->
addr
,
sys
->
length
);
memcpy
(
block
->
p_buffer
,
sys
->
addr
,
sys
->
length
);
/* Send block */
vlc_mutex_lock
(
&
sys
->
lock
);
...
...
modules/audio_filter/converter/a52tospdif.c
View file @
31c8cef1
...
...
@@ -94,14 +94,14 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
/* Copy the S/PDIF headers. */
if
(
p_filter
->
fmt_out
.
audio
.
i_format
==
VLC_CODEC_SPDIFB
)
{
vlc_
memcpy
(
p_out
,
p_sync_be
,
6
);
memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
4
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
SetWBE
(
p_out
+
6
,
i_frame_size
<<
4
);
vlc_
memcpy
(
&
p_out
[
8
],
p_in
,
i_frame_size
*
2
);
memcpy
(
&
p_out
[
8
],
p_in
,
i_frame_size
*
2
);
}
else
{
vlc_
memcpy
(
p_out
,
p_sync_le
,
6
);
memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
5
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
SetWLE
(
p_out
+
6
,
i_frame_size
<<
4
);
swab
(
p_in
,
&
p_out
[
8
],
i_frame_size
*
2
);
...
...
modules/audio_filter/converter/dtstospdif.c
View file @
31c8cef1
...
...
@@ -132,7 +132,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
/* Backup frame */
/* TODO: keeping the blocks in a list would save one memcpy */
vlc_
memcpy
(
p_filter
->
p_sys
->
p_buf
+
p_in_buf
->
i_buffer
*
memcpy
(
p_filter
->
p_sys
->
p_buf
+
p_in_buf
->
i_buffer
*
p_filter
->
p_sys
->
i_frames
,
p_in_buf
->
p_buffer
,
p_in_buf
->
i_buffer
);
...
...
@@ -171,13 +171,13 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
/* Copy the S/PDIF headers. */
if
(
p_filter
->
fmt_out
.
audio
.
i_format
==
VLC_CODEC_SPDIFB
)
{
vlc_
memcpy
(
p_out
,
p_sync_be
,
6
);
memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
5
]
=
i_ac5_spdif_type
;
SetWBE
(
p_out
+
6
,
i_length
<<
3
);
}
else
{
vlc_
memcpy
(
p_out
,
p_sync_le
,
6
);
memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
4
]
=
i_ac5_spdif_type
;
SetWLE
(
p_out
+
6
,
i_length
<<
3
);
}
...
...
@@ -200,7 +200,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
}
else
{
vlc_
memcpy
(
p_out
+
8
,
p_in
,
i_length
);
memcpy
(
p_out
+
8
,
p_in
,
i_length
);
}
if
(
i_fz
>
i_length
+
8
)
...
...
modules/audio_filter/converter/mpgatofixed32.c
View file @
31c8cef1
...
...
@@ -140,7 +140,7 @@ static void DoWork( filter_t * p_filter,
else
{
assert
(
p_pcm
->
channels
==
1
);
vlc_
memcpy
(
p_samples
,
p_left
,
i_samples
*
sizeof
(
mad_fixed_t
)
);
memcpy
(
p_samples
,
p_left
,
i_samples
*
sizeof
(
mad_fixed_t
)
);
}
}
else
...
...
modules/audio_output/audioqueue.c
View file @
31c8cef1
...
...
@@ -182,7 +182,7 @@ void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferR
}
if
(
p_buffer
!=
NULL
)
{
vlc_
memcpy
(
inBuffer
->
mAudioData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
memcpy
(
inBuffer
->
mAudioData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
inBuffer
->
mAudioDataByteSize
=
p_buffer
->
i_buffer
;
block_Release
(
p_buffer
);
}
else
{
...
...
modules/audio_output/auhal.c
View file @
31c8cef1
...
...
@@ -1291,7 +1291,7 @@ 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
);
vlc_
memcpy
(
ioData
->
mBuffers
[
0
].
mData
,
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
;
...
...
@@ -1312,14 +1312,14 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
{
uint32_t
i_second_mData_bytes
=
__MIN
(
p_buffer
->
i_buffer
,
ioData
->
mBuffers
[
0
].
mDataByteSize
-
i_mData_bytes
);
vlc_
memcpy
(
(
uint8_t
*
)
ioData
->
mBuffers
[
0
].
mData
+
i_mData_bytes
,
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_buffer
-
i_second_mData_bytes
;
vlc_
memcpy
(
p_sys
->
p_remainder_buffer
,
memcpy
(
p_sys
->
p_remainder_buffer
,
&
p_buffer
->
p_buffer
[
i_second_mData_bytes
],
p_sys
->
i_total_bytes
);
block_Release
(
p_buffer
);
...
...
@@ -1382,7 +1382,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
msg_Warn
(
p_aout
,
"bytesize: %d nb_bytes: %d"
,
(
int
)
BUFFER
.
mDataByteSize
,
(
int
)
p_buffer
->
i_buffer
);
/* move data into output data buffer */
vlc_
memcpy
(
BUFFER
.
mData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
memcpy
(
BUFFER
.
mData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
block_Release
(
p_buffer
);
}
else
...
...
modules/audio_output/directx.c
View file @
31c8cef1
...
...
@@ -1033,7 +1033,7 @@ static int FillBuffer( audio_output_t *p_aout, int i_frame, block_t *p_buffer )
p_sys
->
i_bits_per_sample
);
}
vlc_
memcpy
(
p_write_position
,
p_buffer
->
p_buffer
,
l_bytes1
);
memcpy
(
p_write_position
,
p_buffer
->
p_buffer
,
l_bytes1
);
block_Release
(
p_buffer
);
}
...
...
modules/audio_output/kai.c
View file @
31c8cef1
...
...
@@ -316,7 +316,7 @@ static ULONG APIENTRY KaiCallback( PVOID p_cb_data,
if
(
p_aout_buffer
!=
NULL
)
{
vlc_
memcpy
(
(
uint8_t
*
)
p_buffer
+
i_len
,
memcpy
(
(
uint8_t
*
)
p_buffer
+
i_len
,
p_aout_buffer
->
p_buffer
,
p_aout_buffer
->
i_buffer
);
...
...
modules/audio_output/packet.c
View file @
31c8cef1
...
...
@@ -278,7 +278,7 @@ static block_t *aout_OutputSlice (audio_output_t *p_aout)
size_t
avail
=
p_inbuf
->
i_nb_samples
*
framesize
;
if
(
avail
>
needed
)
{
vlc_
memcpy
(
p_out
,
p_in
,
needed
);
memcpy
(
p_out
,
p_in
,
needed
);
p_fifo
->
p_first
->
p_buffer
+=
needed
;
p_fifo
->
p_first
->
i_buffer
-=
needed
;
needed
/=
framesize
;
...
...
@@ -290,7 +290,7 @@ static block_t *aout_OutputSlice (audio_output_t *p_aout)
break
;
}
vlc_
memcpy
(
p_out
,
p_in
,
avail
);
memcpy
(
p_out
,
p_in
,
avail
);
needed
-=
avail
;
p_out
+=
avail
;
/* Next buffer */
...
...
modules/audio_output/waveout.c
View file @
31c8cef1
...
...
@@ -763,7 +763,7 @@ static int PlayWaveOut( audio_output_t *p_aout, HWAVEOUT h_waveout,
*/
if
(
b_spdif
)
{
vlc_
memcpy
(
p_aout
->
sys
->
p_silence_buffer
,
memcpy
(
p_aout
->
sys
->
p_silence_buffer
,
p_buffer
->
p_buffer
,
p_aout
->
sys
->
i_buffer_size
);
p_aout
->
sys
->
i_repeat_counter
=
2
;
...
...
modules/codec/avcodec/video.c
View file @
31c8cef1
...
...
@@ -949,7 +949,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
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_size
);
memcpy
(
p_dst
,
p_src
,
i_size
);
p_src
+=
i_src_stride
;
p_dst
+=
i_dst_stride
;
}
...
...
modules/codec/crystalhd.c
View file @
31c8cef1
...
...
@@ -599,7 +599,7 @@ static void crystal_CopyPicture ( picture_t *p_pic, BC_DTS_PROC_OUT* p_out )
p_dst_end = p_dst + (i_dst_stride * p_out->PicInfo.height);
for( ; p_dst < p_dst_end; p_dst += i_dst_stride, p_src += (p_out->PicInfo.width * 2))
vlc_
memcpy( p_dst, p_src, p_out->PicInfo.width * 2); // Copy in bytes
memcpy( p_dst, p_src, p_out->PicInfo.width * 2); // Copy in bytes
}
#endif
...
...
modules/codec/dirac.c
View file @
31c8cef1
...
...
@@ -834,7 +834,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
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_width
);
memcpy
(
p_dst
,
p_src
,
i_width
);
p_dst
+=
i_width
;
p_src
+=
i_src_stride
;
}
...
...
modules/codec/dmo/dmo.c
View file @
31c8cef1
...
...
@@ -1018,7 +1018,7 @@ static void CopyPicture( picture_t *p_pic, uint8_t *p_in )
for
(
i_line
=
0
;
i_line
<
p_pic
->
p
[
i_plane
].
i_visible_lines
;
i_line
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_width
);
memcpy
(
p_dst
,
p_src
,
i_width
);
p_src
+=
i_width
;
p_dst
+=
i_dst_stride
;
}
...
...
@@ -1531,7 +1531,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
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_width
);
memcpy
(
p_dst
,
p_src
,
i_width
);
p_dst
+=
i_width
;
p_src
+=
i_src_stride
;
}
...
...
modules/codec/faad.c
View file @
31c8cef1
...
...
@@ -249,7 +249,7 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if
(
p_block
->
i_buffer
>
0
)
{
vlc_
memcpy
(
&
p_sys
->
p_buffer
[
p_sys
->
i_buffer
],
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
;
...
...
modules/codec/mash.cpp
View file @
31c8cef1
...
...
@@ -209,11 +209,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
();
vlc_
memcpy
(
p_dec
,
p_pic
->
p
[
0
].
p_pixels
,
p_frame
,
i_width
*
i_height
);
memcpy
(
p_dec
,
p_pic
->
p
[
0
].
p_pixels
,
p_frame
,
i_width
*
i_height
);
p_frame
+=
i_width
*
i_height
;
vlc_
memcpy
(
p_dec
,
p_pic
->
p
[
1
].
p_pixels
,
p_frame
,
i_width
*
i_height
/
4
);
memcpy
(
p_dec
,
p_pic
->
p
[
1
].
p_pixels
,
p_frame
,
i_width
*
i_height
/
4
);
p_frame
+=
i_width
*
i_height
/
4
;
vlc_
memcpy
(
p_dec
,
p_pic
->
p
[
2
].
p_pixels
,
p_frame
,
i_width
*
i_height
/
4
);
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
);
...
...
modules/codec/omxil/utils.c
View file @
31c8cef1
...
...
@@ -145,7 +145,7 @@ void CopyOmxPicture( decoder_t *p_dec, picture_t *p_pic,
for
(
i_line
=
0
;
i_line
<
p_pic
->
p
[
i_plane
].
i_visible_lines
;
i_line
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_width
);
memcpy
(
p_dst
,
p_src
,
i_width
);
p_src
+=
i_src_stride
;
p_dst
+=
i_dst_stride
;
}
...
...
@@ -179,7 +179,7 @@ void CopyVlcPicture( decoder_t *p_dec, OMX_BUFFERHEADERTYPE *p_header,
for
(
i_line
=
0
;
i_line
<
p_pic
->
p
[
i_plane
].
i_visible_lines
;
i_line
++
)
{
vlc_
memcpy
(
p_dst
,
p_src
,
i_width
);
memcpy
(
p_dst
,
p_src
,
i_width
);
p_src
+=
i_src_stride
;
p_dst
+=
i_dst_stride
;
}
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment