Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
9f98a8e9
Commit
9f98a8e9
authored
Apr 29, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: use memcpy when input and output match
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
106789df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
audioconvert.c
libswresample/audioconvert.c
+7
-0
No files found.
libswresample/audioconvert.c
View file @
9f98a8e9
...
...
@@ -107,6 +107,10 @@ static conv_func_type * const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB*AV_SAM
FMT_PAIR_FUNC
(
AV_SAMPLE_FMT_DBL
,
AV_SAMPLE_FMT_DBL
),
};
static
void
cpy
(
uint8_t
**
dst
,
const
uint8_t
**
src
,
int
len
){
memcpy
(
*
dst
,
*
src
,
len
);
}
AudioConvert
*
swri_audio_convert_alloc
(
enum
AVSampleFormat
out_fmt
,
enum
AVSampleFormat
in_fmt
,
int
channels
,
const
int
*
ch_map
,
...
...
@@ -126,6 +130,9 @@ AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt,
if
(
in_fmt
==
AV_SAMPLE_FMT_U8
)
memset
(
ctx
->
silence
,
0x80
,
sizeof
(
ctx
->
silence
));
if
(
out_fmt
==
in_fmt
&&
!
ch_map
)
ctx
->
simd_f
=
cpy
;
if
(
HAVE_YASM
&&
HAVE_MMX
)
swri_audio_convert_init_x86
(
ctx
,
out_fmt
,
in_fmt
,
channels
);
return
ctx
;
...
...
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