Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
5b55ee1b
Commit
5b55ee1b
authored
May 03, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use vlc_memset/vlc_memcpy
parent
e29b2a0e
Changes
65
Hide whitespace changes
Inline
Side-by-side
Showing
65 changed files
with
249 additions
and
328 deletions
+249
-328
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+2
-2
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/a52tospdif.c
+5
-5
modules/audio_filter/converter/dtstospdif.c
modules/audio_filter/converter/dtstospdif.c
+8
-8
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/converter/mpgatofixed32.c
+1
-2
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
+6
-7
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+1
-1
modules/audio_filter/resampler/trivial.c
modules/audio_filter/resampler/trivial.c
+2
-2
modules/audio_filter/resampler/ugly.c
modules/audio_filter/resampler/ugly.c
+1
-1
modules/audio_mixer/trivial.c
modules/audio_mixer/trivial.c
+2
-4
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+12
-7
modules/audio_output/directx.c
modules/audio_output/directx.c
+1
-2
modules/audio_output/hd1000a.cpp
modules/audio_output/hd1000a.cpp
+1
-1
modules/audio_output/portaudio.c
modules/audio_output/portaudio.c
+3
-4
modules/audio_output/sdl.c
modules/audio_output/sdl.c
+2
-2
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+5
-7
modules/codec/dirac.c
modules/codec/dirac.c
+2
-2
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+2
-2
modules/codec/faad.c
modules/codec/faad.c
+5
-5
modules/codec/ffmpeg/scale.c
modules/codec/ffmpeg/scale.c
+1
-1
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+2
-3
modules/codec/mash.cpp
modules/codec/mash.cpp
+3
-3
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+4
-7
modules/codec/sdl_image.c
modules/codec/sdl_image.c
+1
-1
modules/codec/tarkin.c
modules/codec/tarkin.c
+1
-1
modules/codec/theora.c
modules/codec/theora.c
+2
-2
modules/codec/twolame.c
modules/codec/twolame.c
+1
-2
modules/gui/beos/AudioOutput.cpp
modules/gui/beos/AudioOutput.cpp
+5
-5
modules/gui/fbosd.c
modules/gui/fbosd.c
+10
-14
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+2
-2
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+2
-3
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+10
-12
modules/video_chroma/i420_rgb.h
modules/video_chroma/i420_rgb.h
+1
-2
modules/video_chroma/i420_ymga.c
modules/video_chroma/i420_ymga.c
+2
-2
modules/video_chroma/i422_i420.c
modules/video_chroma/i422_i420.c
+10
-13
modules/video_filter/alphamask.c
modules/video_filter/alphamask.c
+3
-5
modules/video_filter/blend.c
modules/video_filter/blend.c
+3
-3
modules/video_filter/bluescreen.c
modules/video_filter/bluescreen.c
+1
-1
modules/video_filter/clone.c
modules/video_filter/clone.c
+2
-2
modules/video_filter/colorthres.c
modules/video_filter/colorthres.c
+3
-6
modules/video_filter/crop.c
modules/video_filter/crop.c
+1
-1
modules/video_filter/croppadd.c
modules/video_filter/croppadd.c
+6
-9
modules/video_filter/deinterlace.c
modules/video_filter/deinterlace.c
+21
-42
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/dynamicoverlay/dynamicoverlay.c
+2
-3
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
...les/video_filter/dynamicoverlay/dynamicoverlay_commands.c
+2
-2
modules/video_filter/erase.c
modules/video_filter/erase.c
+1
-1
modules/video_filter/gradient.c
modules/video_filter/gradient.c
+13
-14
modules/video_filter/grain.c
modules/video_filter/grain.c
+1
-1
modules/video_filter/invert.c
modules/video_filter/invert.c
+1
-1
modules/video_filter/magnify.c
modules/video_filter/magnify.c
+6
-11
modules/video_filter/motionblur.c
modules/video_filter/motionblur.c
+1
-1
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+5
-10
modules/video_filter/noise.c
modules/video_filter/noise.c
+2
-3
modules/video_filter/panoramix.c
modules/video_filter/panoramix.c
+14
-14
modules/video_filter/psychedelic.c
modules/video_filter/psychedelic.c
+3
-4
modules/video_filter/puzzle.c
modules/video_filter/puzzle.c
+4
-8
modules/video_filter/ripple.c
modules/video_filter/ripple.c
+8
-12
modules/video_filter/seamcarving.c
modules/video_filter/seamcarving.c
+5
-6
modules/video_filter/sharpen.c
modules/video_filter/sharpen.c
+4
-6
modules/video_filter/transform.c
modules/video_filter/transform.c
+2
-2
modules/video_filter/wall.c
modules/video_filter/wall.c
+1
-1
modules/video_filter/wave.c
modules/video_filter/wave.c
+7
-10
modules/video_output/fb.c
modules/video_output/fb.c
+2
-2
modules/video_output/snapshot.c
modules/video_output/snapshot.c
+2
-3
src/audio_output/dec.c
src/audio_output/dec.c
+2
-2
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+3
-5
No files found.
modules/access/dshow/dshow.cpp
View file @
5b55ee1b
...
@@ -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
();
...
...
modules/audio_filter/converter/a52tospdif.c
View file @
5b55ee1b
...
@@ -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
;
...
...
modules/audio_filter/converter/dtstospdif.c
View file @
5b55ee1b
...
@@ -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
);
}
}
}
}
...
...
modules/audio_filter/converter/mpgatofixed32.c
View file @
5b55ee1b
...
@@ -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:
...
...
modules/audio_filter/resampler/bandlimited.c
View file @
5b55ee1b
...
@@ -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
);
...
...
modules/audio_filter/resampler/linear.c
View file @
5b55ee1b
...
@@ -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
)
...
...
modules/audio_filter/resampler/trivial.c
View file @
5b55ee1b
...
@@ -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
)
...
...
modules/audio_filter/resampler/ugly.c
View file @
5b55ee1b
...
@@ -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
--
;
)
{
{
...
...
modules/audio_mixer/trivial.c
View file @
5b55ee1b
...
@@ -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
;
}
}
...
...
modules/audio_output/auhal.c
View file @
5b55ee1b
...
@@ -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
...
...
modules/audio_output/directx.c
View file @
5b55ee1b
...
@@ -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
);
}
}
...
...
modules/audio_output/hd1000a.cpp
View file @
5b55ee1b
...
@@ -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
...
...
modules/audio_output/portaudio.c
View file @
5b55ee1b
...
@@ -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
;
}
}
...
...
modules/audio_output/sdl.c
View file @
5b55ee1b
...
@@ -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
);
}
}
}
}
modules/audio_output/waveout.c
View file @
5b55ee1b
...
@@ -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
;
...
...
modules/codec/dirac.c
View file @
5b55ee1b
...
@@ -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
;
}
}
...
...
modules/codec/dmo/dmo.c
View file @
5b55ee1b
...
@@ -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
;
}
}
...
...
modules/codec/faad.c
View file @
5b55ee1b
...
@@ -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
;
}
}
...
...
modules/codec/ffmpeg/scale.c
View file @
5b55ee1b
...
@@ -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
();
...
...
modules/codec/ffmpeg/video.c
View file @
5b55ee1b
...
@@ -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
,