Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e2364ce5
Commit
e2364ce5
authored
Nov 13, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CPU optimized memcpy if available.
parent
48940cc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
modules/audio_filter/channel_mixer/mono.c
modules/audio_filter/channel_mixer/mono.c
+7
-6
No files found.
modules/audio_filter/channel_mixer/mono.c
View file @
e2364ce5
...
...
@@ -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
...
...
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